User manual
Table Of Contents
- Introduction
- Hardware description
- Software
- DELIB API reference
- Appendix
DELIB API reference |Seite 55
printf("Value of inputs 0-7 = %d\n", data);
printf("Press any key to continue\n");
getch();
// -------------------------------------------------------------------
// Switch i/o to outputs
DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SET_DIR_DX_8, 0, 255, 0);
IsError();
printf("Channel 0-7 has been set to outputs\n");
printf("Press any key to continue\n");
getch();
// -------------------------------------------------------------------
// Write values to outputs 0-7
DapiDOSet8(handle, 0, 0xf0);
IsError();
printf("Write 0xf0 to outputs 0-7\n");
printf("Press any key to continue\n");
getch();
// -------------------------------------------------------------------
// Readback a value of inputs 0-7
data = DapiDIGet8(handle, 0);
IsError();
printf("Readback input 0-7 (from output 0-7)\n");
printf("value = %d\n", data);
printf("Press any key to continue\n");
getch();
// -------------------------------------------------------------------
// Close Module
DapiCloseModule(handle);
printf("Module closed\n");
printf("End of program!\n");
printf("Press any key to exit\n");
getch();
return ;
}