diff options
| author | bernard <[email protected]> | 2014-07-18 06:45:54 +0800 |
|---|---|---|
| committer | bernard <[email protected]> | 2014-07-18 06:45:54 +0800 |
| commit | c45f5a249089e1e453f358bcab052ddce8a8dff7 (patch) | |
| tree | c5f7b1a6e234759648eca0456039a930a5435134 /bsp/rm48x50/drivers | |
| parent | fc6747ef6c665195cf3b8fc1c40e93da60872519 (diff) | |
[Drivers] re-write serial framework.
Diffstat (limited to 'bsp/rm48x50/drivers')
| -rw-r--r-- | bsp/rm48x50/drivers/drv_uart.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bsp/rm48x50/drivers/drv_uart.c b/bsp/rm48x50/drivers/drv_uart.c index 3f0237e648..d42a52bc6b 100644 --- a/bsp/rm48x50/drivers/drv_uart.c +++ b/bsp/rm48x50/drivers/drv_uart.c @@ -178,11 +178,10 @@ static const struct rt_uart_ops _sci_ops = static void _irq_wrapper(int vector, void *param) { - rt_hw_serial_isr((struct rt_serial_device*)param); + rt_hw_serial_isr((struct rt_serial_device*)param, RT_SERIAL_EVENT_RX_IND); } static struct rt_serial_device _sci2_serial; -static struct serial_ringbuffer _sci2_int_rx; void rt_hw_uart_init(void) { @@ -195,9 +194,9 @@ void rt_hw_uart_init(void) config.parity = PARITY_NONE; config.stop_bits = STOP_BITS_1; config.invert = NRZ_NORMAL; + config.bufsz = RT_SERIAL_RB_BUFSZ; _sci2_serial.ops = &_sci_ops; - _sci2_serial.int_rx = &_sci2_int_rx; _sci2_serial.config = config; rt_hw_serial_register(&_sci2_serial, "sci2", @@ -208,3 +207,4 @@ void rt_hw_uart_init(void) rt_hw_interrupt_install(SCI_INT_VEC, _irq_wrapper, &_sci2_serial, "sci2"); rt_hw_interrupt_umask(SCI_INT_VEC); } + |
