17#define USBKBD_PROTOCOL 1
50#define USBKBD_CTRL ( USBKBD_CTRL_LEFT | USBKBD_CTRL_RIGHT )
53#define USBKBD_SHIFT ( USBKBD_SHIFT_LEFT | USBKBD_SHIFT_RIGHT )
56#define USBKBD_ALT ( USBKBD_ALT_LEFT | USBKBD_ALT_RIGHT )
59#define USBKBD_GUI ( USBKBD_GUI_LEFT | USBKBD_GUI_RIGHT )
93#define USBKBD_IDLE_DURATION 10
100#define USBKBD_HOLDOFF 12
109#define USBKBD_INTR_MAX_FILL 8
115#define USBKBD_BUFSIZE 8
#define assert(condition)
Assert a condition at run-time.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Universal Serial Bus (USB)
A doubly-linked list entry (or list head)
A USB human interface device.
uint8_t modifiers
Modifier keys.
uint8_t reserved
Reserved.
uint8_t keycode[6]
Keycodes.
struct list_head list
List of all USB keyboards.
unsigned int subcons
Keyboard buffer sub-consumer counter.
struct usb_bus * bus
USB bus.
unsigned int holdoff
Autorepeat hold-off time (in number of completions reported)
unsigned int prod
Keyboard buffer producer counter.
uint8_t leds
Keyboard LED state.
unsigned int key[USBKBD_BUFSIZE]
Keyboard buffer.
unsigned int cons
Keyboard buffer consumer counter.
struct usb_hid hid
USB human interface device.
struct usb_keyboard_report report
Most recent keyboard report.
unsigned int keycode
Most recently pressed non-modifier key (if any)
uint8_t leds_changed
Keyboard LEDs changed.
USB human interface devices (HID)
static unsigned int usbkbd_fill(struct usb_keyboard *kbd)
Calculate keyboard buffer fill level.
#define USBKBD_BUFSIZE
Keyboard buffer size.
usb_keyboard_modifier
USB modifier keys.
@ USBKBD_CTRL_RIGHT
Right Ctrl key.
@ USBKBD_GUI_RIGHT
Right GUI key.
@ USBKBD_SHIFT_RIGHT
Right Shift key.
@ USBKBD_ALT_RIGHT
Right Alt key.
@ USBKBD_SHIFT_LEFT
Left Shift key.
@ USBKBD_CTRL_LEFT
Left Ctrl key.
@ USBKBD_ALT_LEFT
Left Alt key.
@ USBKBD_GUI_LEFT
Left GUI key.
usb_keyboard_led
USB keyboard LEDs.