summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorhathach <[email protected]>2021-02-23 19:41:11 +0700
committerhathach <[email protected]>2021-02-23 19:41:11 +0700
commit5108d7613600449c50af9e8ce373571d56bed3cc (patch)
tree8306eb6d37d17666528cbfce24d6e6b260b68a7c /lib
parent386a386345fbaa1a9c63a4346c2d946fe015da72 (diff)
host msc: call read_capacity as part of enumeration
- add tuh_msc_get_block_count(), tuh_msc_get_block_size() - rename tuh_msc_mounted_cb/tuh_msc_unmounted_cb to tuh_msc_mount_cb/tuh_msc_unmount_cb to match device stack naming - change tuh_msc_is_busy() to tuh_msc_ready() - add CFG_TUH_MSC_MAXLUN (default to 4) to hold lun capacities - add host msc configured to for state check.
Diffstat (limited to 'lib')
-rw-r--r--lib/fatfs/diskio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/fatfs/diskio.c b/lib/fatfs/diskio.c
index 38503148d..401f583a2 100644
--- a/lib/fatfs/diskio.c
+++ b/lib/fatfs/diskio.c
@@ -48,7 +48,7 @@ static DSTATUS disk_state[CFG_TUSB_HOST_DEVICE_MAX];
static DRESULT wait_for_io_complete(uint8_t usb_addr)
{
// TODO with RTOS, this should use semaphore instead of blocking
- while ( tuh_msc_is_busy(usb_addr) )
+ while ( !tuh_msc_ready(usb_addr) )
{
// TODO should have timeout here
#if CFG_TUSB_OS != OPT_OS_NONE