兆易创新GD32F450控制器(3)--- 串口DMA通信

我是采用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,
	 .

你可能感兴趣的:(C,ARM,单片机,stm32,嵌入式硬件)