/*********************************************************************** * pport.h * * Declarations and prototypes for pport.cpp. See pport.cpp for * supporting documentation. ***********************************************************************/ #ifndef __PPORT_H #define __PPORT_H /* Assume we're accessing parallel port 1 at the standard I/O address * of 0x378. */ #define PORT_BASE 0x378 #define STATUS_OFFSET 1 #define CONTROL_OFFSET 2 /* Various masks necessary for dealing with inversions on the parallel * port and the XS40 board. */ #define DATA_MASK 0x03 #define STATUS_MASK 0x00 #define CONTROL_MASK 0x09 /* Prototypes. */ void writeDataReg(unsigned char d); unsigned char readStatusReg(void); void writeControlReg(unsigned char c); #endif