1lp(7D) Devices lp(7D)
2
3
4
6 lp - driver for parallel port
7
9 include <sys/bpp_io.h>
10 fd = open("/dev/lpn", flags);
11
12
14 The lp driver provides the interface to the parallel ports used by
15 printers for x86 based systems. The lp driver is implemented as a
16 STREAMS device.
17
19 BPPIOC_TESTIO Test transfer readiness. This command checks to see if
20 a read or write transfer would succeed based on pin
21 status. If a transfer would succeed, 0 is returned.
22 If a transfer would fail, −1 is returned, and errno
23 is set to EIO. The error status can be retrieved
24 using the BPPIOC_GETERR ioctl() call.
25
26
27 BPPIOC_GETERR Get last error status. The argument is a pointer to a
28 struct bpp_error_status. See below for a description
29 of the elements of this structure. This structure
30 indicates the status of all the appropriate status
31 bits at the time of the most recent error condition
32 during a read(2) or write(2) call, or the status of
33 the bits at the most recent BPPIOC_TESTIO ioctl(2)
34 call. The application can check transfer readiness
35 without attempting another transfer using the
36 BPPIOC_TESTIO ioctl().
37
38
39 Error Pins Structure
40 This structure and symbols are defined in the include file
41 <sys/bpp_io.h>:
42
43 struct bpp_error_status {
44 char timeout_occurred; /* Not use */
45 char bus_error; /* Not use */
46 uchar_t pin_status; /* Status of pins which could cause an error */
47 };
48
49 /* Values for pin_status field */
50 #define BPP_ERR_ERR 0x01 /* Error pin active */
51 #define BPP_SLCT_ERR 0x02 /* Select pin active */
52 #define BPP_PE_ERR 0x04 /* Paper empty pin active */
53
54
55
56 Note: Other pin statuses are defined in <sys/bpp_io.h>, but
57 BPP_ERR_ERR, BPP_SLCT_ERR and BPP_PE_ERR are the only ones valid for
58 the x86 lp driver.
59
61 EIO A BPPIOC_TESTIO ioctl() call is attempted while a condition
62 exists that would prevent a transfer (such as a peripheral
63 error).
64
65
66 EINVAL An ioctl() is attempted with an invalid value in the command
67 argument.
68
69
71 /platform/i86pc/kernel/drv/lp.conf
72
73 configuration file for lp driver
74
75
77 See attributes(5) for descriptions of the following attributes:
78
79
80
81
82 ┌─────────────────────────────┬─────────────────────────────┐
83 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
84 ├─────────────────────────────┼─────────────────────────────┤
85 │Architecture │x86 │
86 └─────────────────────────────┴─────────────────────────────┘
87
89 sysbus(4), attributes(5), streamio(7I)
90
92 A read operation on a bi-directional parallel port is not supported.
93
94
95
96SunOS 5.11 21 May 1997 lp(7D)