From 674b331f039eb78028f244d2ebbd07e60c05b65f Mon Sep 17 00:00:00 2001 From: Alan Carvalho de Assis Date: Sat, 25 Nov 2017 18:13:23 -0600 Subject: [PATCH] arm/src/xmc4: Include Alt. Interrupt Enable to RX_EVENTS and rename serial GPIO configurations. --- arch/arm/src/xmc4/xmc4_lowputc.c | 24 ++++++++++++------------ arch/arm/src/xmc4/xmc4_serial.c | 4 ++-- configs/xmc4500-relax/include/board.h | 8 ++++---- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/arch/arm/src/xmc4/xmc4_lowputc.c b/arch/arm/src/xmc4/xmc4_lowputc.c index eda2567e5c..5c67364463 100644 --- a/arch/arm/src/xmc4/xmc4_lowputc.c +++ b/arch/arm/src/xmc4/xmc4_lowputc.c @@ -201,28 +201,28 @@ void xmc4_lowsetup(void) */ #ifdef HAVE_UART0 - (void)xmc4_gpio_config(GPIO_UART0_RXD0); - (void)xmc4_gpio_config(GPIO_UART0_TXD0); + (void)xmc4_gpio_config(GPIO_UART0_RXD); + (void)xmc4_gpio_config(GPIO_UART0_TXD); #endif #ifdef HAVE_UART1 - (void)xmc4_gpio_config(GPIO_UART0_RXD1); - (void)xmc4_gpio_config(GPIO_UART0_TXD1); + (void)xmc4_gpio_config(GPIO_UART1_RXD); + (void)xmc4_gpio_config(GPIO_UART1_TXD); #endif #ifdef HAVE_UART2 - (void)xmc4_gpio_config(GPIO_UART0_RXD2); - (void)xmc4_gpio_config(GPIO_UART0_TXD2); + (void)xmc4_gpio_config(GPIO_UART2_RXD); + (void)xmc4_gpio_config(GPIO_UART2_TXD); #endif #ifdef HAVE_UART3 - (void)xmc4_gpio_config(GPIO_UART0_RXD3); - (void)xmc4_gpio_config(GPIO_UART0_TXD3); + (void)xmc4_gpio_config(GPIO_UART3_RXD); + (void)xmc4_gpio_config(GPIO_UART3_TXD); #endif #ifdef HAVE_UART4 - (void)xmc4_gpio_config(GPIO_UART0_RXD4); - (void)xmc4_gpio_config(GPIO_UART0_TXD4); + (void)xmc4_gpio_config(GPIO_UART4_RXD); + (void)xmc4_gpio_config(GPIO_UART4_TXD); #endif #ifdef HAVE_UART5 - (void)xmc4_gpio_config(GPIO_UART0_RXD5); - (void)xmc4_gpio_config(GPIO_UART0_TXD5); + (void)xmc4_gpio_config(GPIO_UART5_RXD); + (void)xmc4_gpio_config(GPIO_UART5_TXD); #endif #ifdef HAVE_UART_CONSOLE diff --git a/arch/arm/src/xmc4/xmc4_serial.c b/arch/arm/src/xmc4/xmc4_serial.c index f983cab6a4..8b68dc0717 100644 --- a/arch/arm/src/xmc4/xmc4_serial.c +++ b/arch/arm/src/xmc4/xmc4_serial.c @@ -226,9 +226,9 @@ /* Event sets */ #ifdef CONFIG_DEBUG_FEATURES -# define CCR_RX_EVENTS (USIC_CCR_RIEN | USIC_CCR_DLIEN) +# define CCR_RX_EVENTS (USIC_CCR_RIEN | USIC_CCR_AIEN | USIC_CCR_DLIEN) #else -# define CCR_RX_EVENTS (USIC_CCR_RIEN) +# define CCR_RX_EVENTS (USIC_CCR_RIEN | USIC_CCR_AIEN) #endif #define CCR_TX_EVENTS (USIC_CCR_TBIEN) diff --git a/configs/xmc4500-relax/include/board.h b/configs/xmc4500-relax/include/board.h index 5db89b9bd1..8559773c87 100644 --- a/configs/xmc4500-relax/include/board.h +++ b/configs/xmc4500-relax/include/board.h @@ -327,8 +327,8 @@ */ #define BOARD_UART0_DX USIC_DXB -#define GPIO_UART0_RXD0 GPIO_U0C0_DX0B -#define GPIO_UART0_TXD0 (GPIO_U0C0_DOUT0_3 | GPIO_PADA1P_STRONGSOFT | GPIO_OUTPUT_SET) +#define GPIO_UART0_RXD GPIO_U0C0_DX0B +#define GPIO_UART0_TXD (GPIO_U0C0_DOUT0_3 | GPIO_PADA1P_STRONGSOFT | GPIO_OUTPUT_SET) /* USIC1 CH1 is used as UART3 * @@ -337,8 +337,8 @@ */ #define BOARD_UART3_DX USIC_DXD -#define GPIO_UART0_RXD3 (GPIO_U1C1_DX0D | GPIO_INPUT_PULLUP) -#define GPIO_UART0_TXD3 (GPIO_U1C1_DOUT0_2 | GPIO_PADA1P_STRONGSOFT | GPIO_OUTPUT_SET) +#define GPIO_UART3_RXD (GPIO_U1C1_DX0D | GPIO_INPUT_PULLUP) +#define GPIO_UART3_TXD (GPIO_U1C1_DOUT0_2 | GPIO_PADA1P_STRONGSOFT | GPIO_OUTPUT_SET) /************************************************************************************ * Public Data