From 2a562a4191a5b9e88731efb5eabd921821f25f7e Mon Sep 17 00:00:00 2001 From: tmk Date: Sun, 2 Jan 2011 23:52:13 +0900 Subject: Add PS/2 mouse support to connect TrackPoint Unit. Change build options: Makefile and config.h. See README. --- ps2_mouse.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 ps2_mouse.h (limited to 'ps2_mouse.h') diff --git a/ps2_mouse.h b/ps2_mouse.h new file mode 100644 index 000000000..f590f3ad5 --- /dev/null +++ b/ps2_mouse.h @@ -0,0 +1,26 @@ +#ifndef PS2_MOUSE_H +#define PS2_MOUSE_H + +#include + +#define PS2_MOUSE_BTN_MASK 0x07 +#define PS2_MOUSE_BTN_LEFT 0 +#define PS2_MOUSE_BTN_RIGHT 1 +#define PS2_MOUSE_BTN_MIDDLE 2 +#define PS2_MOUSE_X_SIGN 4 +#define PS2_MOUSE_Y_SIGN 5 +#define PS2_MOUSE_X_OVFLW 6 +#define PS2_MOUSE_Y_OVFLW 7 + +extern uint8_t ps2_mouse_x; +extern uint8_t ps2_mouse_y; +extern uint8_t ps2_mouse_btn; +extern uint8_t ps2_mouse_error_count; + +void ps2_mouse_init(void); +void ps2_mouse_read(void); +bool ps2_mouse_changed(void); +void ps2_mouse_usb_send(void); +void ps2_mouse_print(void); + +#endif -- cgit v1.2.3-24-g4f1b