mirror of
https://github.com/micropython/micropython.git
synced 2025-12-16 09:50:15 +01:00
stm32/usb: Add TinyUSB Mass Storage support.
Implements USB MSC functionality for STM32 port when using TinyUSB stack, supporting both internal Flash and SD card storage mediums. Signed-off-by: Andrew Leech <andrew@alelec.net>
This commit is contained in:
committed by
Damien George
parent
9bb266e311
commit
faae8e73ef
@@ -280,7 +280,7 @@ static bool init_sdcard_fs(void) {
|
||||
}
|
||||
}
|
||||
|
||||
#if MICROPY_HW_ENABLE_USB && !MICROPY_HW_TINYUSB_STACK
|
||||
#if MICROPY_HW_USB_MSC
|
||||
if (pyb_usb_storage_medium == PYB_USB_STORAGE_MEDIUM_NONE) {
|
||||
// if no USB MSC medium is selected then use the SD card
|
||||
pyb_usb_storage_medium = PYB_USB_STORAGE_MEDIUM_SDCARD;
|
||||
@@ -639,7 +639,7 @@ soft_reset:
|
||||
}
|
||||
#endif
|
||||
|
||||
#if MICROPY_HW_STM_USB_STACK
|
||||
#if MICROPY_HW_USB_MSC
|
||||
// if the SD card isn't used as the USB MSC medium then use the internal flash
|
||||
if (pyb_usb_storage_medium == PYB_USB_STORAGE_MEDIUM_NONE) {
|
||||
pyb_usb_storage_medium = PYB_USB_STORAGE_MEDIUM_FLASH;
|
||||
|
||||
Reference in New Issue
Block a user