From 0c34de8478ce67d95f6bef3d239b76204c1dbdc2 Mon Sep 17 00:00:00 2001 From: asterix Date: Fri, 26 Oct 2007 17:03:59 +0000 Subject: [PATCH] Explicit USART pins name in at91sam7s256.h. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@949 38d2e660-2303-0410-9eaa-f027e97ec537 --- cpu/arm/drv/ser_at91.c | 4 ++-- cpu/arm/io/at91sam7s256.h | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/cpu/arm/drv/ser_at91.c b/cpu/arm/drv/ser_at91.c index 339ce659..c381b9e0 100644 --- a/cpu/arm/drv/ser_at91.c +++ b/cpu/arm/drv/ser_at91.c @@ -109,7 +109,7 @@ #warning Check USART0 pins! #endif #define SER_UART0_BUS_TXINIT do { \ - PIOA_PDR = BV(5) | BV(6); \ + PIOA_PDR = BV(RXD0) | BV(TXD0); \ US0_CR = BV(US_RSTRX) | BV(US_RSTTX); \ US0_MR = US_CHMODE_NORMAL | US_CHRL_8 | US_NBSTOP_1; \ US0_CR = BV(US_RXEN) | BV(US_TXEN); \ @@ -177,7 +177,7 @@ #warning Check USART1 pins! #endif #define SER_UART1_BUS_TXINIT do { \ - PIOA_PDR = BV(21) | BV(22); \ + PIOA_PDR = BV(RXD1) | BV(TXD1); \ US1_CR = BV(US_RSTRX) | BV(US_RSTTX); \ US1_MR = US_CHMODE_NORMAL | US_CHRL_8 | US_NBSTOP_1; \ US1_CR = BV(US_RXEN) | BV(US_TXEN); \ diff --git a/cpu/arm/io/at91sam7s256.h b/cpu/arm/io/at91sam7s256.h index 41e930af..9c3299de 100644 --- a/cpu/arm/io/at91sam7s256.h +++ b/cpu/arm/io/at91sam7s256.h @@ -142,4 +142,12 @@ #define IRQ1_ID 31 ///< External interrupt 1 ID. /*\}*/ +/** USART pins name */ +/*\{*/ +#define RXD0 5 +#define TXD0 6 +#define RXD1 21 +#define TXD1 22 +/*\}*/ + #endif /* AT91SAM7S256_H */ -- 2.25.1