|
NAMEppi —
user-space interface to ppbus parallel 'geek' port
SYNOPSISdevice ppi
Minor numbering: unit numbers correspond directly to ppbus numbers.
DESCRIPTIONTheppi driver provides a convenient means for user
applications 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 /dev/io interface.
PROGRAMMING INTERFACEAll I/O on theppi interface is performed using
ioctl () calls. Each command takes a single
uint8_t argument, transferring one byte of data. The
following commands are available:
EXAMPLESTo 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); BUGSThe inverse sense of signals is confusing.The The headers required for user applications are not installed as part of the standard system.
Visit the GSP FreeBSD Man Page Interface. |