diff options
| author | qiuyiuestc <[email protected]> | 2010-07-18 00:50:35 +0000 |
|---|---|---|
| committer | qiuyiuestc <[email protected]> | 2010-07-18 00:50:35 +0000 |
| commit | fd12462d57140c6ea800cc741646ccc9f68c5509 (patch) | |
| tree | 1b9de507e4afca5fba1bf9b7d7d5f6ea4f7bfea9 /libcpu | |
| parent | a31474b019e3da5f36783151c35329e625e8ab56 (diff) | |
fix serial issue
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@801 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'libcpu')
| -rw-r--r-- | libcpu/arm/s3c24x0/s3c24x0.h | 4 | ||||
| -rw-r--r-- | libcpu/arm/s3c24x0/serial.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/libcpu/arm/s3c24x0/s3c24x0.h b/libcpu/arm/s3c24x0/s3c24x0.h index f9e779cd23..3560c2b92f 100644 --- a/libcpu/arm/s3c24x0/s3c24x0.h +++ b/libcpu/arm/s3c24x0/s3c24x0.h @@ -141,7 +141,7 @@ extern "C" { #define NFECC2 (*(volatile U8 *)0x4e000016)
// UART
-#define U0BASE (volatile unsigned *)0x50000000 //UART 0 Line control
+#define U0BASE (*(volatile unsigned *)0x50000000) //UART 0 Line control
#define ULCON0 (*(volatile unsigned *)0x50000000) //UART 0 Line control
#define UCON0 (*(volatile unsigned *)0x50000004) //UART 0 Control
#define UFCON0 (*(volatile unsigned *)0x50000008) //UART 0 FIFO control
@@ -152,7 +152,7 @@ extern "C" { #define UMSTAT0 (*(volatile unsigned *)0x5000001c) //UART 0 Modem status
#define UBRD0 (*(volatile unsigned *)0x50000028) //UART 0 Baud ate divisor
-#define U1BASE *(volatile unsigned *)0x50004000 //UART 1 Line control
+#define U1BASE (*(volatile unsigned *)0x50004000) //UART 1 Line control
#define ULCON1 (*(volatile unsigned *)0x50004000) //UART 1 Line control
#define UCON1 (*(volatile unsigned *)0x50004004) //UART 1 Control
#define UFCON1 (*(volatile unsigned *)0x50004008) //UART 1 FIFO control
diff --git a/libcpu/arm/s3c24x0/serial.c b/libcpu/arm/s3c24x0/serial.c index 6ba582cc9b..688f23c9f9 100644 --- a/libcpu/arm/s3c24x0/serial.c +++ b/libcpu/arm/s3c24x0/serial.c @@ -198,7 +198,7 @@ static rt_size_t rt_serial_write (rt_device_t dev, rt_off_t pos, const void* buf } while (!(uart->uart_device->ustat & USTAT_TXB_EMPTY)); - uart->uart_device->utxh = (*ptr & 0x1FF); + uart->uart_device->utxh = (*ptr & 0xFF); ++ptr; --size; } |
