diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-02-06 21:28:07 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-02-06 21:28:07 +0000 |
commit | 35b0454ddb7ac3b9a7b4142c7c04be4570a29798 (patch) | |
tree | 8b0cd7e096be7b458ea7a4575270c4e214ffe47a /ports/ARM7-AT91SAM7X | |
parent | cfe5d367c22371619ddc2603d1e363c7819d2aa3 (diff) | |
download | ChibiOS-35b0454ddb7ac3b9a7b4142c7c04be4570a29798.tar.gz ChibiOS-35b0454ddb7ac3b9a7b4142c7c04be4570a29798.tar.bz2 ChibiOS-35b0454ddb7ac3b9a7b4142c7c04be4570a29798.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@731 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'ports/ARM7-AT91SAM7X')
-rw-r--r-- | ports/ARM7-AT91SAM7X/sam7x_serial.c | 4 | ||||
-rw-r--r-- | ports/ARM7-AT91SAM7X/sam7x_serial.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/ports/ARM7-AT91SAM7X/sam7x_serial.c b/ports/ARM7-AT91SAM7X/sam7x_serial.c index 146d73f1b..6b904225a 100644 --- a/ports/ARM7-AT91SAM7X/sam7x_serial.c +++ b/ports/ARM7-AT91SAM7X/sam7x_serial.c @@ -140,11 +140,11 @@ void sam7x_set_usart(AT91PS_USART u, int speed, int mr) { u->US_CR = AT91C_US_RSTRX | AT91C_US_RSTTX | AT91C_US_RSTSTA;
/* New parameters setup.*/
- if (mode & AT91C_US_OVER)
+ if (mr & AT91C_US_OVER)
u->US_BRGR = MCK / (speed * 8);
else
u->US_BRGR = MCK / (speed * 16);
- u->US_MR = mode;
+ u->US_MR = mr;
u->US_RTOR = 0;
u->US_TTGR = 0;
diff --git a/ports/ARM7-AT91SAM7X/sam7x_serial.h b/ports/ARM7-AT91SAM7X/sam7x_serial.h index 397fc9d3f..21db13635 100644 --- a/ports/ARM7-AT91SAM7X/sam7x_serial.h +++ b/ports/ARM7-AT91SAM7X/sam7x_serial.h @@ -70,7 +70,7 @@ extern "C" {
#endif
void sam7x_serial_init(int prio0, int prio1);
- void sam7x_set_usart(AT91PS_USART u, int speed, int mode);
+ void sam7x_set_usart(AT91PS_USART u, int speed, int mr);
CH_IRQ_HANDLER(UART0IrqHandler);
CH_IRQ_HANDLER(UART1IrqHandler);
#ifdef __cplusplus
|