mirror of
https://github.com/sakumisu/CherryUSB.git
synced 2025-05-09 00:21:44 +08:00
update(class/msc/usbh_msc): add retry macro
Signed-off-by: sakumisu <1203593632@qq.com>
This commit is contained in:
parent
0a295ee5eb
commit
6c3b828e77
@ -13,6 +13,10 @@
|
||||
|
||||
#define DEV_FORMAT "/dev/sd%c"
|
||||
|
||||
#ifndef CONFIG_USBHOST_MSC_READY_CHECK_TIMES
|
||||
#define CONFIG_USBHOST_MSC_READY_CHECK_TIMES 10
|
||||
#endif
|
||||
|
||||
USB_NOCACHE_RAM_SECTION USB_MEM_ALIGNX uint8_t g_msc_cbw_csw[CONFIG_USBHOST_MAX_MSC_CLASS][USB_ALIGN_UP(64, CONFIG_USB_ALIGN_SIZE)];
|
||||
USB_NOCACHE_RAM_SECTION USB_MEM_ALIGNX uint8_t g_msc_buf[CONFIG_USBHOST_MAX_MSC_CLASS][USB_ALIGN_UP(64, CONFIG_USB_ALIGN_SIZE)];
|
||||
|
||||
@ -323,7 +327,7 @@ static int usbh_msc_connect(struct usbh_hubport *hport, uint8_t intf)
|
||||
USB_LOG_ERR("Fail to scsi_testunitready\r\n");
|
||||
}
|
||||
cnt++;
|
||||
if (cnt > 10) {
|
||||
if (cnt > CONFIG_USBHOST_MSC_READY_CHECK_TIMES) {
|
||||
return -USB_ERR_BUSY;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user