forked from SZV10X_Software/SZV103_FM33A0xxEV_SiZhu

wujiazhi
2024-06-13 72def895431ad7a08e635b11f3da738e2b2c4618
HARDWARE/UART/uart.h
@@ -1,44 +1,40 @@
#ifndef _UART_H_
#define _UART_H_
#include "define_all.h"
#include "define_all.h"
#include "upper_computer.h"
#define UART0_RECV_BUFF_LEN_MAX 200
// ºìÍâTX UART0/LPUART0
#define IR_TX_PORT          GPIOF
#define IR_TX_PIN          GPIO_Pin_4
#define IR_TX_PORT GPIOF
#define IR_TX_PIN GPIO_Pin_4
// ºìÍâRX
#define IR_RX_PORT          GPIOF
#define IR_RX_PIN          GPIO_Pin_3
#define IR_RX_PORT GPIOF
#define IR_RX_PIN GPIO_Pin_3
// Ö÷´ÓTX UART3
#define MAIN_TX_PORT       GPIOC
#define MAIN_TX_PIN       GPIO_Pin_10
#define MAIN_TX_PORT GPIOC
#define MAIN_TX_PIN GPIO_Pin_10
// Ö÷´ÓRX
#define MAIN_RX_PORT       GPIOC
#define MAIN_RX_PIN       GPIO_Pin_11
#define MAIN_RX_PORT GPIOC
#define MAIN_RX_PIN GPIO_Pin_11
// Ô¶´«TX UART5
#define GPRS_TX_PORT       GPIOA
#define GPRS_TX_PIN       GPIO_Pin_8
#define GPRS_TX_PORT GPIOA
#define GPRS_TX_PIN GPIO_Pin_8
// Ô¶´«RX
#define GPRS_RX_PORT       GPIOA
#define GPRS_RX_PIN       GPIO_Pin_9
#define GPRS_RX_PORT GPIOA
#define GPRS_RX_PIN GPIO_Pin_9
#pragma pack(1)
#pragma pack()
extern u16 USART_RX_STA;               //½ÓÊÕ״̬±ê¼Ç
extern uint8_t  USART1_RX_BUF[UART0_RECV_BUFF_LEN_MAX]; //½ÓÊÕ»º³å,×î´óUSART_REC_LEN¸ö×Ö½Ú.Ä©×Ö½ÚΪ»»Ðзû
extern u16 USART_RX_STA;                          // ½ÓÊÕ״̬±ê¼Ç
extern u8 USART1_RX_BUF[UART0_RECV_BUFF_LEN_MAX]; // ½ÓÊÕ»º³å,×î´óUSART_REC_LEN¸ö×Ö½Ú.Ä©×Ö½ÚΪ»»Ðзû
void Uart0_Init(void);
void Uart0_RX_DMA_CH7_Init(void);
@@ -47,10 +43,8 @@
void Uart5_Init(void);
void Uart5_RX_DMA_CH5_Init(void);
void UARTx_SendData_Normal(UART_Type* UARTx,uint8_t * pSendData,uint16_t send_len);
void UARTx_SendData_Normal(UART_Type *UARTx, uint8_t *pSendData, uint16_t send_len);
//void Usmart_RecvDataProcess(UC_RECV_PARA_T *usmart_recv_para_p);
void Usmart_RecvDataProcess(UC_RECV_PARA_T *usmart_recv_para_p);
#endif