diff options
| author | Rbb666 <[email protected]> | 2022-08-31 14:06:41 +0800 |
|---|---|---|
| committer | guo <[email protected]> | 2022-08-31 14:15:17 +0800 |
| commit | a5bf680e2bec6bc31ea2c4e2e01d91b493ccb458 (patch) | |
| tree | e299c9ee6c3961419018376077c81dfd9007b469 /bsp/renesas/libraries | |
| parent | 34a05bfdf744ec2660b7f773f75006abf9866d1e (diff) | |
【renesas】Fix initialize assertion problem of serial V2
Diffstat (limited to 'bsp/renesas/libraries')
| -rw-r--r-- | bsp/renesas/libraries/HAL_Drivers/drv_usart_v2.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/bsp/renesas/libraries/HAL_Drivers/drv_usart_v2.c b/bsp/renesas/libraries/HAL_Drivers/drv_usart_v2.c index dca1535d32..8069b6293a 100644 --- a/bsp/renesas/libraries/HAL_Drivers/drv_usart_v2.c +++ b/bsp/renesas/libraries/HAL_Drivers/drv_usart_v2.c @@ -236,6 +236,22 @@ static int ra_uart_getc(struct rt_serial_device *serial) return RT_EOK; } +static rt_size_t ra_uart_transmit(struct rt_serial_device *serial, + rt_uint8_t *buf, + rt_size_t size, + rt_uint32_t tx_flag) +{ + struct ra_uart *uart; + + RT_ASSERT(serial != RT_NULL); + RT_ASSERT(buf != RT_NULL); + uart = rt_container_of(serial, struct ra_uart, serial); + + ra_uart_control(serial, RT_DEVICE_CTRL_SET_INT, (void *)tx_flag); + + return size; +} + #ifdef BSP_USING_UART0 void user_uart0_callback(uart_callback_args_t *p_args) { @@ -472,6 +488,7 @@ static const struct rt_uart_ops ra_uart_ops = .control = ra_uart_control, .putc = ra_uart_putc, .getc = ra_uart_getc, + .transmit = ra_uart_transmit }; |
