File tree Expand file tree Collapse file tree 3 files changed +10
-0
lines changed
Expand file tree Collapse file tree 3 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -108,6 +108,7 @@ set(MICROPY_SOURCE_LIB
108108 ${MICROPY_DIR} /shared/tinyusb/mp_cdc_common.c
109109 ${MICROPY_DIR} /shared/tinyusb/mp_usbd.c
110110 ${MICROPY_DIR} /shared/tinyusb/mp_usbd_descriptor.c
111+ ${MICROPY_DIR} /shared/tinyusb/mp_usbd_runtime.c
111112)
112113
113114set (MICROPY_SOURCE_DRIVERS
@@ -146,6 +147,7 @@ set(MICROPY_SOURCE_QSTR
146147 ${MICROPY_DIR} /shared/readline/readline.c
147148 ${MICROPY_DIR} /shared/runtime/mpirq.c
148149 ${MICROPY_DIR} /shared/runtime/sys_stdio_mphal.c
150+ ${MICROPY_DIR} /shared/tinyusb/mp_usbd_runtime.c
149151 ${MICROPY_PORT_DIR} /machine_adc.c
150152 ${MICROPY_PORT_DIR} /machine_i2c.c
151153 ${MICROPY_PORT_DIR} /machine_pin.c
Original file line number Diff line number Diff line change @@ -221,6 +221,10 @@ int main(int argc, char **argv) {
221221 mp_thread_deinit ();
222222 #endif
223223 soft_timer_deinit ();
224+ #if MICROPY_HW_ENABLE_USB_RUNTIME_DEVICE
225+ mp_usbd_deinit ();
226+ #endif
227+
224228 gc_sweep_all ();
225229 mp_deinit ();
226230 }
Original file line number Diff line number Diff line change 5252#ifndef MICROPY_HW_USB_MSC
5353#define MICROPY_HW_USB_MSC (0)
5454#endif
55+
56+ #ifndef MICROPY_HW_ENABLE_USB_RUNTIME_DEVICE
57+ #define MICROPY_HW_ENABLE_USB_RUNTIME_DEVICE (1) // Support machine.USBDevice
58+ #endif
5559#endif
5660
5761#ifndef MICROPY_CONFIG_ROM_LEVEL
You can’t perform that action at this time.
0 commit comments