?? uart.h
字號:
#ifndef __UART__H
#define __UART__H
//初始化RS485通訊的流控制引腳
#define RS485_RD0_DDR DDRE
#define RS485_RD0_PORT PORTE
#define RS485_RD0_BIT (1<<PE2)
#define RS485_RD0_L RS485_RD0_PORT |= RS485_RD0_BIT
#define RS485_RD0_H RS485_RD0_PORT &= ~RS485_RD0_BIT
//-----------------------------------------------------------
//串口0初始化子程序
//-----------------------------------------------------------
void Uart0_Init(void);
//-----------------------------------------------------------
//串口0接收字節子程序
//-----------------------------------------------------------
unsigned char Getchar0(void);
//-----------------------------------------------------------
//串口0發送字節子程序
//-----------------------------------------------------------
void Putchar0(unsigned char c);
//-----------------------------------------------------------
//串口0發送字符串子程序
//-----------------------------------------------------------
void Putstr0(char *s);
//-----------------------------------------------------------
//串口0發送字符串子程序(帶有換行符)
//-----------------------------------------------------------
void Puts0(char *s);
//-----------------------------------------------------------
//數組轉換成可發送的字符串
//-----------------------------------------------------------
char *buffer2str(char *hhh);
//-----------------------------------------------------------
//數字轉換成可發送的字符串
//-----------------------------------------------------------
char *long2str(unsigned long hh);
//-----------------------------------------------------------
#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -