📄 uart_ev44b0.h.bak
字号:
/*
* MICETEK International Inc., (shanghai)
* By Qinwei , 2003.05.28 (CopyRight)
*
* Version 0.1
*/
#ifndef __UART_EV4510_
#define __UART_EV4510_
int port_init(int ch);
int dev_uart_init (int sys_clock, int reg_base, int ch);
//dev_uart_init returns non-negative number on succuess, 0 on failing.
int crtio (int baund);
//crtio returns the old baund rate on success, 0 on failing.
void outbyte (int);
//outbyte returns the written char on success or EOF on failing.
int inbyte (void);
//inbyte returns the byte it reads on success or EOF on failing.
#define _ISR_STARTADDRESS 0xc7fff00 //GCS6:64M DRAM/SDRAM
//S3C44B0 uart register
#define ULCON 0x0
#define UCON 0x4
#define UFCON 0x8
#define UMCON 0xC
#define UTRSTAT 0x10
#define UERSTAT 0x14
#define UFSTAT 0x18
#define UMSTAT 0x1C
#define UTXH 0x20
#define URXH 0x24
#define UBRDIV 0x28
//clock register
#define PLLCON 0x01D80000
//USE MCLK 40M
#define B9600 259
#define B19200 129
#define B38400 64
#define B57600 42
#define B115200 21
int port_init(int ch);
int dev_uart_init (int sys_clock, int reg_base, int ch);
int crtio (int baud);
void Delay(int time);
void outbyte(int data);
int inbyte (void);
#endif //__UART_EV4510_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -