修改驱动程序

This commit is contained in:
2584532475@qq.com committed 2023-05-19 18:02:00 +08:00
1 parent 063c3fcc07
commit a69c1a58d6
39 files changed
+1627 -641

No files matched your search

+7 -31
View File
@@ -41,33 +41,9 @@ extern "C" {
#define UART_TXE_IRQ 7
#define LPUART_MAX_LENGTH 1200
#define USART1_MAX_LENGTH 1200
#define USART2_MAX_LENGTH 1200
#define USART4_MAX_LENGTH 1200 //
#define USART5_MAX_LENGTH 255
typedef enum Uart_t{
LpUart1 = 0,
LpUart2 = 1,
Uart1 = 2,
Uart2 = 3,
Uart3 = 4,
Uart4 = 5,
Uart5 = 6,
Uart6 = 7,
UartMax = 8,
}Uart_t;
typedef struct UartBuff_t{
char * rxBuf;
uint16_t rxMaxLen;
uint16_t rxLen;
char * txBuf;
uint16_t txMaxLen;
uint16_t txLen;
}UartBuff_t;
/* USER CODE END Includes */
@@ -102,13 +78,13 @@ void MX_USART5_UART_Init(void);
void MX_USART6_UART_Init(void);
/* USER CODE BEGIN Prototypes */
int dbg_printf (char* fmt, ...);
extern void uart_SystemTick (void);
extern int MX_UART_IsReady(Uart_t uart);
extern int MX_UART_ReadData(Uart_t uart, char * buff, int maxLength);
void MX_UART_Clear(Uart_t uart);
void MX_UART_PutChar(Uart_t uart, char ch);
void MX_UART_PutBuffer(Uart_t uart, char *buff,int size);
//extern int MX_UART_IsReady(Uart_t uart);
//extern int MX_UART_ReadData(Uart_t uart, char * buff, int maxLength);
//void MX_UART_Clear(Uart_t uart);
//void MX_UART_PutChar(Uart_t uart, char ch);
//void MX_UART_PutBuffer(Uart_t uart, char *buff,int size);
/* USER CODE END Prototypes */
#ifdef __cplusplus