📄 driver.h
字号:
/*
* 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -