This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 0b9c86905b8 arch/tricore: Fix specific definitions in the generic UART
module
0b9c86905b8 is described below
commit 0b9c86905b86becbd50a13d4e69470d7434a5dcf
Author: “duanqinshuo” <“[email protected]”>
AuthorDate: Thu Nov 13 20:26:57 2025 +0800
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 <[email protected]>
Signed-off-by: Qinshuo Duan <[email protected]>
---
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 <chip.h>
+
/****************************************************************************
* 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 =