Skip to content

Commit b085a97

Browse files
committed
handle boards that support sdcardio but don't support settings.toml
1 parent fea7505 commit b085a97

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

supervisor/shared/usb/usb_msc_flash.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,7 @@ void tud_msc_inquiry_cb(uint8_t lun, uint8_t vendor_id[8], uint8_t product_id[16
367367
}
368368

369369
#ifdef SDCARD_LUN
370+
#if CIRCUITPY_SETTINGS_TOML
370371
typedef enum {
371372
SDCARD_USB_SETTING_NOT_YET_READ = 0,
372373
SDCARD_USB_SETTING_TRUE,
@@ -384,6 +385,11 @@ static bool sdcard_usb_enabled(void) {
384385
}
385386
return _sdcard_usb_setting_state == SDCARD_USB_SETTING_TRUE;
386387
}
388+
#else
389+
static bool sdcard_usb_enabled(void) {
390+
return CIRCUITPY_SDCARD_USB;
391+
}
392+
#endif
387393
#endif
388394

389395
// Invoked when received Test Unit Ready command.

0 commit comments

Comments
 (0)