5 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
8 Desc: Include for the mouse native HIDD.
13 #include <exec/libraries.h>
15 #include <exec/semaphores.h>
16 #include <hidd/mouse.h>
18 /* defines for buttonstate */
21 #define RIGHT_BUTTON 2
22 #define MIDDLE_BUTTON 4
24 /***** Mouse HIDD *******************/
26 struct mouse_staticdata
28 OOP_AttrBase hiddAttrBase
;
29 OOP_AttrBase hiddMouseAB
;
30 OOP_MethodID hwMethodBase
;
32 OOP_Class
*mouseclass
;
33 OOP_Object
*mousehidd
;
35 struct Library
*oopBase
;
36 struct Library
*utilityBase
;
42 struct Library library
;
44 struct mouse_staticdata msd
;
47 /* 488 byte long ring buffer used to read data with timeout defined */
61 VOID (*mouse_callback
)(APTR
, struct pHidd_Mouse_Event
*);
70 struct Library
*shidd
;
72 UBYTE mouse_collected_bytes
;
74 UBYTE mouse_inth_state
;
76 struct pHidd_Mouse_Event event
;
77 struct Ring
*rx
; /* Ring structure for mouse init */
81 #define P_MS 0 /* Microsoft */
82 #define P_MSC 1 /* Mouse Systems Corp */
83 #define P_MM 2 /* MMseries */
84 #define P_LOGI 3 /* Logitech */
85 #define P_BM 4 /* BusMouse ??? */
86 #define P_LOGIMAN 5 /* MouseMan / TrackMan */
87 #define P_PS2 6 /* PS/2 mouse */
88 #define P_MMHIT 7 /* MM_HitTab */
89 #define P_GLIDEPOINT 8 /* ALPS serial GlidePoint */
90 #define P_IMSERIAL 9 /* Microsoft serial IntelliMouse */
91 #define P_THINKING 10 /* Kensington serial ThinkingMouse */
92 #define P_IMPS2 11 /* Microsoft PS/2 IntelliMouse */
93 #define P_THINKINGPS2 12 /* Kensington PS/2 ThinkingMouse */
94 #define P_MMANPLUSPS2 13 /* Logitech PS/2 MouseMan+ */
95 #define P_GLIDEPOINTPS2 14 /* ALPS PS/2 GlidePoint */
96 #define P_NETPS2 15 /* Genius PS/2 NetMouse */
97 #define P_NETSCROLLPS2 16 /* Genius PS/2 NetScroll */
98 #define P_SYSMOUSE 17 /* SysMouse */
99 #define P_AUTO 18 /* automatic */
100 #define P_ACECAD 19 /* ACECAD protocol */
102 /****************************************************************************************/
107 static inline unsigned char inb(unsigned short port
)
123 static inline void outb(unsigned char value
, unsigned short port
)
128 : "a" (value
), "Nd" (port
)
132 /****************************************************************************************/
134 #define MSD(cl) (&((struct mousebase *)cl->UserData)->msd)
139 #define HiddAttrBase (MSD(cl)->hiddAttrBase)
140 #define HiddMouseAB (MSD(cl)->hiddMouseAB)
141 #define HWBase (MSD(cl)->hwMethodBase)
143 #define OOPBase (MSD(cl)->oopBase)
144 #define UtilityBase (MSD(cl)->utilityBase)
146 #endif /* _MOUSE_H */