]> git.gir.st - tmk_keyboard.git/blob - common/mousekey.h
Documentation: small mistake
[tmk_keyboard.git] / common / mousekey.h
1 /*
2 Copyright 2011 Jun Wako <wakojun@gmail.com>
3
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18 #ifndef MOUSEKEY_H
19 #define MOUSEKEY_H
20
21 #include <stdbool.h>
22 #include "host.h"
23
24
25 /* max value on report descriptor */
26 #define MOUSEKEY_MOVE_MAX 127
27 #define MOUSEKEY_WHEEL_MAX 127
28
29 #ifndef MOUSEKEY_MOVE_DELTA
30 #define MOUSEKEY_MOVE_DELTA 5
31 #endif
32 #ifndef MOUSEKEY_WHEEL_DELTA
33 #define MOUSEKEY_WHEEL_DELTA 1
34 #endif
35 #ifndef MOUSEKEY_DELAY
36 #define MOUSEKEY_DELAY 300
37 #endif
38 #ifndef MOUSEKEY_INTERVAL
39 #define MOUSEKEY_INTERVAL 50
40 #endif
41 #ifndef MOUSEKEY_MAX_SPEED
42 #define MOUSEKEY_MAX_SPEED 10
43 #endif
44 #ifndef MOUSEKEY_TIME_TO_MAX
45 #define MOUSEKEY_TIME_TO_MAX 20
46 #endif
47 #ifndef MOUSEKEY_WHEEL_MAX_SPEED
48 #define MOUSEKEY_WHEEL_MAX_SPEED 8
49 #endif
50 #ifndef MOUSEKEY_WHEEL_TIME_TO_MAX
51 #define MOUSEKEY_WHEEL_TIME_TO_MAX 40
52 #endif
53
54
55 uint8_t mk_delay;
56 uint8_t mk_interval;
57 uint8_t mk_max_speed;
58 uint8_t mk_time_to_max;
59 uint8_t mk_wheel_max_speed;
60 uint8_t mk_wheel_time_to_max;
61
62
63 void mousekey_task(void);
64 void mousekey_on(uint8_t code);
65 void mousekey_off(uint8_t code);
66 void mousekey_clear(void);
67 void mousekey_send(void);
68
69 #endif
Imprint / Impressum