*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->FreeBSD man pages -> ppi (4)              
Title
Content
Arch
Section
 

PPI(4)

Contents


NAME    [Toc]    [Back]

     ppi -- user-space interface to ppbus parallel 'geek' port

SYNOPSIS    [Toc]    [Back]

     device ppi

     Minor numbering:  Unit numbers correspond directly to ppbus numbers.

     #include <dev/ppbus/ppi.h>
     #include <dev/ppbus/ppbconf.h>

DESCRIPTION    [Toc]    [Back]

     The ppi 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 INTERFACE    [Toc]    [Back]

     All I/O on the ppi interface is performed using ioctl() calls.  Each command
 takes a single u_int8_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).

EXAMPLES    [Toc]    [Back]

     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);

BUGS    [Toc]    [Back]

     The inverse sense of signals is confusing.

     The ioctl() interface is slow, and there is no way (yet) to chain multiple
 operations together.

     The headers required for user applications are not installed as part of
     the standard system.


FreeBSD 5.2.1			January 2, 1998 		 FreeBSD 5.2.1
[ Back ]
 Similar pages
Name OS Title
lpbb FreeBSD parallel port I2C bit-banging interface
sane-as6e Linux SANE backend for using the Artec AS6E parallel port interface scanner.
ppbus FreeBSD Parallel Port Bus system
lpt OpenBSD parallel port driver
ppc FreeBSD Parallel Port Chipset driver
bpp OpenBSD SPARC bi-directional parallel port
sane-mustek_pp Linux SANE backend for Mustek parallel port flatbed scanners
sane-umax_pp Linux SANE backend for Umax parallel port flatbed scanners
sane-plustek Linux 0sane-plustek SANE backend for Plustek parallel port and LM983[1/2/3] based USB flatbed scanners
copy NetBSD kernel space to/from user space copy functions
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service