diff options
| author | bernard.xiong <[email protected]> | 2009-08-20 05:45:18 +0000 |
|---|---|---|
| committer | bernard.xiong <[email protected]> | 2009-08-20 05:45:18 +0000 |
| commit | 3e58b1940f1449f36f1b6a99a7335313a725fcf3 (patch) | |
| tree | 6836b65ecb78d30ee9456ad7680ea2d3d0de4787 /libcpu | |
| parent | 34f993d35afa001a3de17934f9a283ecf26c0533 (diff) | |
fix the returned value of rt_serial_getc function which is reported by macroz.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@24 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'libcpu')
| -rw-r--r-- | libcpu/arm/stm32/serial.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libcpu/arm/stm32/serial.c b/libcpu/arm/stm32/serial.c index 41f8e74a90..3140a8446a 100644 --- a/libcpu/arm/stm32/serial.c +++ b/libcpu/arm/stm32/serial.c @@ -27,10 +27,10 @@ static void rt_serial_enable_dma(DMA_Channel_TypeDef* dma_channel, *
* @return the read char
*/
-char rt_serial_getc(struct stm32_serial_device* uart)
+int rt_serial_getc(struct stm32_serial_device* uart)
{
rt_base_t level;
- char ch = 0;
+ int ch = -1;
/* disable interrupt */
level = rt_hw_interrupt_disable();
|
