added simple keycode->char lookup functionality
[ppcskel.git] / usb / drivers / class / hid.h
1 /*
2         ppcskel - a Free Software replacement for the Nintendo/BroadOn bootloader.
3         hid driver
4
5 Copyright (C) 2009     Bernhard Urban <lewurm@gmx.net>
6 Copyright (C) 2009     Sebastian Falbesoner <sebastian.falbesoner@gmail.com>
7
8 # This code is licensed to you under the terms of the GNU GPL, version 2;
9 # see file COPYING or http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
10 */
11
12
13 #ifndef __HID_H
14 #define __HID_H
15
16 #define MOD_lctrl (1<<0)
17 #define MOD_lshift (1<<1)
18 #define MOD_lalt (1<<2)
19 #define MOD_lwin (1<<3)
20 #define MOD_rctrl (1<<4)
21 #define MOD_rshift (1<<5)
22 #define MOD_ralt (1<<6)
23 #define MOD_rwin (1<<7)
24
25 struct kbrep {
26         u8 mod;
27         u8 reserved;
28         u8 keys[6];
29 };
30
31 void usb_hidkb_probe();
32 void usb_hidkb_check();
33 void usb_hidkb_init();
34 u8 usb_hidkb_inuse();
35
36 struct kbrep *usb_hidkb_getChars();
37 unsigned char usb_hidkb_get_char_from_keycode(u8 keycode, int shifted);
38
39 #endif /* __HID_H */
40