📄 tftp.h
字号:
//LED GPIO#define GPBCON (*(volatile unsigned long *)0x56000010)#define GPBDAT (*(volatile unsigned long *)0x56000014)#define GPBUP (*(volatile unsigned long *)0x56000018)// Set Uart#define UART_CTL_BASE 0x50000000#define reg(i) (*(volatile unsigned long *)(UART_CTL_BASE + i))#define Utrstat0 reg(0x10)#define Utxh0 reg(0x20)// CS8900 web card set#define GPACON (*(volatile unsigned long *)0x56000000)#define CS8900_BASE 0x19000300#define CS8900_REG unsigned short int#define CS8900_OFF 0x02#define CS8900_BUS16_0 *(volatile unsigned char *)(CS8900_BASE+0x00)#define CS8900_BUS16_1 *(volatile unsigned char *)(CS8900_BASE+0x01)#define CS8900_RTDATA *(volatile CS8900_REG *)(CS8900_BASE+0x00*CS8900_OFF)#define CS8900_TxCMD *(volatile CS8900_REG *)(CS8900_BASE+0x02*CS8900_OFF)#define CS8900_TxLEN *(volatile CS8900_REG *)(CS8900_BASE+0x03*CS8900_OFF)#define CS8900_PPTR *(volatile CS8900_REG *)(CS8900_BASE+0x05*CS8900_OFF)#define CS8900_PDATA *(volatile CS8900_REG *)(CS8900_BASE+0x06*CS8900_OFF)// Chip self control#define PP_SelfCTL 0x0114 #define PP_SelfCTL_Reset 0x0040 // Self-clearing reset// Chip self status #define PP_SelfSTAT 0x0136 #define PP_SelfSTAT_InitD 0x0080 // Chip initialization complete // Receiver control#define PP_RxCTL 0x0104#define PP_RxCTL_Promiscuous 0x0080 /* Accept any frame */#define PP_RxCTL_RxOK 0x0100 // Accept well formed frames#define PP_RxCTL_IA 0x0400 // Accept frame that matches IA #define PP_RxCTL_Broadcast 0x0800 // Accept broadcast frames // Receiver configuration#define PP_RxCFG 0x0102// Transmit configuration#define PP_TxCFG 0x0106// Buffer configuration#define PP_BufCFG 0x010A// Line control#define PP_LineCTL 0x0112 #define PP_LineCTL_Rx 0x0040 // Enable receiver #define PP_LineCTL_Tx 0x0080 // Enable transmitter // Transmit command status#define PP_TxCmd 0x0108#define PP_TxCmd_TxStart_Full 0x00C0 // Start after all bytes loaded// Bus status #define PP_BusSTAT 0x0138 #define PP_BusSTAT_TxRDY 0x0100 // Ready for Tx data // Bus Control#define PP_BusCtl 0x0116#define PP_BusCrl_IoCh 0x1000 // IOCH RDYE 0 add read cycles// Transmit event#define PP_TER 0x0128#define PP_TER_CRS 0x0040 // Carier lost #define PP_TER_TxOK 0x0100 // Packet sent without error// Receive event#define PP_RER 0x0124 #define PP_RER_RxOK 0x0100 // Frame received with no errors#define PP_RER_CRC 0x1000 /* Frame had CRC error */// Chip identifier - must be 0x630E, revision, model codes#define PP_ChipID 0x0000 #define PP_ChipRev 0x0002 // Individual address (MAC)#define PP_IA 0x0158
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -