uart.h

来自「通过讨论常见的串口软件使用的方法」· C头文件 代码 · 共 42 行

H
42
字号
/*----------------------------------------------------------------------------------
File: 					uart.h
Author: 				Qiu Peng   [roc98@163.ne]
Note:					header of UART driver
Create Date:			2004.7.25
Last Modified:			2004.7.28
-----------------------------------------------------------------------------------*/

#ifndef __UART_H__
#define __UART_H__

#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>

#include "44b.h"

//Tx and Rx buffer
#define TxBufLen	1000
#define RxBufLen	1000

void Uart_Init_2(int mclk, int baud);
void Uart_InitBuffer(void);
void Uart_select(int UartNo);	
void Uart_TxStart(void);

//called by INT ISRs(in OS_CPU_A.S)
void UartTx(void);
void UartRx(void);

void Uart_PrintChar(char ch);
void Uart_PrintStr(char *pt);
void Uart_printf(char *fmt,...);

//void 	Uart_GetChar(void);
int  Uart_GetStr(char *str);


#endif

⌨️ 快捷键说明

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