esp32/modmachine: Allow building with USB CDC disabled.

Signed-off-by: Volodymyr Shymanskyy <vshymanskyi@gmail.com>
This commit is contained in:
Volodymyr Shymanskyy 2024-10-17 22:06:59 +03:00 committed by Damien George
parent 0646177997
commit 8fef67bda5

View File

@ -231,7 +231,7 @@ static mp_int_t mp_machine_reset_cause(void) {
#endif
NORETURN static void machine_bootloader_rtc(void) {
#if CONFIG_IDF_TARGET_ESP32S3
#if CONFIG_IDF_TARGET_ESP32S3 && MICROPY_HW_USB_CDC
usb_usj_mode();
usb_dc_prepare_persist();
chip_usb_set_persist_flags(USBDC_BOOT_DFU);