/* The header file allocate to demo program */ /* This program is developed by Turbo C 2.0 */ /* SubVendorID SubDeviceID SubAuxID */ /*--------------------------------------------------------------------*/ /* PIO-D144 0x80 0x01 0x00 */ /* PIO-D96 0x80 0x01 0x10 */ /* PIO-D64 0x80 0x01 0x20 */ /* PIO-D48 0x80 0x01 0x30 */ /* PIO-D24 0x80 0x01 0x40 */ /* PIO-D56 0x80 0x01 0x40 */ /*--------------------------------------------------------------------*/ /* PIO-823 0x80 0x03 0x00 */ /* PIO-821 0x80 0x03 0x10 */ /*--------------------------------------------------------------------*/ /* PIO-DA16 0x80 0x04 0x00 */ /* PIO-DA8 0x80 0x04 0x00 */ /* PIO-DA4 0x80 0x04 0x00 */ /*--------------------------------------------------------------------*/ /* PISO-C64 0x80 0x08 0x00 */ /* PISO-P64 0x80 0x08 0x10 */ /* PISO-P32C32 0x80 0x08 0x20 */ /* PISO-P8R8 0x80 0x08 0x30 */ /* PISO-P8SSR8AC 0x80 0x08 0x30 */ /* PISO-P8SSR8DC 0x80 0x08 0x30 */ /* PISO-730 0x80 0x08 0x40 */ /*--------------------------------------------------------------------*/ /* PISO-813 0x80 0x0A 0x00 */ /*--------------------------------------------------------------------*/ /* PISO-DA2 0x80 0x0B 0x00 */ /*--------------------------------------------------------------------*/ #include #include #include #include #include #define WORD unsigned int #define DWORD unsigned long #define UCHAR unsigned char #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 float PIO_FloatSub2(float fA, float fB); short PIO_ShortSub2(short nA, short nB); WORD PIO_DriverInit(WORD *wBoards, WORD wSubVenderID, WORD wSubDeviceID ,WORD wSubAuxID); WORD PIO_DriverClose(void); WORD PIO_GetDriverVersion(WORD *wDriverVersion); WORD PIO_GetConfigAddressSpace(WORD wBoardNo, WORD *wBaseAddr, WORD *wIrq, WORD *wSubVendor, WORD *wSubDevice, WORD *wSubAux, WORD *wSlotBus, WORD *wSlotDevice); WORD GetAddress(void); void WriteAddress(UCHAR bBus, UCHAR bDevice, UCHAR bFunction, UCHAR bWhichLong); void _outpd(WORD port,DWORD data); DWORD _inpd(WORD port); void delay1(int d); void gotoxy(int x,int y); void clrscr(void); /* WORD wBaseAddr=0; WORD wTotalBoards=0; WORD wActiveBoardNo=0xffff; WORD wGetAddress=0; */ /* [0][1] --> system resource allocated wConfigSpace[][0]= wBase wConfigSpace[][1]= wIrq [2][3][4] --> subID to identify PIO/PISO cards wConfigSpace[][2]= wSubVendorID wConfigSpace[][3]= wSubDeviceID wConfigSpace[][4]= wSubAuxID [5][6] --> SlotID to identify the slot position of this PIO/PISO card wConfigSpace[][5]= wSlotBus wConfigSpace[][6]= wSlotDevice */ WORD wConfigSpace[MAX_BOARD_NUMBER][7]; WORD ShowPioPiso(WORD wSubVendor, WORD wSubDevice, WORD wSubAux);