diff options
| author | Aubr.Cool <[email protected]> | 2015-03-26 13:16:31 +0800 |
|---|---|---|
| committer | Aubr.Cool <[email protected]> | 2015-03-26 13:26:13 +0800 |
| commit | 5d6ac1ed37f06f6b4aeac6b75011d74b03f93587 (patch) | |
| tree | 34def3bef5c5fc4a9b7594eba5a2729f8c86aab0 | |
| parent | 1931999f64f8296fae472982bdfd36fb64b87988 (diff) | |
correct rx_fifo init size error
| -rw-r--r-- | components/drivers/serial/serial.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/components/drivers/serial/serial.c b/components/drivers/serial/serial.c index bcdd4db519..8744aa4657 100644 --- a/components/drivers/serial/serial.c +++ b/components/drivers/serial/serial.c @@ -279,7 +279,7 @@ static rt_err_t rt_serial_open(struct rt_device *dev, rt_uint16_t oflag) serial->config.bufsz); RT_ASSERT(rx_fifo != RT_NULL); rx_fifo->buffer = (rt_uint8_t*) (rx_fifo + 1); - rt_memset(rx_fifo->buffer, 0, RT_SERIAL_RB_BUFSZ); + rt_memset(rx_fifo->buffer, 0, serial->config.bufsz); rx_fifo->put_index = 0; rx_fifo->get_index = 0; |
