ppi(9) - NetBSD Manual Pages

Command: Section: Arch: Collection:  
PPI(9)                 NetBSD Kernel Developer's Manual                 PPI(9)

ppi -- user-space interface to ppbus parallel port
#include <sys/ioctl.h> #include <dev/ppbus/ppi.h> #include <dev/ppbus/ppbus_conf.h>
All I/O on the ppi interface is performed using ioctl() calls. Each com- mand takes a single uint8_t argument, transferring one byte of data. The following commands are available: PPIGDATA, PPISDATA Get and set the contents of the data register. PPIGSTATUS, PPISSTATUS Get and set the contents of the status register. PPIGCTRL, PPISCTRL 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. STROBE AUTOFEED nINIT SELECTIN PCD PPIGEPP, PPISEPP Get and set the contents of the EPP control register. PPIGECR, PPISECR Get and set the contents of the ECP control register. PPIGFIFO, PPISFIFO 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);
ioctl(2), atppc(4), io(4), ppbus(4), ppi(4)
ppi originally appeared in FreeBSD.
This manual page is based on the FreeBSD ppi manual page and was updated for the NetBSD port by Gary Thorpe.
The inverse sense of signals is confusing. The ioctl() interface is slow, and there is no way (yet) to chain multi- ple operations together. The headers required for user applications are not installed as part of the standard system. NetBSD 8.0 December 29, 2003 NetBSD 8.0
Powered by man-cgi (2024-03-20). Maintained for NetBSD by Kimmo Suominen. Based on man-cgi by Panagiotis Christias.