发布时间:2023-01-16 15:30
我是采用DMA空闲中断来接收不定长的数据长度,仅设置了DMA串口接收,没有DMA发送设置。
#include "usart.h"
#include "gd32f450i_eval.h"
#include "dataprocess_app.h"
#include "stdio.h"
#include "string.h"
/*
* 结构体实例初始化
*/
//T_COMOptr COM0 ={
// .isReFinish = FALSE,
// .renum = 0,
// .ComInit = Usart0_Init,
// .SendByte = Usart0_Send,
// .SendBuf = Usart0_Sendbuf,
//};
T_COMOptr COM1 ={
.isReFinish = FALSE,
.renum = 0,
.ComInit = Usart1_Init,
.SendByte = Usart1_Send,
.SendBuf = Usart1_Sendbuf,
};
T_COMOptr COM2 ={
.isReFinish = FALSE,
.renum = 0,
.ComInit = Usart2_Init,
.SendByte = Usart2_Send,
.SendBuf = Usart2_Sendbuf,
};
T_COMOptr COM3 ={
.isReFinish = FALSE,
.