亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? generic_drv.c

?? uc/Fs 236,讓uc/os也支持多種文件系統(tǒng)。
?? C
字號:
/*
**********************************************************************
*                          Micrium, Inc.
*                      949 Crestview Circle
*                     Weston,  FL 33327-1848
*
*                            uC/FS
*
*             (c) Copyright 2001 - 2003, Micrium, Inc.
*                      All rights reserved.
*
***********************************************************************

----------------------------------------------------------------------
File        : generic_drv.c 
Purpose     : Skeleton device driver
----------------------------------------------------------------------

This is an example driver that should help implementing any kind of
data storage devices into the filesystem. The device you may use does
not need to provide any special functions other than reading data from
a given sector address.
          
---------------------------END-OF-HEADER------------------------------
*/

/*********************************************************************
*
*             #include Section
*
**********************************************************************
*/

#include "fs_dev.h" 
#include "fs_lbl.h" 
#include "FS_ConfDefaults.h"        /* FS Configuration */

/*
   Wether this driver is being compiled into the FS or not can be
   switched on/off in the global configuration file "fs_conf.h". 
   Refer the corresponding #define in the section "Device Driver Support"
*/

#if FS_USE_GENDEV_DRIVER /* only compiled if needed */


#include "fs_api.h" /* Standard includes that always must be included. */
#include "fs_clib.h"

/*********************************************************************
*
*             #define constants
*
**********************************************************************
*/

/* 
   set the maximum number of devices that this driver can address.
*/
#define FS_GENDEV_MAX_DEVICE 1
/*
   If the media size always remains the same, you can define a
   constant size here.
*/
#define FS_GENDEV_NUMSEC     1024 

/*********************************************************************
*
*             Local Variables        
*
**********************************************************************
*/

/*
  To make sure you initialize the device only once, use a static
  variable for that purpose. 
*/
static char GenDev_Status[FS_GENDEV_MAX_DEVICE];

/*********************************************************************
*
*             Local functions
*
**********************************************************************
*/

/*********************************************************************
*
*             _FS_GENDEV_DevStatus
*
*  Description:
*    FS driver function. Gets status of the device. This function is also
*    used to initialize the device and to detect a media change.
*
*  Parameters:
*    Unit                  - Device number.
* 
*  Return value:
*    ==1 (FS_LBL_MEDIA_CHANGED) - The media of the device has changed.
*    ==0                       - Device okay and ready for operation.
*  <0                          - An error has occured.
*/

static int _FS_GENDEV_DevStatus(FS_U8 Unit) {
  /* Make sure the initialization only happens once. */
  if (GenDev_Status[Unit] != FS_MEDIA_ISPRESENT) {
    GenDev_Status[Unit] = FS_MEDIA_ISPRESENT;
    /*
        Place your low level device initialization or reset code here
    */
    
    /* 
       Make sure, the function returns FS_LBL_MEDIA_CHANGED when it is
       called the first time.
    */
    return FS_LBL_MEDIA_CHANGED;
  }
  return 0;
}


/*********************************************************************
*
*             _FS_GENDEV_DevRead
*
*  Description:
*    FS driver function. Read a sector from the medium.
*
*  Parameters:
*    Unit        - Device number.
*    Sector          - Sector to be read from the device.
*    pBuffer         - Pointer to buffer for storing the data.
* 
*    Return value:
*    ==0             - Sector has been read and copied to pBuffer.
*    <0              - An error has occured.
*/

static int _FS_GENDEV_DevRead(FS_U8 Unit, FS_U32 Sector, void *pBuffer) {
  /*
     The next test checks if the given sector address is within a valid range. 
     Depending on your device, you can set a constant value or calculate
     this value from media descriptor of your hardware.
  */
  if (Sector >= FS_GENDEV_NUMSEC) {
    return -1;  /* Out of sector range */
  }
  /*
     Place the code that reads from your media here. The number of bytes
     that has to be read equal to the sector size. This value is defined
     as FS_SEC_SIZE. Below you can see the parameter that are used to
     transfer a sector from the file system to the storage device.

     Sector        - Sector Number.
     *pBuffer      - Pointer to the buffer were sector data is stored.
     FS_SEC_SIZE   - Number of bytes that must be transferred.

  */
  return 0;
}


/*********************************************************************
*
*             _FS_GENDEV_DevWrite
*
*  Description:
*  FS driver function. Write sector to the RAM disk.
*
*  Parameters:
*    Unit        - Device number.
*    Sector          - Sector to be written to the device.
*    pBuffer         - Pointer to data to be stored.
* 
*  Return value:
*    ==0             - Sector has been written to the device.
*    <0              - An error has occured.
*/

static int _FS_GENDEV_DevWrite(FS_U8 Unit, FS_U32 Sector, void *pBuffer) {
  /*
     The next test checks if the given sector address is within a valid range. 
     Depending on your device, you can set a constant value or calculate
     this value from media descriptor of your hardware.
  */
  if (Sector >= FS_GENDEV_NUMSEC) {
    return -1;  /* Out of sector range */
  }
  /*
     Place the code that writes data onto your media here. The number of bytes
     that has to be read equal to the sector size. This value is defined
     as FS_SEC_SIZE. Below you can see the parameter that are used to
     transfer a sector from the storage device to the file system.

     Sector        - Sector Number.
     *pBuffer      - Pointer to the buffer were sector data is stored.
     FS_SEC_SIZE   - Number of bytes that must be transferred.

  */
  return 0;
  /* If you would like to use a read only device, just return here with zero. */
}


/*********************************************************************
*
*             _FS_GENDEV_DevIoCtl
*
*  Description:
*    FS driver function. Execute device command.
*
*  Parameters:
*    Unit    - Device number.
*    Cmd         - Command to be executed.
*    Aux         - Parameter depending on command.
*    pBuffer     - Pointer to a buffer used for the command.
* 
*  Return value:
*    This function is used to execute device specific commands.
*    In the file fs_api.h you can find I/O commands that are currently
*    implemented. If the higher layers don't know the command, they
*    send it to the next lower. Your driver does not have to
*    implement one of these commands. Only if automatic formatting
*    is used or user routines need to get the size of the medium,
*    FS_CMD_GET_DEVINFO must be implemented.
*/

static int _FS_GENDEV_DevIoCtl(FS_U8 Unit, FS_I32 Cmd, FS_I32 Aux, void *pBuffer) {
  FS_DEV_INFO *pInfo;
  /*
     FS_DEV_INFO is a simple structure defined in fs_dev.h that is filled with
     the geometrical values of the device.
  */
  FS_USE_PARA(Aux);
  /* This check makes sure, the device number is within valid range */
  switch (Cmd) { /* Filter out the command that you want to response to */
  case FS_CMD_GET_DEVINFO:
    if (pBuffer == 0) { /* avoid writing into non existing buffers */
      return -1;
    }
    pInfo = (FS_DEV_INFO *)pBuffer; /* The parameter pBuffer contains the pointer to the structure */
    /*
       The number of hidden sectors is used the reserve a certain amount of sectors for
       operating system specific data and the partition table. If you do not need or
       have a partition table or special system boot code on the drive, the number 
       of hidden sectors is zero.
    */
    pInfo->NumHeads        = 0;  /* Relevant only for mechanical drives   */
    pInfo->SectorsPerTrack = 2;  /* Relevant only for mechanical drives   */
    pInfo->NumSectors      = FS_GENDEV_NUMSEC; /* Number of total sectors  */
    /* Now all necessary information is complete. */
    break;
  }
  return 0;  /* Return with zero if no problems have occurred. */
}


/*********************************************************************
*
*             Global variables
*
**********************************************************************
*/

/* This structure contains pointers to the functions that all drivers
   of the file system must provide. */

const FS_DEVICE_TYPE FS__genericdevice_driver = {
  "gen",                 /* Name of the device   */
  1,
  _FS_GENDEV_DevStatus,  /* Device state         */
  _FS_GENDEV_DevRead,    /* Device read sector   */
  _FS_GENDEV_DevWrite,   /* Device write sector  */
  _FS_GENDEV_DevIoCtl    /* IO control interface */
};

#endif /* FS_USE_GENDEV_DRIVER */

/*************************** End of file ****************************/

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩伦理电影网| 老司机免费视频一区二区三区| 亚洲色图欧洲色图| 日韩精品成人一区二区在线| 极品瑜伽女神91| 91同城在线观看| 欧美一级二级三级乱码| 欧美日高清视频| 久久影院午夜片一区| 一区二区三区四区视频精品免费| 午夜私人影院久久久久| 国产丶欧美丶日本不卡视频| 在线观看一区二区视频| 久久久久久久久久久久久夜| 亚洲日本va在线观看| 蓝色福利精品导航| 色婷婷精品久久二区二区蜜臀av | 亚洲成人av福利| 国产一区二区三区不卡在线观看| 99热国产精品| 久久嫩草精品久久久精品一| 亚洲综合成人网| 国产高清精品网站| 色激情天天射综合网| 久久久精品中文字幕麻豆发布| 1024国产精品| 国产高清精品网站| 精品久久久久久综合日本欧美| 亚洲狠狠爱一区二区三区| 成人性色生活片| 久久久高清一区二区三区| 中文字幕日本乱码精品影院| 日韩av不卡一区二区| 一本色道久久综合狠狠躁的推荐| 欧美成人video| 丝袜美腿亚洲一区二区图片| 色婷婷精品大视频在线蜜桃视频| 国产偷国产偷亚洲高清人白洁| 日韩在线一区二区| 91精品国产入口| 亚洲大片精品永久免费| 94-欧美-setu| 国产精品福利在线播放| 美日韩一区二区| 91精品国产福利在线观看| 亚洲大片精品永久免费| 91国偷自产一区二区开放时间| 国产精品欧美经典| 国产高清亚洲一区| 久久这里都是精品| 国产成人在线色| 欧美韩国日本一区| 国产99久久久国产精品免费看| 久久久久久久久岛国免费| 国产裸体歌舞团一区二区| 欧美成人乱码一区二区三区| 精品一区二区影视| 久久蜜臀精品av| 国产乱子轮精品视频| 久久只精品国产| 大陆成人av片| 亚洲一级二级在线| 91福利社在线观看| 亚洲国产精品一区二区久久恐怖片| 一本大道久久精品懂色aⅴ| 亚洲免费观看高清完整版在线观看熊| 欧美酷刑日本凌虐凌虐| 国产传媒日韩欧美成人| 亚洲美女在线一区| 精品成人佐山爱一区二区| 色94色欧美sute亚洲线路二| 久久精品久久99精品久久| 亚洲人吸女人奶水| 精品国偷自产国产一区| 在线观看网站黄不卡| 国产黑丝在线一区二区三区| 性欧美大战久久久久久久久| 国产网站一区二区| 日韩一级完整毛片| 色综合天天综合网国产成人综合天| 日韩国产欧美在线视频| 国产精品乱码一区二区三区软件 | 色香蕉久久蜜桃| 精品在线一区二区| 亚洲福利视频一区| 国产精品久久久久久久午夜片| 91精品国产免费| 色综合一个色综合亚洲| 国产成人综合视频| 另类成人小视频在线| 亚洲制服丝袜在线| 亚洲欧美日韩久久| 国产喂奶挤奶一区二区三区| 欧美一区二区久久久| 91美女在线看| 99久久国产免费看| 国产宾馆实践打屁股91| 国产一区久久久| 蜜桃视频在线一区| 日韩电影在线观看一区| 亚洲不卡一区二区三区| 亚洲综合在线第一页| 亚洲免费av高清| 亚洲欧洲性图库| 国产精品美女一区二区三区| 久久丝袜美腿综合| 欧美精品一区二| 精品久久久三级丝袜| 欧美一区二区三区不卡| 日韩午夜小视频| 欧美一区二区三区免费观看视频| 欧美二区在线观看| 欧美男生操女生| 欧美老年两性高潮| 日韩免费观看高清完整版| 91精品视频网| 日韩欧美的一区| 久久青草欧美一区二区三区| 欧美精品一区二区三区蜜桃| 日韩欧美一级精品久久| 日韩精品在线网站| 久久久99精品久久| 中文字幕欧美激情| 亚洲男人的天堂在线aⅴ视频| 亚洲精品综合在线| 香蕉久久夜色精品国产使用方法 | 欧美吻胸吃奶大尺度电影| 在线观看三级视频欧美| 欧美午夜精品一区二区三区| 欧美二区三区91| 精品国产91乱码一区二区三区 | 粉嫩一区二区三区性色av| caoporn国产一区二区| 一本一道久久a久久精品综合蜜臀 一本一道综合狠狠老 | 国产成人精品综合在线观看 | 亚洲免费av在线| 水野朝阳av一区二区三区| 久88久久88久久久| eeuss国产一区二区三区| 91九色02白丝porn| 日韩精品中文字幕一区| 国产精品区一区二区三区| 亚洲裸体在线观看| 美女视频一区二区| 成人91在线观看| 制服丝袜日韩国产| 中文字幕乱码日本亚洲一区二区 | 欧美日韩五月天| 精品国产一区二区三区不卡| 国产精品美日韩| 丝瓜av网站精品一区二区| 风流少妇一区二区| 欧美精品久久99久久在免费线| 精品av久久707| 国产精品久久久久aaaa樱花| 香港成人在线视频| 成人av高清在线| 日韩一区二区三区电影| 亚洲国产成人自拍| 日本sm残虐另类| 99精品视频一区| 日韩女优视频免费观看| 亚洲女同ⅹxx女同tv| 国产美女久久久久| 3d动漫精品啪啪| 亚洲欧美另类在线| 国产成+人+日韩+欧美+亚洲| 欧美一级理论性理论a| 亚洲美女淫视频| 成人av资源在线观看| 欧美xfplay| 天堂va蜜桃一区二区三区 | 国产成人午夜精品影院观看视频| 欧美三日本三级三级在线播放| 国产丝袜欧美中文另类| 日本强好片久久久久久aaa| 一本色道久久加勒比精品| 中文字幕高清一区| 久久福利视频一区二区| 欧美巨大另类极品videosbest| 中文字幕一区二区日韩精品绯色| 韩国精品一区二区| 51午夜精品国产| 天天亚洲美女在线视频| 欧美日韩情趣电影| 亚洲小说欧美激情另类| 在线看不卡av| 亚洲激情在线播放| 色婷婷国产精品| 综合av第一页| 91在线精品一区二区三区| 国产精品网站在线| www.久久精品| 国产精品久久久久久久久果冻传媒| 国产成人亚洲综合a∨猫咪| 久久蜜桃av一区二区天堂| 久久不见久久见中文字幕免费| 91麻豆精品国产91久久久使用方法| 亚洲综合色自拍一区| 在线观看精品一区|