Download 82091 SICL Users Guide

Transcript
Using SICL
Using Asynchronous Events
/* Wait for interrupt to happen (30 second timeout) */
iwaithdlr (30000);
if (intr == 1)
printf ("Interrupt handler called.\n");
else
printf ("ERROR: Interrupt handler not called.\n");
iclose (id);
}
child ()
{
INST id;
/* Let the parent get into iwaithdlr */
sleep (2);
ionerror (I_ERROR_EXIT);
id = iopen ("vxi");
/* pulse TTL0 */
ivxitrigon (id, I_TRIG_TTL0);
ivxitrigoff (id, I_TRIG_TTL0);
iclose (id);
exit (0);
}
60
Chapter 3