Skip to content

Commit 34911f1

Browse files
committed
stm32/boards: Update all boards to work with new USB configuration.
1 parent d9b9fbc commit 34911f1

49 files changed

Lines changed: 58 additions & 59 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

ports/stm32/boards/B_L475E_IOT01A/mpconfigboard.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#define MICROPY_HW_HAS_SWITCH (1)
55
#define MICROPY_HW_ENABLE_RNG (1)
66
#define MICROPY_HW_ENABLE_RTC (1)
7+
#define MICROPY_HW_ENABLE_USB (1)
78

89
// MSI is used and is 4MHz
910
#define MICROPY_HW_CLK_PLLM (1)
@@ -65,3 +66,6 @@
6566
#define MICROPY_HW_LED2 (pin_B14) // green
6667
#define MICROPY_HW_LED_ON(pin) (mp_hal_pin_high(pin))
6768
#define MICROPY_HW_LED_OFF(pin) (mp_hal_pin_low(pin))
69+
70+
// USB config
71+
#define MICROPY_HW_USB_FS (1)

ports/stm32/boards/B_L475E_IOT01A/stm32l4xx_hal_conf.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
extern "C" {
4646
#endif
4747

48-
#define USE_USB_FS
4948
/* Exported types ------------------------------------------------------------*/
5049
/* Exported constants --------------------------------------------------------*/
5150

ports/stm32/boards/CERB40/mpconfigboard.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#define MICROPY_HW_ENABLE_RTC (1)
77
#define MICROPY_HW_ENABLE_DAC (1)
88
#define MICROPY_HW_ENABLE_CAN (1)
9+
#define MICROPY_HW_ENABLE_USB (1)
910

1011
// HSE is 12MHz
1112
#define MICROPY_HW_CLK_PLLM (12)
@@ -54,5 +55,6 @@
5455
// The Cerb40 has No SDCard
5556

5657
// USB config
58+
#define MICROPY_HW_USB_FS (1)
5759
//#define MICROPY_HW_USB_VBUS_DETECT_PIN (pin_A9)
5860
//#define MICROPY_HW_USB_OTG_ID_PIN (pin_A10)

ports/stm32/boards/CERB40/stm32f4xx_hal_conf.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@
4646
/* Exported types ------------------------------------------------------------*/
4747
/* Exported constants --------------------------------------------------------*/
4848

49-
#define USE_USB_FS
50-
5149
/* ########################## Module Selection ############################## */
5250
/**
5351
* @brief This is the list of modules to be used in the HAL driver

ports/stm32/boards/ESPRUINO_PICO/mpconfigboard.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#define MICROPY_HW_HAS_SWITCH (1)
1111
#define MICROPY_HW_HAS_FLASH (1)
1212
#define MICROPY_HW_ENABLE_RTC (1)
13+
#define MICROPY_HW_ENABLE_USB (1)
1314
#define MICROPY_HW_ENABLE_SERVO (1)
1415

1516
// Pico has an 8 MHz HSE and the F401 does 84 MHz max
@@ -62,3 +63,6 @@
6263
#define MICROPY_HW_LED4 (pin_B12) // green
6364
#define MICROPY_HW_LED_ON(pin) (mp_hal_pin_high(pin))
6465
#define MICROPY_HW_LED_OFF(pin) (mp_hal_pin_low(pin))
66+
67+
// USB config
68+
#define MICROPY_HW_USB_FS (1)

ports/stm32/boards/ESPRUINO_PICO/stm32f4xx_hal_conf.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@
4646
/* Exported types ------------------------------------------------------------*/
4747
/* Exported constants --------------------------------------------------------*/
4848

49-
#define USE_USB_FS
50-
5149
/* ########################## Module Selection ############################## */
5250
/**
5351
* @brief This is the list of modules to be used in the HAL driver

ports/stm32/boards/HYDRABUS/mpconfigboard.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#define MICROPY_HW_HAS_SDCARD (1)
77
#define MICROPY_HW_ENABLE_RNG (1)
88
#define MICROPY_HW_ENABLE_DAC (1)
9+
#define MICROPY_HW_ENABLE_USB (1)
910

1011
// HSE is 8MHz
1112
#define MICROPY_HW_CLK_PLLM (8)
@@ -69,4 +70,5 @@
6970
#define MICROPY_HW_SDCARD_DETECT_PRESENT (1)
7071

7172
// USB config
73+
#define MICROPY_HW_USB_FS (1)
7274
#define MICROPY_HW_USB_OTG_ID_PIN (pin_A10)

ports/stm32/boards/HYDRABUS/stm32f4xx_hal_conf.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@
4646
/* Exported types ------------------------------------------------------------*/
4747
/* Exported constants --------------------------------------------------------*/
4848

49-
#define USE_USB_FS
50-
5149
/* ########################## Module Selection ############################## */
5250
/**
5351
* @brief This is the list of modules to be used in the HAL driver

ports/stm32/boards/LIMIFROG/mpconfigboard.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#define MICROPY_HW_HAS_FLASH (1)
66
#define MICROPY_HW_ENABLE_RNG (1)
77
#define MICROPY_HW_ENABLE_RTC (1)
8+
#define MICROPY_HW_ENABLE_USB (1)
89

910
#define MICROPY_BOARD_EARLY_INIT LIMIFROG_board_early_init
1011
void LIMIFROG_board_early_init(void);
@@ -50,4 +51,5 @@ void LIMIFROG_board_early_init(void);
5051
#define MICROPY_HW_LED_OFF(pin) (mp_hal_pin_low(pin))
5152

5253
// USB config
54+
#define MICROPY_HW_USB_FS (1)
5355
// #define MICROPY_HW_USB_OTG_ID_PIN (pin_C12) // This is not the official ID Pin which should be PA10

ports/stm32/boards/LIMIFROG/stm32l4xx_hal_conf.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
extern "C" {
4646
#endif
4747

48-
#define USE_USB_FS
4948
/* Exported types ------------------------------------------------------------*/
5049
/* Exported constants --------------------------------------------------------*/
5150

0 commit comments

Comments
 (0)