#ifndef __UART_H #define __UART_H #include "includes.h" #include "interface.h" #include "stm32f4xx_usart.h" #include "string.h" #define UART1_REC_LEN 128 #define UART1_TX_LEN 128 #define UART3_REC_LEN 128 #define UART3_TX_LEN 128 #define MAX_MSG_NUM 10 #define UART1_DMA DMA_Channel_4 #define UART1_DMA_RXCH DMA2_Stream5 #define UART1_DMA_TXCH DMA2_Stream7 #define UART3_DMA DMA_Channel_4 #define UART3_DMA_RXCH DMA1_Stream1 #define UART3_DMA_TXCH DMA1_Stream3 typedef struct { INT8U buf[128]; INT8U len; } UartFrame_TypeDef; void uart1_init(void); void uart3_init(void); void Uart1_dma_Send_Data(const INT8U *buf, INT16U len); void Uart3_dma_Send_Data(const INT8U *buf, INT16U len); #endif