In order to save bandwidth, the host has the ability to silence a particular report in an interrupt IN endpoint by limiting the reporting frequency. The host sends the SET_IDLE
request to realize this operation. The HID class implemented by Micrium contains an internal task responsible for respecting the reporting frequency limitation applying to one or several input reports. shows Figure - Periodic Input Reports Task shows the periodic input reports tasks functioning.
Anchor | ||||
---|---|---|---|---|
|
Panel | ||||
---|---|---|---|---|
| ||||
Panel | ||
---|---|---|
| ||
(1) The device receives a (2) A report ID structure allocated during the HID class initialization phase is updated with the idle duration. An idle duration counter is initialized with the idle duration value. Then the report ID structure is inserted at the end of a linked list containing input reports ID structures. The idle duration value is expressed in 4-ms unit which gives a range of 4 to 1020 ms. If the idle duration is less than the interrupt IN endpoint polling interval, the reports are generated at the polling interval. (3) Every 4 ms, the periodic input report task browses the input reports ID list. For each input report ID, the task performs one of two possible operations. The task period matches the 4-ms unit used for the idle duration. If no (4) For a given input report ID, the task verifies if the idle duration has elapsed. If the idle duration has not elapsed, the counter is decremented and no input report is sent to the host. (5) If the idle duration has elapsed, that is the idle duration counter has reached zero, an input report is sent to the host by calling the (6) The input report data sent by the task comes from an internal data buffer allocated for each input report described in the Report descriptor. An application task can call the |
The periodic input reports task is implemented in the HID OS layer in the function USBD_HID_OS_TmrTask()
. Refer to the HID OS Functions reference for more details about this function.
...