HID core implementation has support for Get/Set Idle requests and on idle report processing. Basically it has little use. Also, it has no users in the tree except samples/subsys/usb/hid, which does not have it turned on. There are several issues with the idle report implementation: - Core calls hid_ops.on_idle callback with Report ID 0, but this ID is reserved and should not be used. Report descriptors do not use Report ID index zero. - Calling hid_ops.on_idle with Report ID 0 cann only be turned off by calling SetIdle(Duration = 0, Report ID = 0), but not by SetIdle with Report ID not equal zero. - GetIdle with Report Id not equal zero returns wrong value after SetIdle(Duration = n, Report ID = 0) - It may happen that hid_ops.on_idle is called for different Report ID during one and the same SoF event. But there can be only one hid_int_ep_write() during a frame. This patch fixes listed issues and revises Get/Set Idle request, and hid_sof_handler() implementation. Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no> |
||
|---|---|---|
| .. | ||
| class | ||
| bos.c | ||
| CMakeLists.txt | ||
| Kconfig | ||
| os_desc.c | ||
| os_desc.h | ||
| usb_descriptor.c | ||
| usb_descriptor.h | ||
| usb_device.c | ||
| usb_transfer.c | ||
| usb_transfer.h | ||
| usb_work_q.c | ||
| usb_work_q.h | ||