Common library for all Human Interface Device (HID) implementation.
Modules | |
Implementation of HID common library | |
USB Device Interface (UDI) for Human Interface Device (HID) Keyboard Class | |
Common APIs used by high level application to use this USB class. | |
USB Device Interface (UDI) for Human Interface Device (HID) Mouse Class | |
Common APIs used by high level application to use this USB class. | |
Functions | |
bool | udi_hid_setup (uint8_t *rate, uint8_t *protocol, uint8_t *report_desc, bool(*setup_report)(void)) |
Decode HID setup request. More... | |
bool udi_hid_setup | ( | uint8_t * | rate, |
uint8_t * | protocol, | ||
uint8_t * | report_desc, | ||
bool(*)(void) | setup_report | ||
) |
Decode HID setup request.
rate | Pointer on rate of current HID interface |
protocol | Pointer on protocol of current HID interface |
report_desc | Pointer on report descriptor of current HID interface |
set_report | Pointer on set_report callback of current HID interface |
1
if function was successfully done, otherwise 0
. References usb_setup_req_t::bRequest, udd_ctrl_request_t::payload, udd_ctrl_request_t::payload_size, udd_ctrl_request_t::req, udd_g_ctrlreq, Udd_setup_is_in, Udd_setup_is_out, Udd_setup_type, udi_hid_reqstdifaceget_descriptor(), USB_REQ_GET_DESCRIPTOR, USB_REQ_HID_GET_IDLE, USB_REQ_HID_GET_PROTOCOL, USB_REQ_HID_GET_REPORT, USB_REQ_HID_SET_IDLE, USB_REQ_HID_SET_PROTOCOL, USB_REQ_HID_SET_REPORT, USB_REQ_TYPE_CLASS, USB_REQ_TYPE_STANDARD, usb_setup_req_t::wLength, and usb_setup_req_t::wValue.
Referenced by udi_hid_kbd_setup(), and udi_hid_mouse_setup().