Atmel Software Framework

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
USB Device Interface (UDI) for Human Interface Device (HID)

Common library for all Human Interface Device (HID) implementation.

Modules

 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.
 
 USB Device Interface (UDI) for Human Interface Device (HID) Generic Class
 Common APIs used by high level application to use this USB class.
 
 Implementation of HID common library
 

Functions

bool udi_hid_setup (uint8_t *rate, uint8_t *protocol, uint8_t *report_desc, bool(*set_report)(void))
 Decode HID setup request. More...
 

bool udi_hid_setup ( uint8_t *  rate,
uint8_t *  protocol,
uint8_t *  report_desc,
bool(*)(void)  set_report 
)

Decode HID setup request.

Parameters
ratePointer on rate of current HID interface
protocolPointer on protocol of current HID interface
report_descPointer on report descriptor of current HID interface
set_reportPointer on set_report callback of current HID interface
Returns
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_generic_setup(), udi_hid_kbd_setup(), and udi_hid_mouse_setup().