1.初始化时定义
myuartParams.writeMode = UART_MODE_CALLBACK;
myuartParams.writeCallback = hal_uart_Callback_Write;
2.调用TX发送任务函数如下:
{
UART_readCancel(myuart);
UART_writeCancel(myuart);
ReadWriteflag=UART_WRITESTATE;
UART_write(myuart, head, len);
}
3.数据一直发送,一直在串口回调函数里。(
)
hal_uart_Callback_Write