Skip to content

Commit

Permalink
STM32 NUCLEO F413ZH and L433RC : STDIO configuration
Browse files Browse the repository at this point in the history
#5795 patches are missing for these 2 targets
STDIO_UART_TX and STDIO_UART_RX can be now user defined
  • Loading branch information
jeromecoutant authored and adbridge committed Feb 9, 2018
1 parent 5b25f79 commit 73ed270
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 16 deletions.
Expand Up @@ -43,10 +43,6 @@ typedef enum {
UART_10 = (int)UART10_BASE
} UARTName;

#define STDIO_UART_TX PD_8
#define STDIO_UART_RX PD_9
#define STDIO_UART UART_3

typedef enum {
SPI_1 = (int)SPI1_BASE,
SPI_2 = (int)SPI2_BASE,
Expand Down
Expand Up @@ -222,6 +222,18 @@ typedef enum {
D14 = PB_9,
D15 = PB_8,

// STDIO for console print
#ifdef MBED_CONF_TARGET_STDIO_UART_TX
STDIO_UART_TX = MBED_CONF_TARGET_STDIO_UART_TX,
#else
STDIO_UART_TX = PD_8,
#endif
#ifdef MBED_CONF_TARGET_STDIO_UART_RX
STDIO_UART_RX = MBED_CONF_TARGET_STDIO_UART_RX,
#else
STDIO_UART_RX = PD_9,
#endif

// Generic signals namings
LED1 = PB_0, // Green
LED2 = PB_7, // Blue
Expand All @@ -231,10 +243,10 @@ typedef enum {
USER_BUTTON = PC_13,
// Standardized button names
BUTTON1 = USER_BUTTON,
SERIAL_TX = PD_8,
SERIAL_RX = PD_9,
USBTX = SERIAL_TX,
USBRX = SERIAL_RX,
SERIAL_TX = STDIO_UART_TX,
SERIAL_RX = STDIO_UART_RX,
USBTX = STDIO_UART_TX,
USBRX = STDIO_UART_RX,
I2C_SCL = D15,
I2C_SDA = D14,
SPI_MOSI = D11,
Expand Down
Expand Up @@ -51,10 +51,6 @@ typedef enum {
LPUART_1 = (int)LPUART1_BASE
} UARTName;

#define STDIO_UART_TX PA_2
#define STDIO_UART_RX PA_3
#define STDIO_UART UART_2

typedef enum {
SPI_1 = (int)SPI1_BASE,
SPI_2 = (int)SPI2_BASE,
Expand Down
Expand Up @@ -184,17 +184,29 @@ typedef enum {
D12 = PB_14,
D13 = PB_13,

// STDIO for console print
#ifdef MBED_CONF_TARGET_STDIO_UART_TX
STDIO_UART_TX = MBED_CONF_TARGET_STDIO_UART_TX,
#else
STDIO_UART_TX = PA_2,
#endif
#ifdef MBED_CONF_TARGET_STDIO_UART_RX
STDIO_UART_RX = MBED_CONF_TARGET_STDIO_UART_RX,
#else
STDIO_UART_RX = PA_3,
#endif

// Generic signals namings
LED1 = PA_5,
LED2 = PA_5,
LED3 = PA_5,
LED4 = PA_5,
USER_BUTTON = PC_13,
BUTTON1 = USER_BUTTON,
SERIAL_TX = PA_2,
SERIAL_RX = PA_3,
USBTX = SERIAL_TX,
USBRX = SERIAL_RX,
SERIAL_TX = STDIO_UART_TX,
SERIAL_RX = STDIO_UART_RX,
USBTX = STDIO_UART_TX,
USBRX = STDIO_UART_RX,
I2C_SCL = PB_8,
I2C_SDA = PB_7,
SPI_MOSI = D11,
Expand Down

0 comments on commit 73ed270

Please sign in to comment.