diff options
author | Peter Osterlund <petero2@telia.com> | 2004-04-18 01:52:08 +0200 |
---|---|---|
committer | Peter Osterlund <petero2@telia.com> | 2006-04-09 04:02:06 +0200 |
commit | 3e37b4c7d263b033741bf1c8176c013e5e7ca739 (patch) | |
tree | 291793647ed70d4832688056233d68770d52f042 | |
parent | 647c5ae5f5658fabb46ce434be47e2892bed2111 (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.c | 1 | ||||
-rw-r--r-- | ps2comm.c | 5 | ||||
-rw-r--r-- | synaptics.c | 1 | ||||
-rw-r--r-- | synaptics.h | 15 | ||||
-rw-r--r-- | synproto.h | 15 |
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> @@ -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 */ @@ -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 */ |