diff -urN qt-embedded-free-3.1.2/ADS_BUILD_README qt-embedded-free-3.1.2-ADS/ADS_BUILD_README
--- qt-embedded-free-3.1.2/ADS_BUILD_README	Wed Dec 31 19:00:00 1969
+++ qt-embedded-free-3.1.2-ADS/ADS_BUILD_README	Fri Apr 18 13:01:30 2003
@@ -0,0 +1,22 @@
+export QTDIR=`pwd`
+./configure -embedded arm -qt-mouse-linuxtp -DQT_QWS_ADS
+
+Then do:
+
+/usr/bin/gmake
+
+Now the libraries and the example programs are compiled.
+
+To run a program:
+
+  export QTDIR=<location of qt>
+  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$QTDIR/lib
+  export QWS_MOUSE_PROTO=linuxtp
+
+or if you are using a PS2 mouse:
+
+  export QWS_MOUSE_PROTO=IntelliMouse
+
+or if you are using a serial mouse:
+
+  export QWS_MOUSE_PROTO=Microsoft
diff -urN qt-embedded-free-3.1.2/include/qmouselinuxtp_qws.h qt-embedded-free-3.1.2-ADS/include/qmouselinuxtp_qws.h
--- qt-embedded-free-3.1.2/include/qmouselinuxtp_qws.h	Mon Feb 24 03:29:58 2003
+++ qt-embedded-free-3.1.2-ADS/include/qmouselinuxtp_qws.h	Thu Apr 17 10:29:35 2003
@@ -35,7 +35,7 @@
 
 #include "qmouse_qws.h"
 
-#if defined(QT_QWS_SHARP) || defined(QT_QWS_IPAQ)
+#if defined(QT_QWS_SHARP) || defined(QT_QWS_IPAQ) || defined(QT_QWS_ADS)
 
 class QWSLinuxTPMouseHandlerPrivate;
 
diff -urN qt-embedded-free-3.1.2/src/embedded/qmousedriverfactory_qws.cpp qt-embedded-free-3.1.2-ADS/src/embedded/qmousedriverfactory_qws.cpp
--- qt-embedded-free-3.1.2/src/embedded/qmousedriverfactory_qws.cpp	Mon Feb 24 03:29:59 2003
+++ qt-embedded-free-3.1.2-ADS/src/embedded/qmousedriverfactory_qws.cpp	Thu Apr 17 16:51:37 2003
@@ -108,7 +108,7 @@
     if ( driver == "qnx" || driver.isEmpty() )
 	return new QWSQnxMouseHandler( key, device );
 #endif
-#if defined(QT_QWS_SHARP) || defined(QT_QWS_IPAQ)
+#if defined(QT_QWS_SHARP) || defined(QT_QWS_IPAQ)  || defined(QT_QWS_ADS)
     if ( driver == "linuxtp" || driver.isEmpty() )
 	return new QWSLinuxTPMouseHandler( key, device );
 #endif
@@ -162,7 +162,7 @@
     if ( !list.contains( "Qnx" ) )
 	list << "Qnx";
 #endif
-#if defined(QT_QWS_SHARP) || defined(QT_QWS_IPAQ)
+#if defined(QT_QWS_SHARP) || defined(QT_QWS_IPAQ) || defined(QT_QWS_ADS)
     if ( !list.contains( "LinuxTP" ) )
 	list << "LinuxTP";
 #endif
diff -urN qt-embedded-free-3.1.2/src/embedded/qmouselinuxtp_qws.cpp qt-embedded-free-3.1.2-ADS/src/embedded/qmouselinuxtp_qws.cpp
--- qt-embedded-free-3.1.2/src/embedded/qmouselinuxtp_qws.cpp	Mon Feb 24 03:29:57 2003
+++ qt-embedded-free-3.1.2-ADS/src/embedded/qmouselinuxtp_qws.cpp	Fri Apr 18 12:10:20 2003
@@ -57,6 +57,12 @@
 	unsigned short y;
 	unsigned short pad;
 } TS_EVENT;
+#elif defined(QT_QWS_ADS)
+typedef struct {
+	short x;
+	short y;
+	short pressure;
+} TS_EVENT;
 #elif defined(QT_QWS_EBX)
 #define QT_QWS_EBX_RAW
 #ifndef QT_QWS_SHARP
@@ -151,6 +157,11 @@
 	qWarning( "Cannot open /dev/h3600_ts (%s)", strerror(errno));
 	return;
     }
+#elif defined(QT_QWS_ADS)
+    if ((mouseFD = open( "/dev/ts", O_RDONLY | O_NDELAY)) < 0) {
+        qWarning( "Cannot open /dev/ts (%s)", strerror(errno));
+        return;
+     }
 #elif defined(QT_QWS_EBX)
 //# ifdef QT_QWS_EBX_TSRAW
 # if 0
@@ -198,8 +209,21 @@
 
     // perhaps we shouldn't be reading EVERY SAMPLE.
     while ( mouseIdx-idx >= (int)sizeof( TS_EVENT ) ) {
+#ifdef QT_QWS_ADS
+	TS_EVENT ads_data;
+	static short oldx = -1, oldy = -1;
+	data = &ads_data;
+	bcopy(mouseBuf+idx, data, 3*sizeof(short));
+	if (data->x == -1 && data->y == -1) {
+	    data->x = oldx;
+	    data->y = oldy;
+	}
+	oldx = data->x;
+	oldy = data->y;
+#else
 	uchar *mb = mouseBuf+idx;
 	data = (TS_EVENT *) mb;
+#endif
 	if(data->pressure >= QT_QWS_TP_PRESSURE_THRESHOLD) {
 #ifdef QT_QWS_SHARP
 	    samples[currSample] = QPoint( 1000 - data->x, data->y );
@@ -220,7 +244,7 @@
 
 		mousePos = totalMousePos / (sampleCount - 1);
 
-# if defined(QT_QWS_IPAQ_RAW) || defined(QT_QWS_EBX_RAW)
+# if defined(QT_QWS_IPAQ_RAW) || defined(QT_QWS_EBX_RAW) || defined(QT_QWS_ADS)
 		mousePos = handler->transform( mousePos );
 # endif
 		if(!waspressed)
@@ -272,7 +296,11 @@
 		waspressed=false;
 	    }
 	}
+#ifdef QT_QWS_ADS
+	idx += 3 * sizeof( short );
+#else
 	idx += sizeof( TS_EVENT );
+#endif
     }
 
     int surplus = mouseIdx - idx;
diff -urN qt-embedded-free-3.1.2/src/embedded/qmouselinuxtp_qws.h qt-embedded-free-3.1.2-ADS/src/embedded/qmouselinuxtp_qws.h
--- qt-embedded-free-3.1.2/src/embedded/qmouselinuxtp_qws.h	Mon Feb 24 03:29:58 2003
+++ qt-embedded-free-3.1.2-ADS/src/embedded/qmouselinuxtp_qws.h	Thu Apr 17 10:29:35 2003
@@ -35,7 +35,7 @@
 
 #include "qmouse_qws.h"
 
-#if defined(QT_QWS_SHARP) || defined(QT_QWS_IPAQ)
+#if defined(QT_QWS_SHARP) || defined(QT_QWS_IPAQ) || defined(QT_QWS_ADS)
 
 class QWSLinuxTPMouseHandlerPrivate;
 
