]> git.gir.st - tmk_keyboard.git/blob - usb_mouse.h
Exceptional handling for PS/2 scan code set 2
[tmk_keyboard.git] / usb_mouse.h
1 #ifndef USB_MOUSE_H
2 #define USB_MOUSE_H 1
3
4 #include <stdint.h>
5 #include <stdbool.h>
6 #include "usb.h"
7
8
9 #define MOUSE_INTERFACE 1
10 #define MOUSE_ENDPOINT 2
11 #define MOUSE_SIZE 8
12 #define MOUSE_BUFFER EP_DOUBLE_BUFFER
13
14 #define MOUSE_BTN1 (1<<0)
15 #define MOUSE_BTN2 (1<<1)
16 #define MOUSE_BTN3 (1<<2)
17 #define MOUSE_BTN4 (1<<3)
18 #define MOUSE_BTN5 (1<<4)
19
20
21 extern uint8_t usb_mouse_protocol;
22
23
24 int8_t usb_mouse_send(int8_t x, int8_t y, int8_t wheel_v, int8_t wheel_h, uint8_t buttons);
25 void usb_mouse_print(int8_t x, int8_t y, int8_t wheel_v, int8_t wheel_h, uint8_t buttons);
26
27 #endif
Imprint / Impressum