【renesas】Fix initialize assertion problem of serial V2
This commit is contained in:
parent
34a05bfdf7
commit
a5bf680e2b
|
@ -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
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ CPK-RA2L1 评估板可通过灵活配置软件包和 IDE,可帮助用户对[RA
|
|||
|
||||
> 注意:此工程需要使用 J-Flash Lite 工具烧录程序。建议使用 V7.50 及以上版本烧录工程。[J-Link 下载链接](https://www.segger.com/downloads/jlink/)
|
||||
|
||||
- 下载:打开 J-Flash lite 工具,选择芯片型号 R7FA6M4AF,点击 OK 进入工具。选择 BSP 目录下 MDK 编译出的 /object/ra6m4.hex 文件,点击 Program Device 按钮开始烧录。具体操作过程可参考下图步骤:
|
||||
- 下载:打开 J-Flash lite 工具,选择芯片型号 R7FA2L1AB,点击 OK 进入工具。选择 BSP 目录下 MDK 编译出的 /object/ra6m4.hex 文件,点击 Program Device 按钮开始烧录。具体操作过程可参考下图步骤:
|
||||
|
||||
![image-20211011182434519](docs/picture/jflash.png)
|
||||
|
||||
|
|
Loading…
Reference in New Issue