ppi.4 (131530) | ppi.4 (231564) |
---|---|
1.\" Copyright (c) 1997 2.\" Michael Smith 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer as --- 9 unchanged lines hidden (view full) --- 18.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 19.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 20.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 21.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 22.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 23.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 24.\" POSSIBILITY OF SUCH DAMAGE. 25.\" | 1.\" Copyright (c) 1997 2.\" Michael Smith 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer as --- 9 unchanged lines hidden (view full) --- 18.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 19.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 20.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 21.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 22.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 23.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 24.\" POSSIBILITY OF SUCH DAMAGE. 25.\" |
26.\" $FreeBSD: head/share/man/man4/ppi.4 131530 2004-07-03 18:29:24Z ru $ | 26.\" $FreeBSD: head/share/man/man4/ppi.4 231564 2012-02-12 18:29:56Z ed $ |
27.\" 28.Dd January 2, 1998 29.Dt PPI 4 30.Os 31.Sh NAME 32.Nm ppi 33.Nd "user-space interface to ppbus parallel 'geek' port" 34.Sh SYNOPSIS --- 13 unchanged lines hidden (view full) --- 48interface. 49.Sh PROGRAMMING INTERFACE 50All I/O on the 51.Nm 52interface is performed using 53.Fn ioctl 54calls. 55Each command takes a single | 27.\" 28.Dd January 2, 1998 29.Dt PPI 4 30.Os 31.Sh NAME 32.Nm ppi 33.Nd "user-space interface to ppbus parallel 'geek' port" 34.Sh SYNOPSIS --- 13 unchanged lines hidden (view full) --- 48interface. 49.Sh PROGRAMMING INTERFACE 50All I/O on the 51.Nm 52interface is performed using 53.Fn ioctl 54calls. 55Each command takes a single |
56.Ft u_int8_t | 56.Ft uint8_t |
57argument, transferring one byte of data. 58The following commands are available: 59.Bl -tag -width indent 60.It Dv PPIGDATA , PPISDATA 61Get and set the contents of the data register. 62.It Dv PPIGSTATUS , PPISSTATUS 63Get and set the contents of the status register. 64.It Dv PPIGCTRL , PPISCTRL --- 15 unchanged lines hidden (view full) --- 80Read and write the ECP FIFO (8-bit operations only). 81.El 82.Sh EXAMPLES 83To present the value 0x5a to the data port, drive STROBE low and then high 84again, the following code fragment can be used: 85.Bd -literal -compact 86 87 int fd; | 57argument, transferring one byte of data. 58The following commands are available: 59.Bl -tag -width indent 60.It Dv PPIGDATA , PPISDATA 61Get and set the contents of the data register. 62.It Dv PPIGSTATUS , PPISSTATUS 63Get and set the contents of the status register. 64.It Dv PPIGCTRL , PPISCTRL --- 15 unchanged lines hidden (view full) --- 80Read and write the ECP FIFO (8-bit operations only). 81.El 82.Sh EXAMPLES 83To present the value 0x5a to the data port, drive STROBE low and then high 84again, the following code fragment can be used: 85.Bd -literal -compact 86 87 int fd; |
88 u_int8_t val; | 88 uint8_t val; |
89 90 val = 0x5a; 91 ioctl(fd, PPISDATA, &val); 92 ioctl(fd, PPIGCTRL, &val); 93 val |= STROBE; 94 ioctl(fd, PPISCTRL, &val); 95 val &= ~STROBE; 96 ioctl(fd, PPISCTRL, &val); 97 98.Ed 99.Sh BUGS 100The inverse sense of signals is confusing. 101.Pp 102The 103.Fn ioctl 104interface is slow, and there is no way (yet) to chain multiple operations together. 105.Pp 106The headers required for user applications are not installed as part of the 107standard system. | 89 90 val = 0x5a; 91 ioctl(fd, PPISDATA, &val); 92 ioctl(fd, PPIGCTRL, &val); 93 val |= STROBE; 94 ioctl(fd, PPISCTRL, &val); 95 val &= ~STROBE; 96 ioctl(fd, PPISCTRL, &val); 97 98.Ed 99.Sh BUGS 100The inverse sense of signals is confusing. 101.Pp 102The 103.Fn ioctl 104interface is slow, and there is no way (yet) to chain multiple operations together. 105.Pp 106The headers required for user applications are not installed as part of the 107standard system. |