blob: d8199b9bfe1e3cb6979d548676525b3a9e6ee9b7 [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
5struct usb_interface_descriptor;
Kevin O'Connor357bdfa2010-02-26 08:57:13 -05006struct usb_pipe;
Kevin O'Connor0e885762010-05-01 22:14:40 -04007int usb_hid_init(struct usb_pipe *pipe
8 , struct usb_interface_descriptor *iface, int imax);
9void usb_hid_setup(void);
Kevin O'Connordd5a8a62010-05-01 19:59:34 -040010inline int usb_kbd_active(void);
Kevin O'Connordd5a8a62010-05-01 19:59:34 -040011inline int usb_kbd_command(int command, u8 *param);
Kevin O'Connor0e885762010-05-01 22:14:40 -040012inline int usb_mouse_active(void);
13inline int usb_mouse_command(int command, u8 *param);
14void usb_check_event(void);
Kevin O'Connor114592f2009-09-28 21:32:08 -040015
16
17/****************************************************************
18 * hid flags
19 ****************************************************************/
20
21#define USB_INTERFACE_SUBCLASS_BOOT 1
22#define USB_INTERFACE_PROTOCOL_KEYBOARD 1
23#define USB_INTERFACE_PROTOCOL_MOUSE 2
24
25#define HID_REQ_GET_REPORT 0x01
26#define HID_REQ_GET_IDLE 0x02
27#define HID_REQ_GET_PROTOCOL 0x03
28#define HID_REQ_SET_REPORT 0x09
29#define HID_REQ_SET_IDLE 0x0A
30#define HID_REQ_SET_PROTOCOL 0x0B
31
32#endif // ush-hid.h