FIX: Fixed an assert error.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@271 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
mbbill 2009-12-31 16:14:32 +00:00
parent 620cde72e3
commit f1d2ac8598
1 changed files with 2 additions and 2 deletions

View File

@ -137,8 +137,8 @@ static rt_err_t rt_serial_init (rt_device_t dev)
RT_ASSERT(serial != RT_NULL); RT_ASSERT(serial != RT_NULL);
/* must be US0 or US1 */ /* must be US0 or US1 */
RT_ASSERT((serial->peripheral_id != AT91C_ID_US0) && RT_ASSERT((serial->peripheral_id == AT91C_ID_US0) ||
(serial->peripheral_id != AT91C_ID_US1)); (serial->peripheral_id == AT91C_ID_US1));
/* Enable Clock for USART */ /* Enable Clock for USART */
AT91C_PMC_PCER = 1 << serial->peripheral_id; AT91C_PMC_PCER = 1 << serial->peripheral_id;