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
108
108
${MICROPY_DIR} /shared/tinyusb/mp_cdc_common.c
109
109
${MICROPY_DIR} /shared/tinyusb/mp_usbd.c
110
110
${MICROPY_DIR} /shared/tinyusb/mp_usbd_descriptor.c
111
+ ${MICROPY_DIR} /shared/tinyusb/mp_usbd_runtime.c
111
112
)
112
113
113
114
set (MICROPY_SOURCE_DRIVERS
@@ -146,6 +147,7 @@ set(MICROPY_SOURCE_QSTR
146
147
${MICROPY_DIR} /shared/readline/readline.c
147
148
${MICROPY_DIR} /shared/runtime/mpirq.c
148
149
${MICROPY_DIR} /shared/runtime/sys_stdio_mphal.c
150
+ ${MICROPY_DIR} /shared/tinyusb/mp_usbd_runtime.c
149
151
${MICROPY_PORT_DIR} /machine_adc.c
150
152
${MICROPY_PORT_DIR} /machine_i2c.c
151
153
${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) {
221
221
mp_thread_deinit ();
222
222
#endif
223
223
soft_timer_deinit ();
224
+ #if MICROPY_HW_ENABLE_USB_RUNTIME_DEVICE
225
+ mp_usbd_deinit ();
226
+ #endif
227
+
224
228
gc_sweep_all ();
225
229
mp_deinit ();
226
230
}
Original file line number Diff line number Diff line change 52
52
#ifndef MICROPY_HW_USB_MSC
53
53
#define MICROPY_HW_USB_MSC (0)
54
54
#endif
55
+
56
+ #ifndef MICROPY_HW_ENABLE_USB_RUNTIME_DEVICE
57
+ #define MICROPY_HW_ENABLE_USB_RUNTIME_DEVICE (1) // Support machine.USBDevice
58
+ #endif
55
59
#endif
56
60
57
61
#ifndef MICROPY_CONFIG_ROM_LEVEL
You can’t perform that action at this time.
0 commit comments