diff options
| author | Rami Ali | 2016-12-05 12:21:45 +1100 |
|---|---|---|
| committer | Damien George | 2016-12-05 14:26:41 +1100 |
| commit | 27a503f63284a1751f20d7f5295690fec5e1c462 (patch) | |
| tree | ff1f58013623cd2ca14b09620d6fc9f712edba10 /stmhal/boards/STM32F7DISC/mpconfigboard.h | |
| parent | 4fc607a1d77e1cf9e1fe1c037ad28d309c81113e (diff) | |
stmhal: Refactor UART configuration to use pin objects.
This follows the pattern of other peripherals (I2C, SPI) to specify the
pins using pin objects instead of a pair of GPIO port and pin number. It
makes it easier to customise the UART pins for a particular board.
Diffstat (limited to 'stmhal/boards/STM32F7DISC/mpconfigboard.h')
| -rw-r--r-- | stmhal/boards/STM32F7DISC/mpconfigboard.h | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/stmhal/boards/STM32F7DISC/mpconfigboard.h b/stmhal/boards/STM32F7DISC/mpconfigboard.h index acdc4d005..38665055f 100644 --- a/stmhal/boards/STM32F7DISC/mpconfigboard.h +++ b/stmhal/boards/STM32F7DISC/mpconfigboard.h @@ -35,16 +35,12 @@ void STM32F7DISC_board_early_init(void); #define MICROPY_HW_FLASH_LATENCY FLASH_LATENCY_7 // 210-216 MHz needs 7 wait states // UART config -#define MICROPY_HW_UART1_TX_PORT (GPIOA) -#define MICROPY_HW_UART1_TX_PIN (GPIO_PIN_9) -#define MICROPY_HW_UART1_RX_PORT (GPIOB) -#define MICROPY_HW_UART1_RX_PIN (GPIO_PIN_7) - -#define MICROPY_HW_UART6_PORT (GPIOC) -#define MICROPY_HW_UART6_PINS (GPIO_PIN_6 | GPIO_PIN_7) -#define MICROPY_HW_UART7_PORT (GPIOF) -#define MICROPY_HW_UART7_PINS (GPIO_PIN_6 | GPIO_PIN_7) - +#define MICROPY_HW_UART1_TX (pin_A9) +#define MICROPY_HW_UART1_RX (pin_B7) +#define MICROPY_HW_UART6_TX (pin_C6) +#define MICROPY_HW_UART6_RX (pin_C7) +#define MICROPY_HW_UART7_TX (pin_F6) +#define MICROPY_HW_UART7_RX (pin_F7) #define MICROPY_HW_UART_REPL PYB_UART_1 #define MICROPY_HW_UART_REPL_BAUD 115200 |
