Commit | Line | Data |
---|---|---|
d5bbf259 KB |
1 | .\" Copyright (c) 1986, 1991, 1993 |
2 | .\" The Regents of the University of California. All rights reserved. | |
117af647 | 3 | .\" |
ad787160 C |
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. | |
9 | .\" 2. Redistributions in binary form must reproduce the above copyright | |
10 | .\" notice, this list of conditions and the following disclaimer in the | |
11 | .\" documentation and/or other materials provided with the distribution. | |
12 | .\" 3. All advertising materials mentioning features or use of this software | |
13 | .\" must display the following acknowledgement: | |
14 | .\" This product includes software developed by the University of | |
15 | .\" California, Berkeley and its contributors. | |
16 | .\" 4. Neither the name of the University nor the names of its contributors | |
17 | .\" may be used to endorse or promote products derived from this software | |
18 | .\" without specific prior written permission. | |
117af647 | 19 | .\" |
ad787160 C |
20 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
21 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
22 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
23 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
24 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
25 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
26 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
27 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
28 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
30 | .\" SUCH DAMAGE. | |
9903e566 | 31 | .\" |
ad787160 C |
32 | .\" @(#)tb.4 8.1 (Berkeley) 6/5/93 |
33 | .\" | |
34 | .Dd June 5, 1993 | |
9903e566 CL |
35 | .Dt TB 4 vax |
36 | .Os BSD 4.3 | |
37 | .Sh NAME | |
38 | .Nm tb | |
39 | .Nd line discipline for digitizing devices | |
40 | .Sh SYNOPSIS | |
41 | .Cd pseudo-device tb | |
42 | .Sh DESCRIPTION | |
117af647 KM |
43 | This line discipline provides a polled interface to many common |
44 | digitizing devices which are connected to a host through a serial line. | |
45 | When these devices stream data at high speed, the use of the | |
ff72c000 | 46 | line discipline is critical in minimizing the number of samples |
117af647 | 47 | that would otherwise be lost due to buffer exhaustion in the |
9903e566 | 48 | .Xr tty 4 |
117af647 | 49 | handler. |
9903e566 | 50 | .Pp |
117af647 | 51 | The line discipline is enabled by a sequence: |
9903e566 CL |
52 | .Bd -literal -offset indent |
53 | #include <sys/tablet.h> | |
54 | int ldisc = TBLDISC, fildes; ... | |
55 | ioctl(fildes, TIOCSETD, &ldisc); | |
56 | .Ed | |
57 | .Pp | |
117af647 KM |
58 | A typical application program then polls the digitizing device by |
59 | reading a binary data structure which contains: the current X and | |
60 | Y positions (in the device coordinate space), | |
61 | up-down status of the buttons or pen stylus, | |
62 | proximity information (when available), and a count | |
63 | of the number of samples received from the input device | |
64 | since it was opened. In addition, devices such as the | |
9903e566 CL |
65 | .Tn GTCO |
66 | append tilt and pressure information to the end of | |
ff72c000 MS |
67 | the aforementioned structure. For the Polhemus 3-D digitizer |
68 | the structure read is completely different. Refer to the | |
117af647 | 69 | include file for a complete description. |
9903e566 | 70 | .Pp |
117af647 KM |
71 | While in tablet mode, normal teletype input and output functions take place. |
72 | Thus, if an 8 bit output data path is desired, it is necessary | |
9903e566 CL |
73 | to prepare the output line by putting it into |
74 | .Tn RAW | |
75 | mode using | |
76 | .Xr ioctl 2 . | |
117af647 | 77 | This must be done |
9903e566 CL |
78 | .Em before |
79 | changing the discipline with | |
80 | .Dv TIOCSETD , | |
81 | as most | |
82 | .Xr ioctl 2 | |
350ed45d | 83 | calls are disabled while in tablet line-discipline mode. |
9903e566 | 84 | .Pp |
117af647 | 85 | The line discipline supports |
9903e566 | 86 | .Xr ioctl 2 |
117af647 | 87 | requests to get/set the operating mode, and to get/set the tablet type |
9903e566 CL |
88 | and operating mode by |
89 | .Em or Ns -ing | |
90 | the two values together. | |
91 | .Pp | |
ff72c000 | 92 | The line discipline supports digitizing devices which are |
9903e566 CL |
93 | compatible with Hitachi, |
94 | .Tn GTCO , | |
95 | or Polhemus protocol formats. | |
117af647 | 96 | For Hitachi there are several formats with that used in the |
9903e566 CL |
97 | newer model |
98 | .Tn HDG-1111B | |
99 | the most common. | |
100 | .Sh DIAGNOSTICS | |
117af647 | 101 | None. |
9903e566 CL |
102 | .Sh SEE ALSO |
103 | .Xr tty 4 | |
104 | .Sh HISTORY | |
105 | The | |
106 | .Nm | |
107 | interface appeared in | |
108 | .Bx 4.3 . |