From 0b9c86905b86becbd50a13d4e69470d7434a5dcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cduanqinshuo=E2=80=9D?= <“duanqinshuo@lixiang.com”> Date: Thu, 13 Nov 2025 20:26:57 +0800 Subject: [PATCH] arch/tricore: Fix specific definitions in the generic UART module We found that specific chip pin definitions were used in the generic UART source file. Since pin definitions vary across different chips, the UART pin definitions have been moved to the corresponding chip-specific directory. Co-authored-by: Chengdong Wang Signed-off-by: Qinshuo Duan --- arch/tricore/src/tc397/chip.h | 3 +++ arch/tricore/src/tc3xx/tc3xx_serial.c | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/tricore/src/tc397/chip.h b/arch/tricore/src/tc397/chip.h index 3fe0c891a6b..1521ff42374 100644 --- a/arch/tricore/src/tc397/chip.h +++ b/arch/tricore/src/tc397/chip.h @@ -27,4 +27,7 @@ * Included Files ****************************************************************************/ +#define UART_PIN_RX IfxAsclin0_RXA_P14_1_IN /* UART receive port pin */ +#define UART_PIN_TX IfxAsclin0_TX_P14_0_OUT /* UART transmit port pin */ + #endif /* __ARCH_TRICORE_SRC_TC397_CHIP_H */ diff --git a/arch/tricore/src/tc3xx/tc3xx_serial.c b/arch/tricore/src/tc3xx/tc3xx_serial.c index e20433ccacb..034cae70684 100644 --- a/arch/tricore/src/tc3xx/tc3xx_serial.c +++ b/arch/tricore/src/tc3xx/tc3xx_serial.c @@ -45,6 +45,8 @@ #include "Asclin/Asc/IfxAsclin_Asc.h" +#include + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -160,9 +162,6 @@ static char g_uart0txbuffer[CONFIG_UART0_TXBUFSIZE]; #ifdef CONFIG_TC3XX_UART0 -#define UART_PIN_RX IfxAsclin0_RXA_P14_1_IN /* UART receive port pin */ -#define UART_PIN_TX IfxAsclin0_TX_P14_0_OUT /* UART transmit port pin */ - /* Pin configuration */ static const IfxAsclin_Asc_Pins g_uart0_pins =