blob: bd6445ce890f78f9fc51636a3efc98a034a0fbc4 [file] [log] [blame]
Kevin O'Connor114592f2009-09-28 21:32:08 -04001#ifndef __USB_HID_H
2#define __USB_HID_H
3
4// usb-hid.c
Kevin O'Connor6a8e8952012-03-08 07:20:30 -05005struct usbdevice_s;
6int usb_hid_init(struct usbdevice_s *usbdev);
Kevin O'Connordd5a8a62010-05-01 19:59:34 -04007inline int usb_kbd_active(void);
Kevin O'Connordd5a8a62010-05-01 19:59:34 -04008inline int usb_kbd_command(int command, u8 *param);
Kevin O'Connor0e885762010-05-01 22:14:40 -04009inline int usb_mouse_active(void);
10inline int usb_mouse_command(int command, u8 *param);
11void usb_check_event(void);
Kevin O'Connor114592f2009-09-28 21:32:08 -040012
13
14/****************************************************************
15 * hid flags
16 ****************************************************************/
17
18#define USB_INTERFACE_SUBCLASS_BOOT 1
19#define USB_INTERFACE_PROTOCOL_KEYBOARD 1
20#define USB_INTERFACE_PROTOCOL_MOUSE 2
21
22#define HID_REQ_GET_REPORT 0x01
23#define HID_REQ_GET_IDLE 0x02
24#define HID_REQ_GET_PROTOCOL 0x03
25#define HID_REQ_SET_REPORT 0x09
26#define HID_REQ_SET_IDLE 0x0A
27#define HID_REQ_SET_PROTOCOL 0x0B
28
29#endif // ush-hid.h