Prefer passing a USB "pipe" structure over a USB endp encoding.
[seabios.git] / src / usb-hid.h
1 #ifndef __USB_HID_H
2 #define __USB_HID_H
3
4 // usb-hid.c
5 struct usb_interface_descriptor;
6 struct usb_pipe;
7 int usb_keyboard_init(struct usb_pipe *pipe
8                       , struct usb_interface_descriptor *iface, int imax);
9 void usb_keyboard_setup(void);
10 void usb_check_key(void);
11
12
13 /****************************************************************
14  * hid flags
15  ****************************************************************/
16
17 #define USB_INTERFACE_SUBCLASS_BOOT     1
18 #define USB_INTERFACE_PROTOCOL_KEYBOARD 1
19 #define USB_INTERFACE_PROTOCOL_MOUSE    2
20
21 #define HID_REQ_GET_REPORT              0x01
22 #define HID_REQ_GET_IDLE                0x02
23 #define HID_REQ_GET_PROTOCOL            0x03
24 #define HID_REQ_SET_REPORT              0x09
25 #define HID_REQ_SET_IDLE                0x0A
26 #define HID_REQ_SET_PROTOCOL            0x0B
27
28 #endif // ush-hid.h