Functions | |
bool | tusbd_hid_keyboard_is_busy (uint8_t coreid) |
Check if the interface is currently busy or not. More... | |
tusb_error_t | tusbd_hid_keyboard_send (uint8_t coreid, hid_keyboard_report_t const *p_report) |
Submit USB transfer. More... | |
void | tusbd_hid_keyboard_mounted_cb (uint8_t coreid) |
Callback function that will be invoked when this interface is mounted (configured) by USB host. More... | |
void | tusbd_hid_keyboard_unmounted_cb (uint8_t coreid) |
Callback function that will be invoked when this interface is unmounted (bus reset/unplugged) More... | |
void | tusbd_hid_keyboard_cb (uint8_t coreid, tusb_event_t event, uint32_t xferred_bytes) |
Callback function that is invoked when an transferring event occurred after invoking tusbd_hid_keyboard_send. More... | |
uint16_t | tusbd_hid_keyboard_get_report_cb (uint8_t coreid, hid_request_report_type_t report_type, void **pp_report, uint16_t requested_length) |
Callback function that is invoked when USB host request HID_REQUEST_CONTROL_GET_REPORT via control endpoint. More... | |
void | tusbd_hid_keyboard_set_report_cb (uint8_t coreid, hid_request_report_type_t report_type, uint8_t p_report_data[], uint16_t length) |
Callback function that is invoked when USB host request HID_REQUEST_CONTROL_SET_REPORT via control endpoint. More... | |
void tusbd_hid_keyboard_cb | ( | uint8_t | coreid, |
tusb_event_t | event, | ||
uint32_t | xferred_bytes | ||
) |
Callback function that is invoked when an transferring event occurred after invoking tusbd_hid_keyboard_send.
[in] | coreid | USB Controller ID |
[in] | event | an value from tusb_event_t |
uint16_t tusbd_hid_keyboard_get_report_cb | ( | uint8_t | coreid, |
hid_request_report_type_t | report_type, | ||
void ** | pp_report, | ||
uint16_t | requested_length | ||
) |
Callback function that is invoked when USB host request HID_REQUEST_CONTROL_GET_REPORT via control endpoint.
[in] | coreid | USB Controller ID |
[in] | report_type | specify which report (INPUT, OUTPUT, FEATURE) that host requests |
[out] | pp_report | pointer to buffer that application need to update, value must be accessible by USB controller (see TUSB_CFG_ATTR_USBRAM) |
[in] | requested_length | number of bytes that host requested |
non-zero | Actual number of bytes in the response's buffer. |
zero | indicates the current request is not supported. Tinyusb device stack will reject the request by sending STALL in the data phase. |
bool tusbd_hid_keyboard_is_busy | ( | uint8_t | coreid | ) |
Check if the interface is currently busy or not.
[in] | coreid | USB Controller ID |
true | if the interface is busy meaning the stack is still transferring/waiting data from/to host |
false | if the interface is not busy meaning the stack successfully transferred data from/to host |
void tusbd_hid_keyboard_mounted_cb | ( | uint8_t | coreid | ) |
Callback function that will be invoked when this interface is mounted (configured) by USB host.
[in] | coreid | USB Controller ID of the interface |
tusb_error_t tusbd_hid_keyboard_send | ( | uint8_t | coreid, |
hid_keyboard_report_t const * | p_report | ||
) |
Submit USB transfer.
[in] | coreid | USB Controller ID |
[in,out] | p_report | address that is used to store data from device. Must be accessible by usb controller (see TUSB_CFG_ATTR_USBRAM) |
TUSB_ERROR_NONE | on success |
TUSB_ERROR_INTERFACE_IS_BUSY | if the interface is already transferring data with device |
TUSB_ERROR_DEVICE_NOT_READY | if device is not yet configured (by SET CONFIGURED request) |
TUSB_ERROR_INVALID_PARA | if input parameters are not correct |
void tusbd_hid_keyboard_set_report_cb | ( | uint8_t | coreid, |
hid_request_report_type_t | report_type, | ||
uint8_t | p_report_data[], | ||
uint16_t | length | ||
) |
Callback function that is invoked when USB host request HID_REQUEST_CONTROL_SET_REPORT via control endpoint.
[in] | coreid | USB Controller ID |
[in] | report_type | specify which report (INPUT, OUTPUT, FEATURE) that host requests |
[in] | p_report_data | buffer containing the report's data |
[in] | length | number of bytes in the p_report_data |
void tusbd_hid_keyboard_unmounted_cb | ( | uint8_t | coreid | ) |
Callback function that will be invoked when this interface is unmounted (bus reset/unplugged)
[in] | coreid | USB Controller ID of the interface |