esp32: Enable machine.USBDevice to configure USB at runtime.

This adds support for `machine.USBDevice` to S2 and S3 boards.

Signed-off-by: Sebastian Romero <s.romero@arduino.cc>
This commit is contained in:
Sebastian Romero
2024-12-04 16:30:56 +01:00
committed by Damien George
parent bdda91fe74
commit 5f2d05d417
3 changed files with 9 additions and 0 deletions

View File

@@ -183,6 +183,10 @@ soft_reset_exit:
mp_thread_deinit();
#endif
#if MICROPY_HW_ENABLE_USB_RUNTIME_DEVICE
mp_usbd_deinit();
#endif
gc_sweep_all();
// Free any native code pointers that point to iRAM.