File tree Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,7 @@ if(MICROPY_PY_TINYUSB)
78
78
${MICROPY_DIR} /shared/tinyusb/mp_usbd.c
79
79
${MICROPY_DIR} /shared/tinyusb/mp_usbd_cdc.c
80
80
${MICROPY_DIR} /shared/tinyusb/mp_usbd_descriptor.c
81
+ ${MICROPY_DIR} /shared/tinyusb/mp_usbd_runtime.c
81
82
)
82
83
83
84
list (APPEND MICROPY_INC_TINYUSB
Original file line number Diff line number Diff line change @@ -183,6 +183,10 @@ void mp_task(void *pvParameter) {
183
183
mp_thread_deinit ();
184
184
#endif
185
185
186
+ #if MICROPY_HW_ENABLE_USB_RUNTIME_DEVICE
187
+ mp_usbd_deinit ();
188
+ #endif
189
+
186
190
gc_sweep_all ();
187
191
188
192
// Free any native code pointers that point to iRAM.
Original file line number Diff line number Diff line change 215
215
#else
216
216
#define MICROPY_HW_USB_VID (CONFIG_TINYUSB_DESC_CUSTOM_VID)
217
217
#endif
218
+
219
+ #ifndef MICROPY_HW_ENABLE_USB_RUNTIME_DEVICE
220
+ #define MICROPY_HW_ENABLE_USB_RUNTIME_DEVICE (1) // Support machine.USBDevice
221
+ #endif
218
222
#endif
219
223
220
224
#ifndef MICROPY_HW_USB_PID
You can’t perform that action at this time.
0 commit comments