]> git.gir.st - tmk_keyboard.git/blob - usb_mouse.h
ADD: keymap macro for human to read easier
[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 BIT_BTN1 (1<<0)
15 #define BIT_BTN2 (1<<1)
16 #define BIT_BTN3 (1<<2)
17 #define BIT_BTN4 (1<<3)
18 #define BIT_BTN5 (1<<4)
19
20
21 extern uint8_t mouse_buttons;
22 extern uint8_t mouse_protocol;
23
24
25 int8_t usb_mouse_buttons(uint8_t left, uint8_t middle, uint8_t right);
26 int8_t usb_mouse_move(int8_t x, int8_t y, int8_t wheel, int8_t hwheel);
27 void usb_mouse_clear(void);
28 bool usb_mouse_is_sent(void);
29 void usb_mouse_print(int8_t mouse_x, int8_t mouse_y, int8_t wheel_v, int8_t wheel_h);
30
31 #endif
Imprint / Impressum