2 Copyright 2011 Jun Wako <wakojun@gmail.com>
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.
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.
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/>.
25 #define REPORT_ID_MOUSE 1
26 #define REPORT_ID_SYSTEM 2
27 #define REPORT_ID_CONSUMER 3
30 #define MOUSE_BTN1 (1<<0)
31 #define MOUSE_BTN2 (1<<1)
32 #define MOUSE_BTN3 (1<<2)
33 #define MOUSE_BTN4 (1<<3)
34 #define MOUSE_BTN5 (1<<4)
36 // Consumer Page(0x0C)
37 // following are supported by Windows: http://msdn.microsoft.com/en-us/windows/hardware/gg463372.aspx
38 #define AUDIO_MUTE 0x00E2
39 #define AUDIO_VOL_UP 0x00E9
40 #define AUDIO_VOL_DOWN 0x00EA
41 #define TRANSPORT_NEXT_TRACK 0x00B5
42 #define TRANSPORT_PREV_TRACK 0x00B6
43 #define TRANSPORT_STOP 0x00B7
44 #define TRANSPORT_PLAY_PAUSE 0x00CD
45 #define AL_CC_CONFIG 0x0183
46 #define AL_EMAIL 0x018A
47 #define AL_CALCULATOR 0x0192
48 #define AL_LOCAL_BROWSER 0x0194
49 #define AC_SEARCH 0x0221
50 #define AC_HOME 0x0223
51 #define AC_BACK 0x0224
52 #define AC_FORWARD 0x0225
53 #define AC_STOP 0x0226
54 #define AC_REFRESH 0x0227
55 #define AC_BOOKMARKS 0x022A
56 // supplement for Bluegiga iWRAP HID(not supported by Windows?)
57 #define AL_LOCK 0x019E
58 #define TRANSPORT_RECORD 0x00B2
59 #define TRANSPORT_REWIND 0x00B4
60 #define TRANSPORT_EJECT 0x00B8
61 #define AC_MINIMIZE 0x0206
63 // Generic Desktop Page(0x01)
64 #define SYSTEM_POWER_DOWN 0x0081
65 #define SYSTEM_SLEEP 0x0082
66 #define SYSTEM_WAKE_UP 0x0083
69 // key report size(NKRO or boot mode)
70 #if defined(HOST_PJRC)
72 # if defined(KBD2_REPORT_KEYS) && KBD2_REPORT_KEYS > KBD_REPORT_KEYS
73 # define REPORT_KEYS KBD2_REPORT_KEYS
75 # define REPORT_KEYS KBD_REPORT_KEYS
78 # define REPORT_KEYS 6
89 uint8_t keys[REPORT_KEYS];
90 } __attribute__ ((packed)) report_keyboard_t;
98 } __attribute__ ((packed)) report_mouse_t;