ppi(4) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

ppi(4)

Minor  numbering:  unit numbers correspond directly to ppbus num‐
bers.  The driver provides a convenient means for  user  applica‐
tions to manipulate the state of the parallel port, enabling easy
low-speed  I/O  operations without the security problems inherent
with the use of the interface.  All I/O on the interface is  per‐
formed using calls.  Each command takes a single argument, trans‐
ferring  one byte of data.  The following commands are available:
Get and set the contents of the data register.  Get and  set  the
contents of the status register.  Get and set the contents of the
control  register.   The  following defines correspond to bits in
this register.  Setting a bit in the control register drives  the
corresponding  output  low.   Get and set the contents of the EPP
control register.  Get and set the contents of  the  ECP  control
register.   Read  and write the ECP FIFO (8-bit operations only).
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;         uint8_t         val;

        val    =   0x5a;           ioctl(fd,   PPISDATA,   &val);
        ioctl(fd,  PPIGCTRL,  &val);           val   |=   STROBE;
        ioctl(fd,   PPISCTRL,   &val);          val  &=  ~STROBE;
        ioctl(fd, PPISCTRL, &val);

The inverse sense of signals  is  confusing.   The  interface  is
slow,  and there is no way (yet) to chain multiple operations to‐
gether.  The headers required for user applications are  not  in‐
stalled as part of the standard system.






































맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3