refractor remove tusbh_msc_is_failed

increase usbh enum task from 150 to 200 due to stack overflow when mounting msc device
added task for msc host freeRTOS with stack = 300 (still cannot execute copy command)
This commit is contained in:
hathach
2014-02-28 18:42:33 +07:00
parent da6b2fbef8
commit 5f8f046eaa
7 changed files with 102 additions and 99 deletions

View File

@@ -59,16 +59,13 @@ static DSTATUS disk_state[TUSB_CFG_HOST_DEVICE_MAX];
//--------------------------------------------------------------------+
static DRESULT wait_for_io_complete(uint8_t usb_addr)
{
#if TUSB_CFG_OS == TUSB_OS_NONE
// TODO with RTOS, this should use semaphore instead of blocking
while ( tusbh_msc_is_busy(usb_addr) )
{
// timeout here
// TODO should have timeout here
}
return tusbh_msc_is_failed(usb_addr) ? RES_ERROR : RES_OK;
#else
#error semaphore instead of blocking
#endif
return RES_OK;
}
void diskio_init(void)