forked from SZV10X_Software/SZV103_FM33A0xxEV_SiZhu

wujiazhi
2024-06-13 72def895431ad7a08e635b11f3da738e2b2c4618
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef _UART_H_
#define _UART_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
// ºìÍâRX
#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
 
// Ö÷´ÓRX
#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
 
// Ô¶´«RX
#define GPRS_RX_PORT GPIOA
#define GPRS_RX_PIN GPIO_Pin_9
 
#pragma pack(1)
 
#pragma pack()
 
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);
void Uart3_Init(void);
void Uart3_RX_DMA_CH1_Init(void);
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 Usmart_RecvDataProcess(UC_RECV_PARA_T *usmart_recv_para_p);
 
#endif