|
只要实现- //*****************************************************************************
- //
- // The externally provided mass storage class event call back function.
- //
- //*****************************************************************************
- extern unsigned long USBDMSCEventCallback(void *pvCBData, unsigned long ulEvent,
- unsigned long ulMsgParam,
- void *pvMsgData);
复制代码 这个回调函数里声明的几个函数即可- {
- USBDMSCStorageOpen,
- USBDMSCStorageClose,
- USBDMSCStorageRead,
- USBDMSCStorageWrite,
- USBDMSCStorageNumBlocks
- },
复制代码 也就是diskio.h里面的这几个- /*---------------------------------------*/
- /* Prototypes for disk control functions */
- DSTATUS disk_initialize (BYTE);
- DSTATUS disk_status (BYTE);
- DRESULT disk_read (BYTE, BYTE*, DWORD, BYTE);
- #if _READONLY == 0
- DRESULT disk_write (BYTE, const BYTE*, DWORD, BYTE);
- #endif
- DRESULT disk_ioctl (BYTE, BYTE, void*);
- void disk_timerproc (void);
复制代码 可参考usb库里面的这个文件mmc-ek-lm4f232h5qd.c |
|