1234567891011121314151617181920212223242526272829303132 |
- #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 UART1_DMA DMA2
- #define UART1_DMA_RXCH DMA_CH5
- #define UART1_DMA_TXCH DMA_CH7
- #define UART3_DMA DMA2
- #define UART3_DMA_RXCH DMA_CH2
- #define UART3_DMA_TXCH DMA_CH6
- #define MAX_MSG_NUM 10
- 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
|