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

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

?? generic_drv.c

?? 文件系統(tǒng)轅馬,想要的258031823大幅度反對反對法
?? 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 ****************************/

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品久久久99| 亚洲欧洲一区二区在线播放| 国产欧美在线观看一区| 亚洲影院在线观看| 成人黄色软件下载| 精品日韩在线一区| 亚洲mv大片欧洲mv大片精品| 成人黄色片在线观看| 欧美成人bangbros| 亚洲电影一区二区| 色综合久久久久久久久久久| 欧美va亚洲va香蕉在线| 亚洲综合一二区| 99久久精品免费精品国产| 精品国产免费久久| 免费观看成人鲁鲁鲁鲁鲁视频| 欧洲国内综合视频| 一级女性全黄久久生活片免费| 成人午夜av电影| 国产网站一区二区三区| 国产乱子伦视频一区二区三区 | 色欧美乱欧美15图片| 国产欧美日韩久久| 国产主播一区二区三区| 精品日本一线二线三线不卡| 亚洲一区日韩精品中文字幕| 91精品国产综合久久久蜜臀粉嫩 | 丁香婷婷综合色啪| 精品国内二区三区| 国产在线日韩欧美| 欧美r级在线观看| 久久国产综合精品| 日韩你懂的电影在线观看| 日韩高清一级片| 精品视频一区二区三区免费| 一区二区三区不卡视频| 欧美亚一区二区| 亚洲v中文字幕| 欧美一区午夜视频在线观看| 青青草国产精品亚洲专区无| 欧美变态tickle挠乳网站| 久久99精品一区二区三区| 久久久精品国产99久久精品芒果| 国产真实乱对白精彩久久| 国产午夜亚洲精品理论片色戒 | 欧美日韩小视频| 天天操天天干天天综合网| 日韩一级片在线播放| 国产一区二区调教| 最新热久久免费视频| 欧美午夜宅男影院| 久久国产精品第一页| 亚洲国产精品精华液ab| 91免费精品国自产拍在线不卡| 亚洲精品视频在线观看免费| 91久久精品国产91性色tv| 中文字幕日韩一区| 亚洲成人av福利| 国产精品自拍三区| 日韩精品欧美精品| 色菇凉天天综合网| 一区二区三区日韩精品视频| 欧美人与z0zoxxxx视频| 国产一区日韩二区欧美三区| 天堂蜜桃一区二区三区| 日韩欧美一区二区视频| aaa欧美日韩| 视频一区二区国产| 国产清纯白嫩初高生在线观看91| 色女孩综合影院| 韩国三级电影一区二区| 一区二区激情小说| 久久久久久麻豆| 欧美午夜精品电影| 国产**成人网毛片九色 | 日本特黄久久久高潮| 久久青草国产手机看片福利盒子| 99久久国产综合精品女不卡| 免费在线观看视频一区| 亚洲欧美一区二区三区孕妇| 精品乱码亚洲一区二区不卡| 色悠久久久久综合欧美99| 国产一区亚洲一区| 水野朝阳av一区二区三区| 成人免费在线播放视频| 亚洲精品一区二区三区精华液| 欧美亚洲自拍偷拍| av午夜一区麻豆| 国产伦精品一区二区三区免费迷| 视频一区中文字幕| 一区二区免费看| 亚洲欧美电影院| 中文字幕免费一区| 久久久久久久久久久电影| 欧美裸体一区二区三区| 色综合一个色综合| 97超碰欧美中文字幕| 国产在线乱码一区二区三区| 久久综合网色—综合色88| 亚洲免费av观看| 欧美日韩激情一区二区三区| 成人午夜电影小说| 国产精品一区二区视频| 裸体一区二区三区| 奇米一区二区三区av| 日韩和欧美一区二区三区| 亚洲地区一二三色| 亚洲mv在线观看| 午夜欧美2019年伦理| 亚洲电影视频在线| 日韩精品三区四区| 偷拍亚洲欧洲综合| 日精品一区二区三区| 丝袜a∨在线一区二区三区不卡| 亚洲一卡二卡三卡四卡| 夜夜亚洲天天久久| 天天综合色天天| 秋霞午夜鲁丝一区二区老狼| 麻豆免费精品视频| 九九九久久久精品| 国产一区二区美女| 成人小视频在线观看| 成人动漫中文字幕| 在线精品视频免费播放| 中文字幕一区二区三区色视频| 日韩综合一区二区| 亚洲午夜在线观看视频在线| 亚洲国产色一区| 日产国产欧美视频一区精品| 日本中文在线一区| 国产精品456| voyeur盗摄精品| 欧美性大战久久久久久久| 欧美精品在欧美一区二区少妇| 91精品国产91综合久久蜜臀| 26uuuu精品一区二区| 欧美韩国日本一区| 一区二区视频在线看| 性感美女极品91精品| 精品亚洲成a人在线观看| 成人综合婷婷国产精品久久| 色综合久久久久| 91精品久久久久久久久99蜜臂| 欧美不卡一区二区三区四区| 国产女人18毛片水真多成人如厕| 亚洲色图色小说| 日本欧美一区二区在线观看| 色狠狠色噜噜噜综合网| 在线视频一区二区三| 日韩一区二区在线观看视频| 欧美午夜免费电影| 欧美电影一区二区三区| 亚洲一区精品在线| 久久精品视频网| 亚洲天堂福利av| 亚洲va天堂va国产va久| 国产精品一区二区x88av| 91热门视频在线观看| 日韩视频在线你懂得| 国产精品久久久久久久久晋中 | 欧美国产日韩a欧美在线观看| 一区二区三区在线观看欧美| 久久精品国产亚洲5555| 在线中文字幕一区| 久久精品视频一区二区| 五月天国产精品| bt欧美亚洲午夜电影天堂| 日韩视频免费观看高清完整版 | 成人黄色大片在线观看| 欧美嫩在线观看| 亚洲国产aⅴ成人精品无吗| 韩国三级中文字幕hd久久精品| 日本国产一区二区| 国产欧美日韩视频一区二区| 蜜桃久久久久久久| 91视频com| 亚洲国产成人在线| 久久国产成人午夜av影院| 欧美性一二三区| 亚洲少妇30p| 丁香婷婷综合激情五月色| 2021久久国产精品不只是精品| 亚洲成a人v欧美综合天堂| 色综合色狠狠综合色| 日本一二三四高清不卡| 国产精华液一区二区三区| 欧美mv和日韩mv的网站| 日本午夜一区二区| 欧美日韩一区国产| 亚洲在线成人精品| 欧美日韩在线综合| 亚洲成人在线免费| 欧美日韩免费观看一区二区三区| 亚洲午夜免费电影| 日韩欧美一区二区免费| 亚洲一区av在线| 成人黄色一级视频| 26uuu另类欧美| 国产呦萝稀缺另类资源| 久久夜色精品国产欧美乱极品|