STM32F1: STDIO_UART_TX and STDIO_UART_RX can be now user defined

pull/5795/head
jeromecoutant 2017-12-07 13:42:47 +01:00
parent 88678315f1
commit f97d84654e
6 changed files with 45 additions and 22 deletions

View File

@ -46,10 +46,6 @@ typedef enum {
UART_3 = (int)USART3_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

View File

@ -132,15 +132,27 @@ typedef enum {
C14 = PC_14,
C15 = PC_15,
// 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 = PC_13,
LED2 = PC_13,
LED3 = PC_13,
LED4 = PC_13,
SERIAL_TX = PA_9,
SERIAL_RX = PA_10,
USBTX = PA_9,
USBRX = PA_10,
SERIAL_TX = STDIO_UART_TX,
SERIAL_RX = STDIO_UART_RX,
USBTX = STDIO_UART_TX,
USBRX = STDIO_UART_RX,
I2C_SCL = PB_6,
I2C_SDA = PB_7,
SPI_MOSI = PA_7,

View File

@ -46,10 +46,6 @@ typedef enum {
UART_3 = (int)USART3_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

View File

@ -143,6 +143,17 @@ typedef enum {
PB14 = PB_14,
PB15 = PB_15,
// 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 = PC_9,
@ -152,8 +163,8 @@ typedef enum {
USER_BUTTON = PA_0,
// Standardized button names
BUTTON1 = USER_BUTTON,
USBTX = PA_2,
USBRX = PA_3,
USBTX = STDIO_UART_TX,
USBRX = STDIO_UART_RX,
I2C_SCL = PB_6,
I2C_SDA = PB_7,
SPI_MOSI = PB_15,

View File

@ -46,10 +46,6 @@ typedef enum {
UART_3 = (int)USART3_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

View File

@ -119,6 +119,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 = 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,
@ -127,10 +139,10 @@ typedef enum {
USER_BUTTON = PC_13,
// Standardized button names
BUTTON1 = USER_BUTTON,
SERIAL_TX = PA_2,
SERIAL_RX = PA_3,
USBTX = PA_2,
USBRX = PA_3,
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_9,
SPI_MOSI = PA_7,