

#include  <stdio.h>

#include  <stdlib.h>

#include  <dos.h>

#include  <conio.h>

#include  <math.h>



#define   BYTE      unsigned char

#define   UCHAR     unsigned char

#define   WORD      unsigned int

#define   DWORD     unsigned long



#define   NoError                0

#define   DriverHandleError      1

#define   DriverCallError        2

#define   FindBoardError         3

#define   TimeOut                4

#define   ExceedBoardNumber      5

#define   NotFoundBoard          6



#define   MAX_BOARD_NUMBER      16



#define   TIGER100      0xE1590002

#define   TIGER320      0xE1590001



/*------------------------------------------

               Vendor/Dev SVen SDev  SAU 

PIO_D144	   TIGER100	    80	 01	 00	

PIO_D96		   TIGER100	    80	 01	 10	

PIO_D64		   TIGER100	    80	 01	 20	

PIO_D48		   TIGER100	    80	 01	 30	

PIO_D24		   TIGER100	    80	 01	 40	

PIO_D56		   TIGER100	    80	 01	 40	

PIO-D168	   TIGER320	  d880	 01	 50	

PIO_D144	   TIGER320	  5c80	 01	 00	

PIO_D96		   TIGER320	  5880	 01	 10	

PIO_D64		   TIGER320	  4080	 01	 20	

PIO_D48		   TIGER320	  4080	 01	 30	

PIO_D24        TIGER320	  c080	 01	 40	

PIO_D56		   TIGER320	  c080	 01	 40	

PIO-DA4/8/16   TIGER100	    80	 04	 00	

PIO-DA4/8/16   TIGER320	  4180	 00	 00	



PISO-C64	   TIGER100	    80	 08	 00	

PISO-P64	   TIGER100	    80	 08	 10	

PISO-A64	   TIGER100	    80	 08	 50	

PISO-C64	   TIGER320	  0280	 00	 00	

PISO-P64	   TIGER320	  0280	 00	 01	

PISO-A64	   TIGER320	  8280	 00	 05	

PISO-DA2	   TIGER100	    80	 0B	 00	

PISO-DA2	   TIGER320	  4280	 03	 00	

PISO-813	   TIGER100	    80	 0A	 00	

PISO-813	   TIGER320	  4280	 02	 00	

PISO-725	   TIGER100	    80	 0C	 00	

PISO-725	   TIGER320	  0380	 00	 FF	



PISO-P8SSR8AC  TIGER100	    80	 08	 30	

PISO-P8SSR9DC  TIGER100	    80	 08	 30	

PISO-P8R8	   TIGER100	    80	 08	 30	

PISO-P8SSR8AC  TIGER320	  4200	 00	 30	

PISO-P8SSR9DC  TIGER320	  4200	 00	 30	

PISO-P8R8	   TIGER320	  4200	 00	 30	

PISO-P32C32	   TIGER100	    80	 08	 20	

PISO-P32A32	   TIGER100	    80	 08	 70	

PISO-730	   TIGER100	    80	 08	 40	

PISO-730A	   TIGER100	    80	 08	 80	

PISO-P32C32	   TIGER320	  0280	 00	 20	

PISO-P32A32	   TIGER320	  8280	 00	 70	

PISO-730	   TIGER320	  c2ff	 00	 40	

PISO-730A	   TIGER320	  62ff	 00	 80	

VXC-142		   TIGER320	    61	 00	 FF	

VXC-142i	   TIGER320	  0161	 02	 FF	

VXC-182i	   TIGER320	  0161   01	 FF	

VXC-112A       TIGER320   1D61   00  FF

PISO-PS4000    TIGER320   0B89   03  FF

-----------------------------------------------*/



float  PIO_FloatSub2(float fA, float fB);

short  PIO_ShortSub2(short nA, short nB);

WORD   PIO_GetDriverVersion(WORD *wDriverVersion);



/* 1 or '1' : Enable Debug Print

   others   : Disable Debug Print */

void   PIO_SetDebugMode(UCHAR bMode);



WORD   PIO_DriverInit(WORD *wBoards, DWORD wSubVenderID, WORD wSubDeviceID

       ,BYTE wSubAuxID);

WORD   PIO_DriverClose(void);

WORD   PIO_GetConfigAddressSpace(WORD wBoardNo, WORD *wBaseAddr, WORD *wIrq,

       WORD *wSubVendor, WORD *wSubDevice, WORD *wSubAux,

       WORD *wSlotBus, WORD *wSlotDevice);

void   WriteAddress(UCHAR bBus, UCHAR bDevice, UCHAR bFunction, UCHAR bWhichLong);



void   _outpd(WORD port,DWORD data);

DWORD  _inpd(WORD port);



WORD   ShowPioPiso(DWORD wSubVendorID, WORD wSubDevice, WORD wSubAux);





/*************** for Microsoft C Compiler ****************/

#ifdef _MSC_VER



/* MSC inp returns byte, inpw returns word */

/* TC  inportb returns byte, inport returns word */

#define inportb		 inp

#define outportb	 outp

#define inport		 inpw

#define outport		 outpw

#define enable		 _enable

#define disable		 _disable

#define setvect		 _dos_setvect

#define sleep		 delay1

#define delay		 delay1



void   delay1(int d);

void   gotoxy(int x,int y);

void   clrscr(void);



#endif

/*************** for Microsoft C Compiler ****************/



