Kevin O'Connor | 114592f | 2009-09-28 21:32:08 -0400 | [diff] [blame] | 1 | #ifndef __USB_HID_H |
| 2 | #define __USB_HID_H |
| 3 | |
| 4 | // usb-hid.c |
| 5 | struct usb_interface_descriptor; |
Kevin O'Connor | 357bdfa | 2010-02-26 08:57:13 -0500 | [diff] [blame] | 6 | struct usb_pipe; |
| 7 | int usb_keyboard_init(struct usb_pipe *pipe |
| 8 | , struct usb_interface_descriptor *iface, int imax); |
Kevin O'Connor | 1ca05b0 | 2010-01-03 17:43:37 -0500 | [diff] [blame] | 9 | void usb_keyboard_setup(void); |
Kevin O'Connor | dd5a8a6 | 2010-05-01 19:59:34 -0400 | [diff] [blame^] | 10 | inline int usb_kbd_active(void); |
Kevin O'Connor | 1ca05b0 | 2010-01-03 17:43:37 -0500 | [diff] [blame] | 11 | void usb_check_key(void); |
Kevin O'Connor | dd5a8a6 | 2010-05-01 19:59:34 -0400 | [diff] [blame^] | 12 | inline int usb_kbd_command(int command, u8 *param); |
Kevin O'Connor | 114592f | 2009-09-28 21:32:08 -0400 | [diff] [blame] | 13 | |
| 14 | |
| 15 | /**************************************************************** |
| 16 | * hid flags |
| 17 | ****************************************************************/ |
| 18 | |
| 19 | #define USB_INTERFACE_SUBCLASS_BOOT 1 |
| 20 | #define USB_INTERFACE_PROTOCOL_KEYBOARD 1 |
| 21 | #define USB_INTERFACE_PROTOCOL_MOUSE 2 |
| 22 | |
| 23 | #define HID_REQ_GET_REPORT 0x01 |
| 24 | #define HID_REQ_GET_IDLE 0x02 |
| 25 | #define HID_REQ_GET_PROTOCOL 0x03 |
| 26 | #define HID_REQ_SET_REPORT 0x09 |
| 27 | #define HID_REQ_SET_IDLE 0x0A |
| 28 | #define HID_REQ_SET_PROTOCOL 0x0B |
| 29 | |
| 30 | #endif // ush-hid.h |