summaryrefslogtreecommitdiff
path: root/protocol/ps2_mouse.h
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2013-11-20 15:28:58 +0900
committertmk <nobody@nowhere>2013-11-20 15:28:58 +0900
commitc6abcb6d893f6ef843ed98be3d45bd804cfe295a (patch)
tree4724b02aad271f6e8d9decf1e2588e7dd5b5c00d /protocol/ps2_mouse.h
parentd7f663a1ea4487a6dc5be76085eff7b00bec9704 (diff)
Add build options of ps2_mouse
Diffstat (limited to 'protocol/ps2_mouse.h')
-rw-r--r--protocol/ps2_mouse.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/protocol/ps2_mouse.h b/protocol/ps2_mouse.h
index 305a9bdbaa..27d9790d43 100644
--- a/protocol/ps2_mouse.h
+++ b/protocol/ps2_mouse.h
@@ -39,6 +39,27 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define PS2_MOUSE_X_OVFLW 6
#define PS2_MOUSE_Y_OVFLW 7
+
+/*
+ * Scroll by mouse move with pressing button
+ */
+/* mouse button to start scrolling; set 0 to disable scroll */
+#ifndef PS2_MOUSE_SCROLL_BTN_MASK
+#define PS2_MOUSE_SCROLL_BTN_MASK (1<<PS2_MOUSE_BTN_MIDDLE)
+#endif
+/* send button event when button is released within this value(ms); set 0 to disable */
+#ifndef PS2_MOUSE_SCROLL_BTN_SEND
+#define PS2_MOUSE_SCROLL_BTN_SEND 300
+#endif
+/* divide virtical and horizontal mouse move by this to convert to scroll move */
+#ifndef PS2_MOUSE_SCROLL_DIVISOR_V
+#define PS2_MOUSE_SCROLL_DIVISOR_V 2
+#endif
+#ifndef PS2_MOUSE_SCROLL_DIVISOR_H
+#define PS2_MOUSE_SCROLL_DIVISOR_H 2
+#endif
+
+
uint8_t ps2_mouse_init(void);
void ps2_mouse_task(void);