欢迎来到虫虫下载站 | 资源下载 资源专辑 关于我们
虫虫下载站

uart.h

usoc在北京博创兴业有限公司的实验平台s3c2410上运行。 2. 各实验的全部源代码分别存放在各实验目录下面。
H
字号:
#define TRUE 	1
#define FALSE 	0
#define rUTRSTAT0	(*(volatile unsigned *)0x50000010)
#define rUTRSTAT1	(*(volatile unsigned *)0x50004010)
#define rUTRSTAT2	(*(volatile unsigned *)0x50008010)
#define WrUTXH0(ch)	(*(volatile unsigned char *)0x50000020)=(unsigned char)(ch)
#define WrUTXH1(ch)	(*(volatile unsigned char *)0x50004020)=(unsigned char)(ch)
#define WrUTXH2(ch)	(*(volatile unsigned char *)0x50008020)=(unsigned char)(ch)
#define RdURXH0()	(*(volatile unsigned char *)0x50000024)
#define RdURXH1()	(*(volatile unsigned char *)0x50004024)
#define RdURXH2()	(*(volatile unsigned char *)0x50008024)
#define rUFSTAT2	(*(volatile unsigned char *)0x50008018)
#define rUFCON2	    (*(volatile unsigned char *)0x50008008)
#include "inc/macro.h"
//void Uart_SendByten(int,U8);
/**********************************************************/
/*扩展模块(16c550)*/
/*以下寄存器当LCR[7]=0时可访问*/
#define THR_RHR (*(volatile  U16 *)0x18000000)
#define IER (*(volatile  U16 *)0x18000002)
#define FCR_ISR (*(volatile  U16 *)0x18000004)
#define LCR (*(volatile  U16 *)0x18000006)
#define MCR (*(volatile  U16 *)0x18000008)
#define LSR (*(volatile  U16 *)0x1800000A)
#define MSR (*(volatile  U16 *)0x1800000C)
#define SPR (*(volatile  U16 *)0x1800000D)
/*以下寄存器当LCR[7]=1时可访问*/
#define DLL (*(volatile  U16 *)0x18000000)
#define DLM (*(volatile  U16 *)0x18000002)
/**********************************************************/
//int Uart_Init_Extend(int whichUart, int baud);
void Uart_SendByten(int Uartnum, char data);
char Uart_Getch(char* Revdata, int Uartnum, int timeout);

⌨️ 快捷键说明

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