summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaleb Keithley <kaleb@freedesktop.org>2003-11-25 19:28:47 +0000
committerKaleb Keithley <kaleb@freedesktop.org>2003-11-25 19:28:47 +0000
commit586a474381bc5a714f628282973457e2e918e0a5 (patch)
treebcd8664e3ba8eb2928c1888cb2e765a877fbda82
parent5363ab3ebc4162b75ffd5b0a6a26370ca0911656 (diff)
XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folksxf86-4_3_99_903_specialxf86-4_3_99_902xf86-4_3_99_901xf86-4_3_99_16xf86-012804-2330
-rw-r--r--src/xf86DMC.c30
1 files changed, 24 insertions, 6 deletions
diff --git a/src/xf86DMC.c b/src/xf86DMC.c
index b3015cc..bbefc10 100644
--- a/src/xf86DMC.c
+++ b/src/xf86DMC.c
@@ -27,7 +27,15 @@
* in this Software without prior written authorization from Metro Link.
*
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/input/dmc/xf86DMC.c,v 1.2 2001/11/26 16:25:52 dawes Exp $ */
+ /*
+ * Changes :
+ * 25-Jul-2003 Andreas Kies ( a.kies(at)gppag.de )
+ * - Make driver work again ; Pen-up is one byte in size
+ * - Change extremly missleading error messages
+ * - Make dectection work after restart of X
+ */
+
+/* $XFree86: xc/programs/Xserver/hw/xfree86/input/dmc/xf86DMC.c,v 1.3 2003/06/25 18:06:25 eich Exp $ */
#define _DMC_C_
@@ -342,10 +350,18 @@ DeviceControl (DeviceIntPtr dev, int mode)
}
else
{
+ unsigned char resbuf[1] = { 0x55 };
unsigned char buf[2] = { 0x05, 0x40 };
- sleep(1); /* touch need ca. 500ms delay !!! */
XisbBlockDuration (priv->buffer, 500000);
+ sleep(1); /* touch need ca. 500ms delay !!! */
+ if ( DMCSendPacket(priv, resbuf, 1) != Success )
+ {
+ xf86Msg(X_ERROR, "DMC-Touch reset error\n");
+ return (!Success);
+ }
+
+ sleep(1); /* touch need ca. 500ms delay !!! */
if ( DMCSendPacket(priv, buf, 2) == Success )
{
/* wait for right response */
@@ -357,23 +373,23 @@ DeviceControl (DeviceIntPtr dev, int mode)
buf[0] = 0x31;
DMCSendPacket(priv,buf,1);
priv->lex_mode = DMC_Response0;
- xf86Msg(X_ERROR, "DMC-Touch found\n");
+ xf86Msg(X_INFO, "DMC-Touch found\n");
}
else
{
- xf86Msg(X_ERROR, "DMC-Touch found\n");
+ xf86Msg(X_ERROR, "DMC-Touch not found(bad response)\n");
return (!Success);
}
}
else
{
- xf86Msg(X_ERROR, "DMC-Touch found\n");
+ xf86Msg(X_ERROR, "DMC-Touch not found(no response)\n");
return (!Success);
}
}
else
{
- xf86Msg(X_ERROR, "DMC-Touch found\n");
+ xf86Msg(X_ERROR, "DMC-Touch not found(send error)\n");
return (!Success);
}
}
@@ -627,6 +643,8 @@ DMCGetPacket (DMCPrivatePtr priv)
return (!Success);
priv->packet[0] = (unsigned char) c & 0x3f;
+ if ( ( (unsigned char) c & 0x3f) == 0x10 )
+ return (Success);
priv->lex_mode = DMC_byte1;
break;