You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
379 B
19 lines
379 B
#ifndef _USART_H
|
|
#define _USART_H
|
|
|
|
#include "system.h"
|
|
#include "stdio.h"
|
|
|
|
#define USART2_REC_LEN 255 //定义最大接收字节数 200
|
|
|
|
extern u8 USART2_RX_BUF[USART2_REC_LEN]; //接收缓冲,最大USART_REC_LEN个字节.末字节为换行符
|
|
extern u16 USART2_RX_STA; //接收状态标记
|
|
|
|
#define RS485_4_TX_EN PBout(9) //485模式控制.0,接收;1,发送.
|
|
void USART2_Init(u32 bound);
|
|
|
|
|
|
#endif
|
|
|
|
|