mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-31 05:52:55 +08:00
remove test unit ready with disk_ioctl (cmd=CTRL_SYNC) as it is proved to be not needed
This commit is contained in:
parent
a1978e20fe
commit
e979f22f93
11
vendor/fatfs/diskio.c
vendored
11
vendor/fatfs/diskio.c
vendored
@ -124,21 +124,10 @@ DRESULT disk_write (BYTE pdrv, const BYTE* buff, DWORD sector, BYTE count)
|
||||
/* [IN] Drive number */
|
||||
/* [IN] Control command code */
|
||||
/* [I/O] Parameter and data buffer */
|
||||
msc_cmd_status_wrapper_t temp_csw TUSB_CFG_ATTR_USBRAM; // TODO MSCH test unit ready refractor
|
||||
DRESULT disk_ioctl (BYTE pdrv, BYTE cmd, void* buff)
|
||||
{
|
||||
if (cmd != CTRL_SYNC) return RES_ERROR;
|
||||
|
||||
uint8_t usb_addr = pdrv+1;
|
||||
|
||||
do {
|
||||
memclr_(&temp_csw, sizeof(msc_cmd_status_wrapper_t));
|
||||
|
||||
if ( TUSB_ERROR_NONE != tusbh_msc_test_unit_ready(usb_addr, 0, &temp_csw) ) return RES_ERROR;
|
||||
wait_for_io_complete(usb_addr);
|
||||
|
||||
} while( temp_csw.status != 0 ); // wait unitl unit is ready
|
||||
|
||||
return RES_OK;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user