|
模拟U盘做读写没问题,格式化不行。
- UINT demo_thread_media_status(VOID *storage, ULONG lun, ULONG media_id, ULONG *media_status)
- {
- /* The ATA drive never fails. This is just for demo only !!!! */
- return(UX_SUCCESS);
- }
- UINT demo_thread_media_read(VOID *storage, ULONG lun, UCHAR * data_pointer, ULONG number_blocks, ULONG lba, ULONG *media_status)
- {
- UINT status = 0;
- while(number_blocks--)
- {
- status = fx_media_read(&sdio_disk,lba,data_pointer);
- data_pointer+=512;
- lba++;
- }
-
- return(status);
- }
- UINT demo_thread_media_write(VOID *storage, ULONG lun, UCHAR * data_pointer, ULONG number_blocks, ULONG lba, ULONG *media_status)
- {
- UINT status = 0;
- while(number_blocks--)
- {
- status = fx_media_write(&sdio_disk,lba,data_pointer);
- data_pointer+=512;
- lba++;
- }
- return(status);
- }
复制代码
|
|