On Tue, Feb 26, 2002 at 03:43:50PM +0100, norman wrote:
> > I think there is an example of just that at
> > <http://cyberelk.net/tim/parport/html/>.
> /* Set up the control lines when an interrupt happens. */
> ioctl (fd, PPWCTLONIRQ, &busy);
> /* Now we're ready. */
> ioctl (fd, PPWCONTROL, &ready);
> /* Wait for an interrupt. */
> fd_set rfds;
> FD_ZERO (&rfds);
> FD_SET (fd, &rfds);
> if (!select (fd + 1, &rfds, NULL, NULL, NULL))
> /* Caught a signal? */
> so (!select (fd + 1, &rfds, NULL, NULL, NULL) is true if an int was send ?
No, false. An 'exception' is marked on the file descriptor (see the
man page for select or poll). Then use PPCLRIRQ to find out how many
interrupts were seen.
-- To unsubscribe, send mail to: email@example.com --
-- with the single word "unsubscribe" in the body of the message. --
This archive was generated by hypermail 2b29 : Tue Feb 26 2002 - 09:54:15 EST