driver.h
来自「Pic Nic 16f877/18f452控制 rtl8019as 原代码」· C头文件 代码 · 共 51 行
H
51 行
/*
* driver.h
*
* Include file for picnic project
*
*/
//Data port
#if defined(__PCM__)
#byte DATA = 0 // Check data sheet to get portd address
#elif defined(__PCH__)
#byte DATA = 0xF83 // Data Port to talk to the NIC: Port D of 18F452
#endif
//Control Pins
//PICNIC ORIGINAL HARDWARE
//#define RESET PIN_E0 // NIC Reset when a pulse generated at this pin
//#define IOR PIN_E1 // Enable reading data from NIC
//#define IOW PIN_E2 // Enable writing data to the NIC
//EDTP HARDWARE
//Rafael - 12/07/05
#define RESET PIN_E2 // NIC Reset when a pulse generated at this pin
#define IOR PIN_E0 // Enable reading data from NIC
#define IOW PIN_E1 // Enable writing data to the NIC
//MODIFIED FOR EDTP HARDWARE
//Structure to access 5 bits of port B
static struct PORTB_E {
int ADDR1:5;
int1 unUsedPinRb0;
int1 unUsedPinRb1;
int1 unUsedPinRb2;
} PBE;
//Make access to last 5 bits of portB via ADDR var
#byte PBE = 0xF81 // Port B
#define ADDR PBE.ADDR1
//Analog port control
#byte ADCON1 = 0x9F
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?