summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authoryokota <yokota@FreeBSD.org>2000-03-18 15:21:40 +0000
committeryokota <yokota@FreeBSD.org>2000-03-18 15:21:40 +0000
commitb91cbcb4f136bbc6c178bf362bc909c1f1dc8631 (patch)
treed80e1686adb1efb88325c6782baea25117934aec /sys/i386
parent1385bc5aceee9e021f47fd7a55cb832c8f106d70 (diff)
downloadFreeBSD-src-b91cbcb4f136bbc6c178bf362bc909c1f1dc8631.zip
FreeBSD-src-b91cbcb4f136bbc6c178bf362bc909c1f1dc8631.tar.gz
- Add Support for the following PS/2 mice:
- Microsoft IntelliMouse Explorer: 2 buttons on top, 2 side buttons and a wheel which also acts as the middle button. The mouse is recognized as "IntelliMouse Explorer". - Genius NetScroll Optical: 2 buttons on top, 2 side buttons and a wheel which also acts as the middle button. The mouse is recognized as "NetMouse/NetScroll Optical". - MouseSystems SmartScroll Mouse (OEM from Genius?): 3 buttons on top, 1 side button and a wheel. The mouse is recognized as Genius "NetScroll". - IBM ScrollPoint: 2 buttons on top and a stick between the buttons. The stick can perform "horizontal scroll" in W*ndows environment. The horizontal movement of the stick is detected. It is currently mapped to the Z axis movement in the same way as the first wheel. The mouse is recognized as "MouseMan+", as it is considered to be a variation of MouseMan. - A4 Tech 4D and 4D+ mice. These mice have two wheels! The movement of the second wheel is reported as the Z axis movement in the same way as the first wheel. These mice are recognized as "4D Mouse" and "4D+ Mouse". - Tweak IntelliMouse support code a bit so that less-than-compatible wheel mice can work properly with the psm driver. - Add driver configuration flags which correspond to the kernel options PSM_HOOKRESUME and PSM_RESETAFTERSUSPEND, so that we don't need to recompile the kernel when we need these functions. - Properly keep track of the irq resource. - Add a watchdog timer in case interrupts are lost (experimental). - Add `detach' function (experimental).
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/include/mouse.h48
1 files changed, 44 insertions, 4 deletions
diff --git a/sys/i386/include/mouse.h b/sys/i386/include/mouse.h
index 12d49a2..670f2ae 100644
--- a/sys/i386/include/mouse.h
+++ b/sys/i386/include/mouse.h
@@ -116,6 +116,9 @@ typedef struct mousehw {
#define MOUSE_MODEL_MOUSEMANPLUS 7
#define MOUSE_MODEL_KIDSPAD 8
#define MOUSE_MODEL_VERSAPAD 9
+#define MOUSE_MODEL_EXPLORER 10
+#define MOUSE_MODEL_4D 11
+#define MOUSE_MODEL_4DPLUS 12
typedef struct mousemode {
int protocol; /* MOUSE_PROTO_XXX */
@@ -128,6 +131,16 @@ typedef struct mousemode {
} mousemode_t;
/* protocol */
+/*
+ * Serial protocols:
+ * Microsoft, MouseSystems, Logitech, MM series, MouseMan, Hitachi Tablet,
+ * GlidePoint, IntelliMouse, Thinking Mouse, MouseRemote, Kidspad,
+ * VersaPad
+ * Bus mouse protocols:
+ * bus, InPort
+ * PS/2 mouse protocol:
+ * PS/2
+ */
#define MOUSE_PROTO_UNKNOWN (-1)
#define MOUSE_PROTO_MS 0 /* Microsoft Serial, 3 bytes */
#define MOUSE_PROTO_MSC 1 /* Mouse Systems, 5 bytes */
@@ -193,7 +206,7 @@ typedef struct mousevar {
/* MS IntelliMouse (variant of MS Serial) */
#define MOUSE_INTELLI_PACKETSIZE 4
-#define MOUSE_INTELLI_BUTTON2DOWN 0x10 /* middle button the 4th byte */
+#define MOUSE_INTELLI_BUTTON2DOWN 0x10 /* middle button in the 4th byte */
/* Mouse Systems Corp. mouse data packet */
#define MOUSE_MSC_PACKETSIZE 5
@@ -228,16 +241,34 @@ typedef struct mousevar {
* Yes! this is the same bit
* as SYNC!
*/
-#define MOUSE_PS2PLUS_BUTTON4DOWN 0x10 /* 4th button on MouseMan+ */
-#define MOUSE_PS2PLUS_BUTTON5DOWN 0x20
#define MOUSE_PS2_XNEG 0x10
#define MOUSE_PS2_YNEG 0x20
#define MOUSE_PS2_XOVERFLOW 0x40
#define MOUSE_PS2_YOVERFLOW 0x80
-#define MOUSE_PS2PLUS_ZNEG 0x08 /* MouseMan+ negative wheel movement */
+
+/* Logitech MouseMan+ (PS/2) data packet (PS/2++ protocol) */
#define MOUSE_PS2PLUS_SYNCMASK 0x48
#define MOUSE_PS2PLUS_SYNC 0x48
+#define MOUSE_PS2PLUS_ZNEG 0x08 /* sign bit */
+#define MOUSE_PS2PLUS_BUTTON4DOWN 0x10 /* 4th button on MouseMan+ */
+#define MOUSE_PS2PLUS_BUTTON5DOWN 0x20
+
+/* IBM ScrollPoint (PS/2) also uses PS/2++ protocol */
+#define MOUSE_SPOINT_ZNEG 0x80 /* sign bits */
+#define MOUSE_SPOINT_WNEG 0x08
+
+/* MS IntelliMouse (PS/2) data packet */
+#define MOUSE_PS2INTELLI_PACKETSIZE 4
+/* some compatible mice have additional buttons */
+#define MOUSE_PS2INTELLI_BUTTON4DOWN 0x40
+#define MOUSE_PS2INTELLI_BUTTON5DOWN 0x80
+
+/* MS IntelliMouse Explorer (PS/2) data packet (variation of IntelliMouse) */
+#define MOUSE_EXPLORER_ZNEG 0x08 /* sign bit */
+/* IntelliMouse Explorer has additional button data in the fourth byte */
+#define MOUSE_EXPLORER_BUTTON4DOWN 0x10
+#define MOUSE_EXPLORER_BUTTON5DOWN 0x20
/* Interlink VersaPad (serial I/F) data packet */
#define MOUSE_VERSA_PACKETSIZE 6
@@ -261,6 +292,15 @@ typedef struct mousevar {
#define MOUSE_PS2VERSA_BUTTON3DOWN 0x01 /* right */
#define MOUSE_PS2VERSA_TAP 0x02
+/* A4 Tech 4D Mouse (PS/2) data packet */
+#define MOUSE_4D_PACKETSIZE 3
+#define MOUSE_4D_WHEELBITS 0xf0
+
+/* A4 Tech 4D+ Mouse (PS/2) data packet */
+#define MOUSE_4DPLUS_PACKETSIZE 3
+#define MOUSE_4DPLUS_ZNEG 0x04 /* sign bit */
+#define MOUSE_4DPLUS_BUTTON4DOWN 0x08
+
/* sysmouse extended data packet */
/*
* /dev/sysmouse sends data in two formats, depending on the protocol
OpenPOWER on IntegriCloud