Browse Source

stm32/boards/B_L072Z_LRWAN1: Enable USB VCP support.

pull/4904/head
Damien George 5 years ago
parent
commit
baea43bba7
  1. 8
      ports/stm32/boards/B_L072Z_LRWAN1/mpconfigboard.h
  2. 1
      ports/stm32/boards/B_L072Z_LRWAN1/mpconfigboard.mk

8
ports/stm32/boards/B_L072Z_LRWAN1/mpconfigboard.h

@ -19,6 +19,7 @@
#define MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE (0) #define MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE (0)
#define MICROPY_HW_ENABLE_RTC (1) #define MICROPY_HW_ENABLE_RTC (1)
#define MICROPY_HW_ENABLE_ADC (0) #define MICROPY_HW_ENABLE_ADC (0)
#define MICROPY_HW_ENABLE_USB (1)
#define MICROPY_HW_HAS_SWITCH (1) #define MICROPY_HW_HAS_SWITCH (1)
// UART config // UART config
@ -58,3 +59,10 @@
#define MICROPY_HW_LED4 (pin_B7) // Red #define MICROPY_HW_LED4 (pin_B7) // Red
#define MICROPY_HW_LED_ON(pin) (mp_hal_pin_high(pin)) #define MICROPY_HW_LED_ON(pin) (mp_hal_pin_high(pin))
#define MICROPY_HW_LED_OFF(pin) (mp_hal_pin_low(pin)) #define MICROPY_HW_LED_OFF(pin) (mp_hal_pin_low(pin))
// USB config (need to bridge SB15/SB16)
#define MICROPY_HW_USB_FS (1)
#define MICROPY_HW_USB_MSC (0)
#define MICROPY_HW_USB_HID (0)
#define USBD_CDC_RX_DATA_SIZE (256)
#define USBD_CDC_TX_DATA_SIZE (256)

1
ports/stm32/boards/B_L072Z_LRWAN1/mpconfigboard.mk

@ -1,5 +1,6 @@
MCU_SERIES = l0 MCU_SERIES = l0
CMSIS_MCU = STM32L072xx CMSIS_MCU = STM32L072xx
MICROPY_FLOAT_IMPL = none
AF_FILE = boards/stm32l072_af.csv AF_FILE = boards/stm32l072_af.csv
LD_FILES = boards/stm32l072xz.ld boards/common_basic.ld LD_FILES = boards/stm32l072xz.ld boards/common_basic.ld

Loading…
Cancel
Save