mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 12:10:13 +01:00
shared/tinyusb: Allow ports to use 1200bps-touch without other CDC code.
This fixes the build for some esp32 and nrf boards (for example
`ARDUINO_NANO_33_BLE_SENSE` and `ARDUINO_NANO_ESP32`) due to commit
c98789a6d8. Changes are:
- Allow the CDC TX/RX functions in `mp_usbd_cdc.c` to be enabled
separately to those needed for `MICROPY_HW_USB_CDC_1200BPS_TOUCH`.
- Add `MICROPY_EXCLUDE_SHARED_TINYUSB_USBD_CDC` option as a temporary
workaround for the nrf port to use.
- Declare `mp_usbd_line_state_cb()` in a header as a public function.
- Fix warning with type cast of `.callback_line_state_changed`.
Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -335,6 +335,7 @@ long unsigned int rng_generate_random_word(void);
|
||||
#if MICROPY_HW_USB_CDC
|
||||
#include "device/usbd.h"
|
||||
#define MICROPY_HW_USBDEV_TASK_HOOK extern void tud_task(void); tud_task();
|
||||
#define MICROPY_EXCLUDE_SHARED_TINYUSB_USBD_CDC (1)
|
||||
#else
|
||||
#define MICROPY_HW_USBDEV_TASK_HOOK ;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user