stm32/uart: Add support for LPUART1 on L0, L4, H7 and WB MCUs.

Add LPUART1 as a standard UART.  No low power features are supported, yet.
LPUART1 is enabled as the next available UART after the standard U(S)ARTs:

    STM32WB:      LPUART1 = UART(2)
    STM32L0:      LPUART1 = UART(6)
    STM32L4:      LPUART1 = UART(6)
    STM32H7:      LPUART1 = UART(9)

On all ports: LPUART1 = machine.UART('LP1')

LPUART1 is enabled by defining MICROPY_HW_LPUART1_TX and
MICROPY_HW_LPUART1_RX in mpconfigboard.h.

Signed-off-by: Chris Mason <c.mason@inchipdesign.com.au>
This commit is contained in:
Chris Mason
2021-02-17 11:07:34 +11:00
committed by Damien George
parent 1342debb9b
commit 9d674cf7ab
8 changed files with 108 additions and 7 deletions

View File

@@ -40,6 +40,9 @@ typedef enum {
PYB_UART_8 = 8,
PYB_UART_9 = 9,
PYB_UART_10 = 10,
#ifdef LPUART1
PYB_LPUART_1 = MICROPY_HW_MAX_UART + 1,
#endif
} pyb_uart_t;
#define CHAR_WIDTH_8BIT (0)