summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Osterlund <petero2@telia.com>2004-04-18 01:52:08 +0200
committerPeter Osterlund <petero2@telia.com>2006-04-09 04:02:06 +0200
commit3e37b4c7d263b033741bf1c8176c013e5e7ca739 (patch)
tree291793647ed70d4832688056233d68770d52f042
parent647c5ae5f5658fabb46ce434be47e2892bed2111 (diff)
Moved the CommData struct from synaptics.h to synproto.h so
that ps2comm.c and eventcomm.c don't have to define SYNAPTICS_PRIVATE.
-rw-r--r--eventcomm.c1
-rw-r--r--ps2comm.c5
-rw-r--r--synaptics.c1
-rw-r--r--synaptics.h15
-rw-r--r--synproto.h15
5 files changed, 17 insertions, 20 deletions
diff --git a/eventcomm.c b/eventcomm.c
index 93834cc..90d35d3 100644
--- a/eventcomm.c
+++ b/eventcomm.c
@@ -20,7 +20,6 @@
#include "eventcomm.h"
#include "synproto.h"
#include <xisb.h>
-#define SYNAPTICS_PRIVATE
#include "synaptics.h"
#include <xf86.h>
diff --git a/ps2comm.c b/ps2comm.c
index 1bf8970..e5cccc9 100644
--- a/ps2comm.c
+++ b/ps2comm.c
@@ -28,7 +28,6 @@
#include "ps2comm.h"
#include "synproto.h"
#include <xisb.h>
-#define SYNAPTICS_PRIVATE
#include "synaptics.h"
#include <xf86.h>
@@ -565,7 +564,7 @@ SynapticsGetPacket(LocalDevicePtr local, synapticshw_t *synhw,
if ((c == 0x00) && (comm->lastByte == 0xAA)) {
if (xf86WaitForInput(local->fd, 50000) == 0) {
DBG(7, ErrorF("Reset received\n"));
- QueryHardware(local);
+ PS2QueryHardware(local, synhw);
} else
DBG(3, ErrorF("faked reset received\n"));
}
@@ -591,7 +590,7 @@ SynapticsGetPacket(LocalDevicePtr local, synapticshw_t *synhw,
if (comm->outOfSync > MAX_UNSYNC_PACKETS) {
comm->outOfSync = 0;
DBG(3, ErrorF("Synaptics synchronization lost too long -> reset touchpad.\n"));
- QueryHardware(local); /* including a reset */
+ PS2QueryHardware(local, synhw); /* including a reset */
continue;
}
}
diff --git a/synaptics.c b/synaptics.c
index 8bfe597..a532e4b 100644
--- a/synaptics.c
+++ b/synaptics.c
@@ -63,7 +63,6 @@
#include <xf86_ansic.h>
#include <xf86_OSproc.h>
#include <xf86Xinput.h>
-#include <xisb.h>
#include "mipointer.h"
#ifdef XFREE_4_0_3
#include <xf86Optrec.h> /* needed for Options */
diff --git a/synaptics.h b/synaptics.h
index 8112ce8..11b963a 100644
--- a/synaptics.h
+++ b/synaptics.h
@@ -131,21 +131,6 @@ enum TapButtonState {
TBS_BUTTON_UP_DOWN /* Send button up event + set down state */
};
-struct CommData {
- XISBuffer *buffer;
- unsigned char protoBuf[6]; /* Buffer for Packet */
- unsigned char lastByte; /* Last read byte. Use for reset sequence detection. */
- int outOfSync; /* How many consecutive incorrect packets we
- have received */
- int protoBufTail;
-
- /* Used for keeping track of partial HwState updates. */
- struct SynapticsHwState hwState;
- Bool oneFinger;
- Bool twoFingers;
- Bool threeFingers;
-};
-
typedef struct _SynapticsPrivateRec
{
/* shared memory pointer */
diff --git a/synproto.h b/synproto.h
index b653ad6..a7c63c0 100644
--- a/synproto.h
+++ b/synproto.h
@@ -21,6 +21,7 @@
#include <sys/ioctl.h>
#include <xf86Xinput.h>
+#include <xisb.h>
/*
* A structure to describe the state of the touchpad hardware (buttons and pad)
@@ -48,6 +49,20 @@ struct SynapticsHwState {
int guest_dy;
};
+struct CommData {
+ XISBuffer *buffer;
+ unsigned char protoBuf[6]; /* Buffer for Packet */
+ unsigned char lastByte; /* Last read byte. Use for reset sequence detection. */
+ int outOfSync; /* How many consecutive incorrect packets we
+ have received */
+ int protoBufTail;
+
+ /* Used for keeping track of partial HwState updates. */
+ struct SynapticsHwState hwState;
+ Bool oneFinger;
+ Bool twoFingers;
+ Bool threeFingers;
+};
enum SynapticsProtocol {
SYN_PROTO_PSAUX, /* Raw psaux device */