From 11bc7d0fc1074b01aaddc325209a281ee9acbba4 Mon Sep 17 00:00:00 2001 From: Andrew Leech Date: Tue, 24 Sep 2024 11:35:53 +1000 Subject: [PATCH] esp32/boards: Update ARDUINO_NANO_ESP32 USB configuration. The custom line state handling is no longer needed as MicroPython runs it directly now. Signed-off-by: Andrew Leech --- ports/esp32/boards/ARDUINO_NANO_ESP32/board_init.c | 8 -------- ports/esp32/boards/ARDUINO_NANO_ESP32/mpconfigboard.h | 5 ----- 2 files changed, 13 deletions(-) diff --git a/ports/esp32/boards/ARDUINO_NANO_ESP32/board_init.c b/ports/esp32/boards/ARDUINO_NANO_ESP32/board_init.c index 69a414cd5d9e..3394bb1e2e21 100644 --- a/ports/esp32/boards/ARDUINO_NANO_ESP32/board_init.c +++ b/ports/esp32/boards/ARDUINO_NANO_ESP32/board_init.c @@ -35,9 +35,6 @@ #include "double_tap.h" #include "usb.h" -#include "tinyusb.h" -#include "tusb_cdc_acm.h" - #define LED_RED GPIO_NUM_46 #define LED_GREEN GPIO_NUM_0 #define LED_BLUE GPIO_NUM_45 @@ -87,11 +84,6 @@ void NANO_ESP32_enter_bootloader(void) { esp_restart(); } -void NANO_ESP32_usb_callback_line_state_changed(int itf, void *event_in) { - cdcacm_event_t *event = event_in; - mp_usbd_line_state_cb(itf, event->line_state_changed_data.dtr, event->line_state_changed_data.rts); -} - void NANO_ESP32_board_startup(void) { boardctrl_startup(); diff --git a/ports/esp32/boards/ARDUINO_NANO_ESP32/mpconfigboard.h b/ports/esp32/boards/ARDUINO_NANO_ESP32/mpconfigboard.h index 8c2aa88e9f2e..31b2a49bf8c3 100644 --- a/ports/esp32/boards/ARDUINO_NANO_ESP32/mpconfigboard.h +++ b/ports/esp32/boards/ARDUINO_NANO_ESP32/mpconfigboard.h @@ -19,14 +19,9 @@ #define MICROPY_HW_SPI2_SCK (18) #define MICROPY_HW_ENABLE_USBDEV (1) -#define MICROPY_EXCLUDE_SHARED_TINYUSB_USBD_CDC (1) -#define MICROPY_HW_USB_EXTERNAL_TINYUSB (1) #define MICROPY_HW_USB_CDC_1200BPS_TOUCH (1) #define MICROPY_SCHEDULER_STATIC_NODES (1) -#define MICROPY_HW_USB_CUSTOM_LINE_STATE_CB NANO_ESP32_usb_callback_line_state_changed -void NANO_ESP32_usb_callback_line_state_changed(int itf, void *event); - #define MICROPY_BOARD_STARTUP NANO_ESP32_board_startup void NANO_ESP32_board_startup(void);