PCI-P16R16 Series Classic Driver
DLL Software Manual
User Manual, Ver. 1.3, Oct. 2015, Page: 30
/*
getting the Driver version
*/
wRetVal=PCI_GetDriverVersion(&wVal);
printf("Driver Version=%x\n",wVal);
/*
call a function to test if exact calling LIB
*/
nVal=PCI_ShortSub2(1,2);
printf("PCI_ShortSub2(1,2) = %d\n",nVal);
/*
call another function to test if exact calling LIB
*/
fVal=PCI_FloatSub2(1.0,2.0);
printf("PCI_FloatSub2(1.0,2.0) = %f\n",fVal);
if( wP8R8No<1 )
{
putch(0x07);
printf("Please plug one PCI-P8R8 in PC !!!\n");
exit(0);
}
/*************************************************/
/**********
PCI-P8R8 DI/DO demo
**************/
/************************************************/
printf("The PCI-P8R8 DO/DI testing !!!\n");
P8R8_DO
(P8R8_BaseAddress,0x0000);
/* Digital output */
delay(500);
/* Delay a little time */
wInData=
P8R8_DI
(P8R8_BaseAddress);
/* Digital input */
printf("Digital Output -> 0000H | Digital Input -> %04xH\n",wInData);
P8R8_DO
(P8R8_BaseAddress,0xFFFF);
/* Digital output */
delay(500);
/* Delay a little time */
wInData=
P8R8_DI
(P8R8_BaseAddress);
/* Digital input */
printf("Digital Output -> FFFFH | Digital Input -> %04xH\n",wInData);
P8R8_DO
(P8R8_BaseAddress,0x5555);
/* Digital output */
delay(500);
/* Delay a little time */