25 lines
715 B
C
25 lines
715 B
C
#ifndef _usart2_H
|
|
#define _usart2_H
|
|
|
|
#include "general_type.h"
|
|
#include "stm32l1xx_usart.h"
|
|
|
|
#define USART2_MAX_RECV_LEN 400 //最大接收缓存字节数
|
|
#define USART2_MAX_SEND_LEN 400 //最大发送缓存字节数
|
|
#define USART2_RX_EN 1 //0,不接收;1,接收.
|
|
|
|
|
|
|
|
extern char USART2_RX_BUF[USART2_MAX_RECV_LEN]; //接收缓冲,最大USART2_MAX_RECV_LEN字节
|
|
extern u8 USART2_TX_BUF[USART2_MAX_SEND_LEN]; //发送缓冲,最大USART2_MAX_SEND_LEN字节
|
|
extern vu16 USART2_RX_STA; //接收数据状态
|
|
extern u8 BC25_QIURC;
|
|
void USART2_Configuration(u32 baund);
|
|
void u2_printf(char* fmt,...);
|
|
void TIM2_Set(unsigned char sta);
|
|
void timer2_init(void);
|
|
void USART2_ReceiveBuff_Clear(void);
|
|
void USART2_Recieve_Ide(void);
|
|
#endif
|
|
|