kopia lustrzana https://github.com/micropython/micropython
samd: Enable support for Python USB devices.
This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>pull/9497/head
rodzic
0baa3b5528
commit
7f5d8c4605
|
@ -136,6 +136,7 @@ SHARED_SRC_C += \
|
||||||
shared/tinyusb/mp_cdc_common.c \
|
shared/tinyusb/mp_cdc_common.c \
|
||||||
shared/tinyusb/mp_usbd.c \
|
shared/tinyusb/mp_usbd.c \
|
||||||
shared/tinyusb/mp_usbd_descriptor.c \
|
shared/tinyusb/mp_usbd_descriptor.c \
|
||||||
|
shared/tinyusb/mp_usbd_runtime.c \
|
||||||
|
|
||||||
ASF4_SRC_C += $(addprefix lib/asf4/$(MCU_SERIES_LOWER)/,\
|
ASF4_SRC_C += $(addprefix lib/asf4/$(MCU_SERIES_LOWER)/,\
|
||||||
hal/src/hal_atomic.c \
|
hal/src/hal_atomic.c \
|
||||||
|
|
|
@ -93,6 +93,9 @@ void samd_main(void) {
|
||||||
pwm_deinit_all();
|
pwm_deinit_all();
|
||||||
#endif
|
#endif
|
||||||
soft_timer_deinit();
|
soft_timer_deinit();
|
||||||
|
#if MICROPY_HW_ENABLE_USB_RUNTIME_DEVICE
|
||||||
|
mp_usbd_deinit();
|
||||||
|
#endif
|
||||||
gc_sweep_all();
|
gc_sweep_all();
|
||||||
#if MICROPY_PY_MACHINE_I2C || MICROPY_PY_MACHINE_SPI || MICROPY_PY_MACHINE_UART
|
#if MICROPY_PY_MACHINE_I2C || MICROPY_PY_MACHINE_SPI || MICROPY_PY_MACHINE_UART
|
||||||
sercom_deinit_all();
|
sercom_deinit_all();
|
||||||
|
|
|
@ -63,8 +63,13 @@
|
||||||
#ifndef MICROPY_HW_USB_DESC_STR_MAX
|
#ifndef MICROPY_HW_USB_DESC_STR_MAX
|
||||||
#define MICROPY_HW_USB_DESC_STR_MAX (32)
|
#define MICROPY_HW_USB_DESC_STR_MAX (32)
|
||||||
#endif
|
#endif
|
||||||
|
// Support machine.USBDevice
|
||||||
|
#ifndef MICROPY_HW_ENABLE_USB_RUNTIME_DEVICE
|
||||||
|
#define MICROPY_HW_ENABLE_USB_RUNTIME_DEVICE (1)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif // MICROPY_HW_ENABLE_USBDEV
|
||||||
|
|
||||||
#define MICROPY_PY_SYS_PLATFORM "samd"
|
#define MICROPY_PY_SYS_PLATFORM "samd"
|
||||||
|
|
||||||
// Extended modules
|
// Extended modules
|
||||||
|
|
Ładowanie…
Reference in New Issue