This is an automated email from the ASF dual-hosted git repository.

linguini 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 6238da1355b arch/tricore: remove magic number in tr3xx uart config
6238da1355b is described below

commit 6238da1355b6feb4b819be1ea3bdb3bd799ae850
Author: xiezhanpeng3 <[email protected]>
AuthorDate: Tue Nov 4 10:23:29 2025 +0800

    arch/tricore: remove magic number in tr3xx uart config
    
    Replace magic number with macro for better code readability.
    
    Signed-off-by: xiezhanpeng3 <[email protected]>
---
 arch/tricore/include/tc397/irq.h      | 1 +
 arch/tricore/src/tc3xx/tc3xx_serial.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/tricore/include/tc397/irq.h b/arch/tricore/include/tc397/irq.h
index 108d59ee0e6..7b292b7e37e 100644
--- a/arch/tricore/include/tc397/irq.h
+++ b/arch/tricore/include/tc397/irq.h
@@ -34,6 +34,7 @@
 /****************************************************************************
  * Pre-processor Prototypes
  ****************************************************************************/
+#define TRICORE_UART_RX_IRQ      21
 
 /****************************************************************************
  * Public Types
diff --git a/arch/tricore/src/tc3xx/tc3xx_serial.c 
b/arch/tricore/src/tc3xx/tc3xx_serial.c
index e1eb8c0e817..e20433ccacb 100644
--- a/arch/tricore/src/tc3xx/tc3xx_serial.c
+++ b/arch/tricore/src/tc3xx/tc3xx_serial.c
@@ -179,7 +179,7 @@ static struct up_dev_s g_uart0priv =
   .uartbase  = &MODULE_ASCLIN0,
   .pins      = &g_uart0_pins,
   .baud      = CONFIG_UART0_BAUD,
-  .irq       = 21,
+  .irq       = TRICORE_UART_RX_IRQ,
 };
 
 static uart_dev_t g_uart0port =

Reply via email to