00001 /************************************************************ 00002 File: pcioDrv.hh 00003 00004 Author: Steven Legowik 00005 00006 Description: 00007 Provides an easy to use interface to the pcio device 00008 driver. 00009 00010 For improved compatability with the old io access functions 00011 (declared in pcio.h) and ease of use, I have rewritten the input 00012 and output operations to make use of the pcio device driver. If 00013 you use this interface you will only have to add a call to 00014 pcioInit() to open the connection to the pcio device, and change 00015 the include file to pcioDrv.h (from pcio.h). All the rest of the 00016 code should remain unchanged. The input and output routines make 00017 use of a global file descriptor initialize by pcioInit() in 00018 ioctl() calls to the driver. To used this interface to the driver 00019 pcioDrv.o must be linked into the application and pcioDrv.h must 00020 be included wherever the driver is accessed. 00021 00022 Modification history: 00023 00024 7-Mar-1995 Fred Proctor removed // comment from this C header 00025 file. 00026 29-Dec-1994 Fred Proctor added DOS look-alikes 00027 ??? Steve Legowik created 00028 00029 ************************************************************/ 00030 00031 #ifndef PCIO_DRV_H 00032 #define PCIO_DRV_H 00033 00034 extern void pcioInit(); 00035 00036 extern unsigned char inputb( unsigned short port ); 00037 extern void outputb( unsigned short port, unsigned char data ); 00038 00039 extern unsigned short inputw( unsigned short port ); 00040 extern void outputw( unsigned short port, unsigned short data ); 00041 00042 extern unsigned long inputl( unsigned short port ); 00043 extern void outputl( unsigned short port, unsigned long data ); 00044 00045 /* DOS look-alikes */ 00046 #define inportb(a) inputb(a) 00047 #define outportb(a,b) outputb(a,b) 00048 00049 #define inportw(a) inputw(a) 00050 #define outportw(a,b) outputw(a,b) 00051 00052 #define inportl(a) inputl(a) 00053 #define outportl(a,b) outputl(a,b) 00054 00055 #endif