Management of the generic host HID features. More...
#include "compiler.h"
#include "hid.h"
Go to the source code of this file.
Data Structures | |
struct | host_hid_item_t |
HID report descriptor item. More... | |
Functions | |
Standard Requests Applied to HID | |
Status_t | host_hid_get_descriptor (U8 descriptor_type, U8 descriptor_index, U8 s_interface) |
Gets a HID class descriptor. | |
Status_t | host_hid_set_descriptor (U8 descriptor_type, U8 descriptor_index, U8 s_interface, U16 length) |
Sets a HID class descriptor. | |
HID-Specific Requests | |
Status_t | host_hid_get_report (U8 report_type, U8 report_id, U8 s_interface) |
Gets a HID report. | |
Status_t | host_hid_set_report (U8 report_type, U8 report_id, U8 s_interface, U16 length) |
Sets a HID report. | |
U8 | host_hid_get_idle (U8 report_id, U8 s_interface) |
Reads the current idle rate for a particular Input report. | |
Status_t | host_hid_set_idle (U8 duration_4_ms, U8 report_id, U8 s_interface) |
Silences a particular report on the Interrupt In pipe until a new event occurs or the specified amount of time passes. | |
U8 | host_hid_get_protocol (U8 s_interface) |
Reads which protocol is currently active (either the boot protocol or the report protocol). | |
Status_t | host_hid_set_protocol (U8 protocol, U8 s_interface) |
Switches between the boot protocol and the report protocol (or vice versa). | |
HID Report Descriptor Parsing Functions | |
Status_bool_t | host_hid_get_item (host_hid_item_t *item) |
Gets the next HID report descriptor item. |
Management of the generic host HID features.
This file manages the generic host HID features.
Definition in file host_hid.h.
Status_t host_hid_get_descriptor | ( | U8 | descriptor_type, | |
U8 | descriptor_index, | |||
U8 | s_interface | |||
) |
Gets a HID class descriptor.
descriptor_type | Type of the descriptor to get. | |
descriptor_index | Index of the descriptor to get. | |
s_interface | The supported interface number of which to get the descriptor. |
Definition at line 69 of file host_hid.c.
U8 host_hid_get_idle | ( | U8 | report_id, | |
U8 | s_interface | |||
) |
Reads the current idle rate for a particular Input report.
report_id | ID of the report of which to get the idle rate. | |
s_interface | The supported interface number of which to get the idle rate. |
HID_IDLE_DURATION_INDEFINITE
. Definition at line 155 of file host_hid.c.
Status_bool_t host_hid_get_item | ( | host_hid_item_t * | item | ) |
Gets the next HID report descriptor item.
item | Pointer to the item structure to fill. |
HID_DESCRIPTOR
and HID_REPORT_DESCRIPTOR
. Definition at line 219 of file host_hid.c.
U8 host_hid_get_protocol | ( | U8 | s_interface | ) |
Reads which protocol is currently active (either the boot protocol or the report protocol).
s_interface | The supported interface number of which to get the protocol. |
HID_BOOT_PROTOCOL
or HID_REPORT_PROTOCOL
.Definition at line 183 of file host_hid.c.
Status_t host_hid_get_report | ( | U8 | report_type, | |
U8 | report_id, | |||
U8 | s_interface | |||
) |
Gets a HID report.
report_type | Type of the report to get. | |
report_id | ID of the report to get. | |
s_interface | The supported interface number of which to get the report. |
Definition at line 128 of file host_hid.c.
Status_t host_hid_set_descriptor | ( | U8 | descriptor_type, | |
U8 | descriptor_index, | |||
U8 | s_interface, | |||
U16 | length | |||
) |
Sets a HID class descriptor.
descriptor_type | Type of the descriptor to set. | |
descriptor_index | Index of the descriptor to set. | |
s_interface | The supported interface number of which to set the descriptor. | |
length | Length of the descriptor to set. |
Definition at line 106 of file host_hid.c.
Status_t host_hid_set_idle | ( | U8 | duration_4_ms, | |
U8 | report_id, | |||
U8 | s_interface | |||
) |
Silences a particular report on the Interrupt In pipe until a new event occurs or the specified amount of time passes.
duration_4_ms | Idle duration with a 4-ms resolution, or HID_IDLE_DURATION_INDEFINITE . | |
report_id | ID of the report of which to set the idle rate (can be HID_REPORT_ID_ALL ). | |
s_interface | The supported interface number of which to set the idle rate. |
Definition at line 170 of file host_hid.c.
Status_t host_hid_set_protocol | ( | U8 | protocol, | |
U8 | s_interface | |||
) |
Switches between the boot protocol and the report protocol (or vice versa).
protocol | Protocol: HID_BOOT_PROTOCOL or HID_REPORT_PROTOCOL . | |
s_interface | The supported interface number of which to set the protocol. |
Definition at line 198 of file host_hid.c.
Status_t host_hid_set_report | ( | U8 | report_type, | |
U8 | report_id, | |||
U8 | s_interface, | |||
U16 | length | |||
) |
Sets a HID report.
report_type | Type of the report to set. | |
report_id | ID of the report to set. | |
s_interface | The supported interface number of which to set the report. | |
length | Length of the report to set. |
Definition at line 141 of file host_hid.c.