uart128.h

来自「avr AT45DB161D 通信程序,4MFlash,程序已经调试通过,希望对」· C头文件 代码 · 共 37 行

H
37
字号
#ifndef _UART128_H_
#define _UART128_H_
#include<global.h>
//#include<buffer.h>
#include<iom128v.h>
                                                             
                                                                                           
 //! Initializes UARTs.                                                                    
 /// \note   After running this init function, the processor                               
 /// I/O pins that used for uart communications (RXD, TXD)                                 
 /// are no long available for general purpose I/O.                                        
//void uartInit(void);                                                                      
                                                                                           
 //! Initializes UART0 only.                                                               
void uart0Init(void);                                                                     
                                                                                           
 //! Initializes UART1 only.                                                               
void uart1Init(void);                                                                     


//this function convert char to ascii
//char2hex 把字符型转变成ACSII
char char2hex(char t1);

//sendinthex1把整型转化成4个ASCII输出
void sendinthex1(int c);
void sendinthex0(char c);
//发送字符
void sendchar1(char c); // 发送 


//发送字符串函数
void sendstring1(unsigned char * txbuf); // 发送 
signed int debug_check_rx(void);


#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?