Files
MiniGUI/src/ial/spec_general_ts_drv.html
T
2017-05-29 12:20:05 +08:00

589 lines
36 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!-- saved from url=(0022)http://internet.e-mail -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0046)http://www.handhelds.org/projects/ts_spec.html -->
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word"><HEAD><TITLE>MAJOR NUMBER</TITLE>
<META content="text/html; charset=windows-1252" http-equiv=Content-Type>
<META content=Word.Document name=ProgId>
<META content="MSHTML 5.00.2920.0" name=GENERATOR>
<META content="Microsoft Word 9" name=Originator><LINK
href="./ts_spec_files/filelist.xml" rel=File-List><!--[if gte mso 9]><xml>
<o:DocumentProperties>
<o:Author>flynn</o:Author>
<o:LastAuthor>flynn</o:LastAuthor>
<o:Revision>2</o:Revision>
<o:TotalTime>558</o:TotalTime>
<o:LastPrinted>2000-07-12T06:51:00Z</o:LastPrinted>
<o:Created>2000-07-17T08:48:00Z</o:Created>
<o:LastSaved>2000-07-17T08:48:00Z</o:LastSaved>
<o:Pages>6</o:Pages>
<o:Words>1263</o:Words>
<o:Characters>7204</o:Characters>
<o:Company>Compaq</o:Company>
<o:Lines>60</o:Lines>
<o:Paragraphs>14</o:Paragraphs>
<o:CharactersWithSpaces>8847</o:CharactersWithSpaces>
<o:Version>9.2720</o:Version>
</o:DocumentProperties>
</xml><![endif]-->
<STYLE>P.MsoNormal {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; mso-fareast-font-family: "Times New Roman"; mso-style-parent: ""; mso-pagination: widow-orphan
}
LI.MsoNormal {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; mso-fareast-font-family: "Times New Roman"; mso-style-parent: ""; mso-pagination: widow-orphan
}
DIV.MsoNormal {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; mso-fareast-font-family: "Times New Roman"; mso-style-parent: ""; mso-pagination: widow-orphan
}
H1 {
FONT-FAMILY: Arial; FONT-SIZE: 16pt; MARGIN: 12pt 0in 3pt; mso-pagination: widow-orphan; mso-style-next: Normal; mso-outline-level: 1; mso-font-kerning: 16.0pt
}
H2 {
FONT-FAMILY: Arial; FONT-SIZE: 14pt; FONT-STYLE: italic; MARGIN: 12pt 0in 3pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo2; tab-stops: list .5in; mso-pagination: widow-orphan; mso-style-next: Normal; mso-outline-level: 2
}
P.MsoIndex1 {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt 12pt; TEXT-INDENT: -12pt; mso-fareast-font-family: "Times New Roman"; mso-pagination: widow-orphan; mso-style-next: Normal; mso-style-update: auto
}
LI.MsoIndex1 {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt 12pt; TEXT-INDENT: -12pt; mso-fareast-font-family: "Times New Roman"; mso-pagination: widow-orphan; mso-style-next: Normal; mso-style-update: auto
}
DIV.MsoIndex1 {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt 12pt; TEXT-INDENT: -12pt; mso-fareast-font-family: "Times New Roman"; mso-pagination: widow-orphan; mso-style-next: Normal; mso-style-update: auto
}
P.MsoIndex2 {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt 24pt; TEXT-INDENT: -12pt; mso-fareast-font-family: "Times New Roman"; mso-pagination: widow-orphan; mso-style-next: Normal; mso-style-update: auto
}
LI.MsoIndex2 {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt 24pt; TEXT-INDENT: -12pt; mso-fareast-font-family: "Times New Roman"; mso-pagination: widow-orphan; mso-style-next: Normal; mso-style-update: auto
}
DIV.MsoIndex2 {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt 24pt; TEXT-INDENT: -12pt; mso-fareast-font-family: "Times New Roman"; mso-pagination: widow-orphan; mso-style-next: Normal; mso-style-update: auto
}
P.MsoIndex3 {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -12pt; mso-fareast-font-family: "Times New Roman"; mso-pagination: widow-orphan; mso-style-next: Normal; mso-style-update: auto
}
LI.MsoIndex3 {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -12pt; mso-fareast-font-family: "Times New Roman"; mso-pagination: widow-orphan; mso-style-next: Normal; mso-style-update: auto
}
DIV.MsoIndex3 {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -12pt; mso-fareast-font-family: "Times New Roman"; mso-pagination: widow-orphan; mso-style-next: Normal; mso-style-update: auto
}
P.MsoIndex4 {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt 48pt; TEXT-INDENT: -12pt; mso-fareast-font-family: "Times New Roman"; mso-pagination: widow-orphan; mso-style-next: Normal; mso-style-update: auto
}
LI.MsoIndex4 {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt 48pt; TEXT-INDENT: -12pt; mso-fareast-font-family: "Times New Roman"; mso-pagination: widow-orphan; mso-style-next: Normal; mso-style-update: auto
}
DIV.MsoIndex4 {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt 48pt; TEXT-INDENT: -12pt; mso-fareast-font-family: "Times New Roman"; mso-pagination: widow-orphan; mso-style-next: Normal; mso-style-update: auto
}
P.MsoIndex5 {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt 60pt; TEXT-INDENT: -12pt; mso-fareast-font-family: "Times New Roman"; mso-pagination: widow-orphan; mso-style-next: Normal; mso-style-update: auto
}
LI.MsoIndex5 {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt 60pt; TEXT-INDENT: -12pt; mso-fareast-font-family: "Times New Roman"; mso-pagination: widow-orphan; mso-style-next: Normal; mso-style-update: auto
}
DIV.MsoIndex5 {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt 60pt; TEXT-INDENT: -12pt; mso-fareast-font-family: "Times New Roman"; mso-pagination: widow-orphan; mso-style-next: Normal; mso-style-update: auto
}
P.MsoIndex6 {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt 1in; TEXT-INDENT: -12pt; mso-fareast-font-family: "Times New Roman"; mso-pagination: widow-orphan; mso-style-next: Normal; mso-style-update: auto
}
LI.MsoIndex6 {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt 1in; TEXT-INDENT: -12pt; mso-fareast-font-family: "Times New Roman"; mso-pagination: widow-orphan; mso-style-next: Normal; mso-style-update: auto
}
DIV.MsoIndex6 {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt 1in; TEXT-INDENT: -12pt; mso-fareast-font-family: "Times New Roman"; mso-pagination: widow-orphan; mso-style-next: Normal; mso-style-update: auto
}
P.MsoIndex7 {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt 84pt; TEXT-INDENT: -12pt; mso-fareast-font-family: "Times New Roman"; mso-pagination: widow-orphan; mso-style-next: Normal; mso-style-update: auto
}
LI.MsoIndex7 {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt 84pt; TEXT-INDENT: -12pt; mso-fareast-font-family: "Times New Roman"; mso-pagination: widow-orphan; mso-style-next: Normal; mso-style-update: auto
}
DIV.MsoIndex7 {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt 84pt; TEXT-INDENT: -12pt; mso-fareast-font-family: "Times New Roman"; mso-pagination: widow-orphan; mso-style-next: Normal; mso-style-update: auto
}
P.MsoIndex8 {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt 96pt; TEXT-INDENT: -12pt; mso-fareast-font-family: "Times New Roman"; mso-pagination: widow-orphan; mso-style-next: Normal; mso-style-update: auto
}
LI.MsoIndex8 {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt 96pt; TEXT-INDENT: -12pt; mso-fareast-font-family: "Times New Roman"; mso-pagination: widow-orphan; mso-style-next: Normal; mso-style-update: auto
}
DIV.MsoIndex8 {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt 96pt; TEXT-INDENT: -12pt; mso-fareast-font-family: "Times New Roman"; mso-pagination: widow-orphan; mso-style-next: Normal; mso-style-update: auto
}
P.MsoIndex9 {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt 1.5in; TEXT-INDENT: -12pt; mso-fareast-font-family: "Times New Roman"; mso-pagination: widow-orphan; mso-style-next: Normal; mso-style-update: auto
}
LI.MsoIndex9 {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt 1.5in; TEXT-INDENT: -12pt; mso-fareast-font-family: "Times New Roman"; mso-pagination: widow-orphan; mso-style-next: Normal; mso-style-update: auto
}
DIV.MsoIndex9 {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt 1.5in; TEXT-INDENT: -12pt; mso-fareast-font-family: "Times New Roman"; mso-pagination: widow-orphan; mso-style-next: Normal; mso-style-update: auto
}
P.MsoHeader {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; mso-fareast-font-family: "Times New Roman"; tab-stops: center 3.0in right 6.0in; mso-pagination: widow-orphan
}
LI.MsoHeader {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; mso-fareast-font-family: "Times New Roman"; tab-stops: center 3.0in right 6.0in; mso-pagination: widow-orphan
}
DIV.MsoHeader {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; mso-fareast-font-family: "Times New Roman"; tab-stops: center 3.0in right 6.0in; mso-pagination: widow-orphan
}
P.MsoFooter {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; mso-fareast-font-family: "Times New Roman"; tab-stops: center 3.0in right 6.0in; mso-pagination: widow-orphan
}
LI.MsoFooter {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; mso-fareast-font-family: "Times New Roman"; tab-stops: center 3.0in right 6.0in; mso-pagination: widow-orphan
}
DIV.MsoFooter {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; mso-fareast-font-family: "Times New Roman"; tab-stops: center 3.0in right 6.0in; mso-pagination: widow-orphan
}
P.MsoIndexHeading {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; mso-fareast-font-family: "Times New Roman"; mso-pagination: widow-orphan; mso-style-next: "Index 1"
}
LI.MsoIndexHeading {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; mso-fareast-font-family: "Times New Roman"; mso-pagination: widow-orphan; mso-style-next: "Index 1"
}
DIV.MsoIndexHeading {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; mso-fareast-font-family: "Times New Roman"; mso-pagination: widow-orphan; mso-style-next: "Index 1"
}
P.MsoBodyTextIndent {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt 0.5in; mso-fareast-font-family: "Times New Roman"; mso-pagination: widow-orphan
}
LI.MsoBodyTextIndent {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt 0.5in; mso-fareast-font-family: "Times New Roman"; mso-pagination: widow-orphan
}
DIV.MsoBodyTextIndent {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt 0.5in; mso-fareast-font-family: "Times New Roman"; mso-pagination: widow-orphan
}
P.MsoBodyTextIndent2 {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt 1in; mso-fareast-font-family: "Times New Roman"; mso-pagination: widow-orphan
}
LI.MsoBodyTextIndent2 {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt 1in; mso-fareast-font-family: "Times New Roman"; mso-pagination: widow-orphan
}
DIV.MsoBodyTextIndent2 {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt 1in; mso-fareast-font-family: "Times New Roman"; mso-pagination: widow-orphan
}
P.MsoBodyTextIndent3 {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt 0.25in; mso-fareast-font-family: "Times New Roman"; mso-pagination: widow-orphan
}
LI.MsoBodyTextIndent3 {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt 0.25in; mso-fareast-font-family: "Times New Roman"; mso-pagination: widow-orphan
}
DIV.MsoBodyTextIndent3 {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt 0.25in; mso-fareast-font-family: "Times New Roman"; mso-pagination: widow-orphan
}
P.MsoBlockText {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in -0.5in 0pt 1in; mso-fareast-font-family: "Times New Roman"; mso-pagination: widow-orphan
}
LI.MsoBlockText {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in -0.5in 0pt 1in; mso-fareast-font-family: "Times New Roman"; mso-pagination: widow-orphan
}
DIV.MsoBlockText {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in -0.5in 0pt 1in; mso-fareast-font-family: "Times New Roman"; mso-pagination: widow-orphan
}
A:link {
COLOR: blue; TEXT-DECORATION: underline; text-underline: single
}
SPAN.MsoHyperlink {
COLOR: blue; TEXT-DECORATION: underline; text-underline: single
}
A:visited {
COLOR: purple; TEXT-DECORATION: underline; text-underline: single
}
SPAN.MsoHyperlinkFollowed {
COLOR: purple; TEXT-DECORATION: underline; text-underline: single
}
DIV.Section1 {
page: Section1
}
OL {
MARGIN-BOTTOM: 0in
}
UL {
MARGIN-BOTTOM: 0in
}
</STYLE>
</HEAD>
<BODY lang=EN-US link=blue style="tab-interval: .5in" vLink=purple>
<DIV class=Section1>
<H1>Specification for Generic Touch Screen Driver</H1>
<P class=MsoNormal><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></P>
<P class=MsoNormal><B><SPAN style="FONT-FAMILY: Arial">Version:<SPAN
style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN
style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</SPAN>0.2 (draft)<o:p></o:p></SPAN></B></P>
<P class=MsoNormal><B><SPAN style="FONT-FAMILY: Arial">Last Updated:<SPAN
style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</SPAN>17-July-2000<o:p></o:p></SPAN></B></P>
<H2><![if !supportLists]>1.<SPAN
style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp; </SPAN><![endif]>Major
Number and Minor Numbers</H2>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in">A generic Touch Screen major and
minor numbers to be registered according to the procedure documented in <SPAN
style="FONT-FAMILY: 'Courier New'">../linux/Documentation/devices.txt</SPAN>.
New registrations are to be sent to the address <SPAN
style="FONT-FAMILY: 'Courier New'"><A
href="mailto:device@lanana.org">device@lanana.org</A>.<o:p></o:p></SPAN></P>
<P class=MsoNormal><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in">A major number 10 seems the most
likely candidate at this stage (TBD).</P>
<H2><![if !supportLists]>2.<SPAN
style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;
</SPAN><![endif]>Resolution</H2>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in">In some applications high
(sub-pixel) resolution may be required from the device driver for graphical
tasks such as drawing (digital ink) and/or hand writing recognition (HWR). In
other applications lower (pixel) resolution may be required for core pointer
control of menus and other applications. In many applications, however, it is
desirable to do both at once.</P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></P>
<P class=MsoBodyTextIndent>To achieve this goal in X, several extensions have
been added to the X Input support in XFree86 they are currently under
investigation for use with this driver. (See the Owen Taylor link below).</P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in">From the driver point of view the
high (sub-pixel) resolution data are passed to it’s client via the user space
and kernel <SPAN style="FONT-FAMILY: 'Courier New'">read()</SPAN> functions .
The client of the driver will be able to convert to pixel resolution, if
required, by using the previously saved affine transform parameters <SPAN
style="FONT-FAMILY: 'Courier New'">x[y]scale and x[y]trans</SPAN>. (see the
Calibration section below).</P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0.5in"><SPAN
style="FONT-FAMILY: 'Courier New'">/dev/ts</SPAN> </P>
<P class=MsoBlockText>This is the device name used to return “raw” sub-pixel
resolution coordinates from the digitizer. (Note 3)</P><SPAN
style="FONT-FAMILY: 'Times New Roman'; FONT-SIZE: 12pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"><BR
clear=all
style="PAGE-BREAK-BEFORE: always; mso-special-character: line-break"></SPAN>
<P class=MsoNormal><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></P>
<H2><![if !supportLists]>3.<SPAN
style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp; </SPAN><![endif]>Touch
Screen Event Structure (TS_EVENT)</H2>
<P class=MsoNormal><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><SPAN
style="FONT-FAMILY: 'Courier New'">typedef struct {<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><SPAN
style="FONT-FAMILY: 'Courier New'">short pressure; <SPAN
style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN>/* Note 1 */</P>
<P class=MsoNormal style="MARGIN: 0in -0.25in 0pt 0.5in"><SPAN
style="FONT-FAMILY: 'Courier New'">int x;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><SPAN
style="FONT-FAMILY: 'Courier New'">int y;</SPAN></P>
<P class=MsoNormal><SPAN style="FONT-FAMILY: 'Courier New'">#if
1<o:p></o:p></SPAN></P>
<P class=MsoNormal style="TEXT-INDENT: 0.5in"><SPAN
style="FONT-FAMILY: 'Courier New'">int millisecs;</SPAN> <SPAN
style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</SPAN><SPAN
style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</SPAN>/* milliseconds time stamp */<SPAN
style="FONT-FAMILY: 'Courier New'"><o:p></o:p></SPAN></P>
<P class=MsoIndexHeading><SPAN
style="FONT-FAMILY: 'Courier New'">#else<o:p></o:p></SPAN></P>
<P class=MsoNormal style="TEXT-INDENT: 0.5in"><SPAN
style="FONT-FAMILY: 'Courier New'">struct timeval timestamp;<SPAN
style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN></SPAN>/* microsecs
resolution ? */<SPAN style="FONT-FAMILY: 'Courier New'"><o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-FAMILY: 'Courier New'">#endif</SPAN></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><SPAN
style="FONT-FAMILY: 'Courier New'">} TS_EVENT;<o:p></o:p></SPAN></P>
<P class=MsoNormal><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.25in">This structure is generated by
the driver module and passed to the user space by the _<SPAN
style="FONT-FAMILY: 'Courier New'">read()</SPAN> file operation. It is received
by the user space <SPAN
style="FONT-FAMILY: 'Courier New'">read()</SPAN>function.</P>
<P class=MsoNormal style="MARGIN-LEFT: 0.25in"><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></P>
<P class=MsoBodyTextIndent3>Each event has it’s own time stamp which may be used
to measure pen velocity and/or serialize events from different devices. It is
still debatable whether we use microsecond resolution or millisecond resolution.
For maximum accuracy the time stamp is created by the interrupt service routine
in the kernel.</P>
<P class=MsoNormal style="MARGIN-LEFT: 0.25in"><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.25in">Pressure indicates a pen up or
pen down event. The Cartesian coordinates (x and y) (<I>Note 2</I>) indicate the
position of a pen down event. Cartesian coordinates have no meaning for a pen up
event.</P>
<P class=MsoNormal style="MARGIN-LEFT: 0.25in"><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.25in">Although the event is shown in
<SPAN style="FONT-FAMILY: 'Courier New'">TS_EVENT</SPAN> consist of a simple set
of cartesian coordinates and a pressure attribute, work is still under way
investigating a more general case which would cater for more sophisticated
digitizers such as the range of Wacom tablets. These devices have typically more
than one pen type – each pen type having it’s own attributes. For example the
Wacom can have three pen types (pen,puck or airbrush) with the airbrush, alone,
requiring five parameters -<SPAN style="mso-spacerun: yes">&nbsp; </SPAN><SPAN
style="FONT-FAMILY: 'Courier New'">x, y, z</SPAN>(distance from paper),<SPAN
style="FONT-FAMILY: 'Courier New'">air_volume</SPAN> and <SPAN
style="FONT-FAMILY: 'Courier New'">paint_volume</SPAN>. In addition to pen types
there maybe pen colours, sylus angle etc to worry about.</P>
<P class=MsoNormal style="MARGIN-LEFT: 0.25in"><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.25in">Owen Taylor’s web site at:</P>
<P class=MsoNormal style="MARGIN-LEFT: 0.25in"><A
href="http://www.gtk.org/~otaylor/xinput/howto/basic-information.html">http://www.gtk.org/~otaylor/index.html<SPAN
style="COLOR: windowtext; TEXT-DECORATION: none; text-underline: none">
</SPAN></A></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.25in">describes work already been done
for Watcom Artpad II devices using GMIP (Gnu Image Manipulation Program),GTK+
(Gmip Tool Kit) and the X Input extension</P>
<P class=MsoNormal><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></P>
<P class=MsoNormal><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></P>
<P class=MsoNormal><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></P>
<H2><![if !supportLists]>4.<SPAN
style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp; </SPAN><![endif]>User
Level File Operations</H2>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in">In addition to <SPAN
style="FONT-FAMILY: 'Courier New'">open(),</SPAN> <SPAN
style="FONT-FAMILY: 'Courier New'">close()</SPAN> and <SPAN
style="FONT-FAMILY: 'Courier New'">ioctl()</SPAN> functions, blocking and
non-blocking <SPAN style="FONT-FAMILY: 'Courier New'">read()</SPAN> and
asynchronous notification (<SPAN
style="FONT-FAMILY: 'Courier New'">SIGIO</SPAN>) should be supported at the user
level. The <SPAN style="FONT-FAMILY: 'Courier New'">select/poll</SPAN> mechanism
will also be supported.</P>
<P class=MsoNormal><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></P>
<H2><![if !supportLists]>5.<SPAN
style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp; </SPAN><![endif]>Kernel
Level File Operations</H2>
<P class=MsoNormal><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></P>
<P class=MsoNormal><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></P>
<P class=MsoBodyTextIndent><SPAN
style="FONT-FAMILY: 'Courier New'">_read()<o:p></o:p></SPAN></P>
<P class=MsoNormal><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></P>
<P class=MsoBodyTextIndent2>Blocking reads will block until a TS_EVENT structure
(see below) can be returned.</P>
<P class=MsoBodyTextIndent style="MARGIN-LEFT: 0in"><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></P>
<P class=MsoBodyTextIndent><SPAN
style="FONT-FAMILY: 'Courier New'">_fasync()<o:p></o:p></SPAN></P>
<P class=MsoBodyTextIndent><SPAN style="FONT-FAMILY: 'Courier New'"><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></SPAN></P>
<P class=MsoBodyTextIndent2>SIGIO to user when there is an event to report. An
event is defined as reception of a complete TS_EVENT structure.</P>
<P class=MsoNormal><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></P>
<P class=MsoBodyTextIndent><SPAN
style="FONT-FAMILY: 'Courier New'">_poll()<o:p></o:p></SPAN></P>
<P class=MsoNormal><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></P>
<P class=MsoBodyTextIndent style="MARGIN-LEFT: 1in">If there are 1 or more
TS_EVENT structures to be read then this function will return the (POLLIN |
POLLRDNORM) flags otherwise a zero will be returned.</P>
<P class=MsoNormal><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></P>
<P class=MsoBodyTextIndent><SPAN
style="FONT-FAMILY: 'Courier New'">_ioctl()<o:p></o:p></SPAN></P>
<P class=MsoNormal><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></P>
<P class=MsoBodyTextIndent style="MARGIN-LEFT: 1in">The list of ioctls will
depend on the hardware used to implement the touch screen (example UCB1200).
Initialisation ioctls will be called by the driver’s init_module() or
equivalent.</P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></P>
<P class=MsoNormal style="MARGIN-LEFT: 1in">The ioctl command numbers should be
‘mangled’ using the <SPAN
style="FONT-FAMILY: 'Courier New'">_IO<I>,</I>_IOW,_IOR,_IOWR</SPAN> macros as
defined in<SPAN style="mso-spacerun: yes">&nbsp; </SPAN><SPAN
style="FONT-FAMILY: 'Courier New'">&lt;linux/ioctl.h&gt;<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN-LEFT: 1in"><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></P>
<P class=MsoNormal style="MARGIN-LEFT: 1in">A ‘magic number’ of <SPAN
style="FONT-FAMILY: 'Courier New'">‘t’</SPAN> should be used (see CALIBRATION
section)</P>
<P class=MsoNormal style="MARGIN-LEFT: 1in"><SPAN
style="FONT-FAMILY: 'Courier New'">#define IOC_MAGIC ‘t’<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN-LEFT: 1in"><SPAN
style="FONT-FAMILY: 'Courier New'"><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN-LEFT: 1in">See the calibration section for
ioctl usage.<SPAN style="FONT-FAMILY: 'Courier New'"><o:p></o:p></SPAN></P><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 12pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"><BR
clear=all
style="PAGE-BREAK-BEFORE: always; mso-special-character: line-break"></SPAN>
<P class=MsoNormal
style="MARGIN-LEFT: 1in"><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></P>
<H2><![if !supportLists]>6.<SPAN
style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp; </SPAN><![endif]>Touch
Screen Example<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>Code</H2>
<P class=MsoNormal><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in">The following example code can be
found in the <SPAN style="FONT-FAMILY: 'Courier New'">../apps/h3600_test</SPAN>
directory on the <A
href="http://www.handhelds.org/">http://www.handhelds.org/</A> CVS tree.</P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><SPAN
style="FONT-FAMILY: 'Courier New'">ts_poll.c</SPAN> </P>
<P class=MsoNormal style="MARGIN-LEFT: 1in">example of a non-blocking read using
the poll/select mechanism.</P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><SPAN
style="FONT-FAMILY: 'Courier New'">ts_read.c</SPAN></P>
<P class=MsoNormal style="MARGIN-LEFT: 1in">example of a blocking read.</P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><SPAN
style="FONT-FAMILY: 'Courier New'">fasynctst.c</SPAN></P>
<P class=MsoNormal style="MARGIN-LEFT: 1in">example of how asynchronous
notifications are handled in user space.</P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in">The Compaq iPAQ touch screen
driver (<SPAN style="FONT-FAMILY: 'Courier New'">h3650_ts.c)</SPAN> implements
the above file operations and can be found in the <SPAN
style="FONT-FAMILY: 'Courier New'">../drivers/char</SPAN> directory in the <A
href="http://www.handhelds.org/">http://www.handhelds.org/</A> CVS tree.</P>
<P class=MsoNormal><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></P>
<H2><![if !supportLists]>7.<SPAN
style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;
</SPAN><![endif]>Calibration</H2>
<P class=MsoNormal><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></P>
<P class=MsoBodyTextIndent>It was has been stated that “most” devices will work
with a single affine (linear) transform. This section describes the calibration
technique used by Itsy and the Compaq iPAQ which uses an affine transform with
zero shear and rotation. (Q: If this is an affine transform then will shear and
rotation be necessary?)</P>
<P class=MsoBodyTextIndent style="MARGIN-LEFT: 0in"><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></P>
<P class=MsoBodyTextIndent>For a<SPAN style="mso-spacerun: yes">&nbsp;
</SPAN>good introduction to the affine transform see</P>
<P class=MsoBodyTextIndent><A
href="http://gamelan.earthweb.com/javaprogramming/baldwin/new/030700_J306.html#_What_is_an">http://gamelan.earthweb.com/javaprogramming/baldwin/new/030700_J306.html#_What_is_an</A></P>
<P
class=MsoBodyTextIndent><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></P>
<P class=MsoBodyTextIndent>The affine matrix (calibration parameters x/yscale
and x/ytrans) are calculated by a separate calibration application (note 4). It
assumes zero shear and rotation. </P>
<P class=MsoNormal><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></P>
<P class=MsoNormal style="MARGIN-LEFT: 1in"><SPAN
style="FONT-FAMILY: 'Courier New'">Xcal = (xscale * Xraw) +
xtrans<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN-LEFT: 1in"><SPAN
style="FONT-FAMILY: 'Courier New'">Ycal = (yscale * Yraw) +
ytrans<o:p></o:p></SPAN></P>
<P class=MsoNormal><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></P>
<P class=MsoBodyTextIndent>Xcal and Ycal are the (pixel resolution) Cartesian
coordinates.</P>
<P class=MsoBodyTextIndent>Xraw and Yraw are the high (sub-pixel resolution)
Cartesian coordinates.</P>
<P class=MsoBodyTextIndent>Xscale and Yscale are the scaling factor</P>
<P class=MsoBodyTextIndent>Xtrans and Ytrans are the translation.factor.</P>
<P class=MsoBodyTextIndent style="MARGIN-LEFT: 0in"><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></P>
<P class=MsoBodyTextIndent>For increased accuracy xscale and yscale are
multiplied by 256 and stored in the TS_CAL structure in the driver.</P>
<P
class=MsoBodyTextIndent><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></P>
<P class=MsoBodyTextIndent style="MARGIN-LEFT: 1in"><SPAN
style="FONT-FAMILY: 'Courier New'">Xscale = xscale &lt;&lt;
8<o:p></o:p></SPAN></P>
<P class=MsoBodyTextIndent style="MARGIN-LEFT: 1in"><SPAN
style="FONT-FAMILY: 'Courier New'">Yscale = yscale &lt;&lt;
8<o:p></o:p></SPAN></P>
<P class=MsoBodyTextIndent style="MARGIN-LEFT: 1in"><SPAN
style="FONT-FAMILY: 'Courier New'"><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in">During conversion from Xraw to
Xcal the reverse transformation is required.</P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></P>
<P class=MsoNormal style="MARGIN-LEFT: 1in"><SPAN
style="FONT-FAMILY: 'Courier New'">Xcal = ( (Xscale * Xraw) &gt;&gt; 8 ) +
xtrans<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN-LEFT: 1in"><SPAN
style="FONT-FAMILY: 'Courier New'">Ycal = ( (Yscale * Yraw) &gt;&gt; 8 ) +
ytrans<o:p></o:p></SPAN></P>
<P class=MsoNormal><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in">The affine transform matrix
(calibration information) is held in the <SPAN
style="FONT-FAMILY: 'Courier New'">TS_CAL</SPAN> structure. It is stored in the
driver using the <SPAN
style="FONT-FAMILY: 'Courier New'">TS_SET_CALIBRATE</SPAN> ioctl.</P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in">Applications requiring sub-pixel
to pixel transformations can retrieve the matrix in structure TS_CAL using the
<SPAN style="FONT-FAMILY: 'Courier New'">TS_GET_CALIBRATE</SPAN> ioctls.</P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><SPAN
style="FONT-FAMILY: 'Courier New'">#define TS_SET_CALIBRATE<SPAN
style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;
</SPAN>_IOW(IOC_MAGIC,0,TS_CAL);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><SPAN
style="FONT-FAMILY: 'Courier New'">#define TS_GET_CALIBRATE<SPAN
style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;
</SPAN>_IOW(IOC_MAGIC,1,TS_CAL);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in">The <SPAN
style="FONT-FAMILY: 'Courier New'">TS_CAL</SPAN> structure is used to convert
high (sub-pixel) resolution coordinates (<SPAN
style="FONT-FAMILY: 'Courier New'">Xraw</SPAN> and <SPAN
style="FONT-FAMILY: 'Courier New'">Yraw</SPAN>) to<SPAN
style="mso-spacerun: yes">&nbsp; </SPAN>pixel<SPAN
style="mso-spacerun: yes">&nbsp; </SPAN>coordinates (<SPAN
style="FONT-FAMILY: 'Courier New'">Xcal </SPAN>and <SPAN
style="FONT-FAMILY: 'Courier New'">Ycal</SPAN>) suitable for core pointer
control of menus and other applications.</P>
<P
class=MsoIndexHeading><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><SPAN
style="FONT-FAMILY: 'Courier New'">typedef struct {<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><SPAN
style="FONT-FAMILY: 'Courier New'">int Xscale;<SPAN
style="mso-tab-count: 1">&nbsp; </SPAN><SPAN
style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN>/* Xscale =
xscale &lt;&lt; 8 */<SPAN
style="FONT-FAMILY: 'Courier New'"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><SPAN
style="FONT-FAMILY: 'Courier New'">int xtrans;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><SPAN
style="FONT-FAMILY: 'Courier New'">int Yscale;<SPAN
style="mso-tab-count: 1">&nbsp; </SPAN><SPAN
style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN>/* Yscale =
yscale &lt;&lt; 8 */<SPAN
style="FONT-FAMILY: 'Courier New'"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><SPAN
style="FONT-FAMILY: 'Courier New'">int ytrans;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><SPAN
style="FONT-FAMILY: 'Courier New'">} TS_CAL;<o:p></o:p></SPAN></P>
<P class=MsoNormal><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></P>
<H2><![if !supportLists]>8.<SPAN
style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp; </SPAN><![endif]>Touch
Screen Calibration Application Example<SPAN style="mso-spacerun: yes">&nbsp;
</SPAN>Code</H2>
<P class=MsoNormal><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></P>
<P class=MsoBodyTextIndent>The H3600 calibration application can be found in
<SPAN style="FONT-FAMILY: 'Courier New'">../apps/calibrate.c</SPAN>. This code
is extensively commented and will explain how the Itsy calibration application
works. Note is uses a device called <SPAN
style="FONT-FAMILY: 'Courier New'">/dev/h3600_tsraw</SPAN> to get raw
data.</P><SPAN
style="FONT-FAMILY: 'Times New Roman'; FONT-SIZE: 12pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"><BR
clear=all
style="PAGE-BREAK-BEFORE: always; mso-special-character: line-break"></SPAN>
<P class=MsoNormal><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></P>
<H2><![if !supportLists]>9.<SPAN
style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;
</SPAN><![endif]>Notes</H2>
<OL style="MARGIN-TOP: 0in" type=1>
<LI class=MsoNormal
style="mso-list: l0 level1 lfo1; tab-stops: list .5in">Some systems return
pressure as a value between 0 and xxxx which is used to determine the pen
status (<SPAN style="FONT-FAMILY: 'Courier New'">pen up</SPAN> or <SPAN
style="FONT-FAMILY: 'Courier New'">pen down</SPAN>). The Compaq iPAQ H3600
just returns pressure=0 (<SPAN style="FONT-FAMILY: 'Courier New'">pen
up</SPAN>) or pressure=1 (<SPAN style="FONT-FAMILY: 'Courier New'">pen
down</SPAN>). If<SPAN style="mso-spacerun: yes">&nbsp; </SPAN><SPAN
style="FONT-FAMILY: 'Courier New'">pen up</SPAN> then the X and Y coordinates
meaningless and are set to –1.
<LI class=MsoNormal
style="mso-list: l0 level1 lfo1; tab-stops: list .5in">Cartesian coordinate
system is assumed for the present however a more general approach may be to
probe for the coordinate system the driver will return ( Cartesian , polar or
“other”).
<LI class=MsoNormal
style="mso-list: l0 level1 lfo1; tab-stops: list .5in">Another technique is to
have two devices, each with the same major number but different minor numbers.
One device <SPAN style="FONT-FAMILY: 'Courier New'">(/dev/tsc</SPAN> ) would
return normalized (pixel) data and the other <SPAN
style="FONT-FAMILY: 'Courier New'">(/dev/ts</SPAN>) would return sub-pixel
“raw” data. Both devices would be able to be accessed concurrently. Clients of
the driver would therefore have the choice of either “cooking” the data
themselves (by multiplying the raw data with the pre-stored calibration data –
x/ytrans and x/yscale) or getting the kernel to return it already “cooked” via
the <SPAN style="FONT-FAMILY: 'Courier New'">/dev/tsc</SPAN> device.
<LI class=MsoNormal
style="mso-list: l0 level1 lfo1; tab-stops: list .5in">During boot if the
affine parameters (<SPAN style="FONT-FAMILY: 'Courier New'">x/yscale and
x/ytrans</SPAN>) havn’t been calculated then the system needs to automatically
fire up the calibration algorithm to calculate them.
</LI></OL></DIV></BODY></HTML>