serial.h

来自「此文档为采用FPGA实现的以太网MAC层」· C头文件 代码 · 共 30 行

H
30
字号
#ifndef _SERIAL_H#define _SERIAL_H#include "sys.h"#define DBG_PCON (*( volatile unsigned char *)(Base_DBG_PORT+0))#define DBG_SCON (*( volatile unsigned char *)(Base_DBG_PORT+1))#define DBG_SBUF (*(volatile unsigned char *)(Base_DBG_PORT+2))#define DBG_SRELL (*(volatile unsigned char *)(Base_DBG_PORT+3))#define DBG_SRELH (*(volatile unsigned char *)(Base_DBG_PORT+4))#define DBG_TCON (*(volatile unsigned char *)(Base_DBG_PORT+5))#define DBG_TL (*(volatile unsigned char *)(Base_DBG_PORT+6))#define DBG_TH (*(volatile unsigned char *)(Base_DBG_PORT+7))#define DBG_ADCON (*(volatile unsigned char *)(Base_DBG_PORT+8))#define DBG_TXI (DBG_SCON & 0x02)#define DBG_RXI (DBG_SCON & 0x01)//Secondary serial portvoid dbg_init(void);void dbg_char(Uint8 data);void dbg_string(Uint16 *buf,Uint16 len);void dbg(Uint16 data);void dbg32(Uint32 data);#endif

⌨️ 快捷键说明

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