summaryrefslogtreecommitdiff
path: root/bsp/sam7x
diff options
context:
space:
mode:
authormbbill <[email protected]>2009-12-31 16:14:32 +0000
committermbbill <[email protected]>2009-12-31 16:14:32 +0000
commitf1d2ac8598ced82e25a9831c596d9beb87b229c8 (patch)
tree57e7cc9e37d2dad6c854d90b4f80cd51236551b3 /bsp/sam7x
parent620cde72e30050c0996bf1209e6345d5c783f28d (diff)
FIX: Fixed an assert error.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@271 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'bsp/sam7x')
-rw-r--r--bsp/sam7x/serial.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bsp/sam7x/serial.c b/bsp/sam7x/serial.c
index afc61c8165..5a16778bf1 100644
--- a/bsp/sam7x/serial.c
+++ b/bsp/sam7x/serial.c
@@ -137,8 +137,8 @@ static rt_err_t rt_serial_init (rt_device_t dev)
RT_ASSERT(serial != RT_NULL);
/* must be US0 or US1 */
- RT_ASSERT((serial->peripheral_id != AT91C_ID_US0) &&
- (serial->peripheral_id != AT91C_ID_US1));
+ RT_ASSERT((serial->peripheral_id == AT91C_ID_US0) ||
+ (serial->peripheral_id == AT91C_ID_US1));
/* Enable Clock for USART */
AT91C_PMC_PCER = 1 << serial->peripheral_id;