Am Mon, 2003-06-09 um 18.44 schrieb Dan Malaby:
> I was wondering if there was a good place to go to get programing examples 
> on how to
> talk to the serial and parallel ports. I have looked in the developers 
> handbook but have not
> any luck finding what I want.
> 
> Any pointers would be appreciated
>
> Thanks

Hello, 

at least for parallel ports, ppi might help you. There is a short
example in the ppi(4) man page:

     To present the value 0x5a to the data port, drive STROBE low and
then
     high again, the following code fragment can be used:
 
             int             fd;
             u_int8_t        val;
 
             val = 0x5a;
             ioctl(fd, PPISDATA, &val);
             ioctl(fd, PPIGCTRL, &val);
             val |= STROBE;
             ioctl(fd, PPISCTRL, &val);
             val &= ~STROBE;
             ioctl(fd, PPISCTRL, &val);

HTH, 
-- 
Andreas Kohn <[EMAIL PROTECTED]>

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil

Reply via email to