2021-10-01 00:21:50 +08:00

25 lines
670 B
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef __USART1_H
#define __USART1_H
#include "stdio.h"
#include "common.h"
//////////////////////////////////////////////////////////////////////////////////
#define USART1_REC_NUM 255 //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD> 200
extern u8 uart_byte_count; //uart_byte_countҪС<D2AA><D0A1>USART_REC_LEN
extern u8 receive_str[USART1_REC_NUM];
extern UART_HandleTypeDef UART1_Handler; //UART<52><54><EFBFBD><EFBFBD>
#define RXBUFFERSIZE 1 //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>С
extern u8 aRxBuffer[RXBUFFERSIZE];//HAL<41><4C>USART<52><54><EFBFBD><EFBFBD>Buffer
extern u8 UART1_reciveStr[USART1_REC_NUM];
extern u8 UART1_reciveOk;
void uart1_sendStr(char *data);
void uart1_init(u32 bound);
void uart1SendChars(u8 *str, u16 strlen);
#endif