usb: hid: remove get_protocol/set_protocol from USB HID class API
The USB HID class API offers the possibility to register callbacks for Get/SetIdle, Get/SetProtocol to the application. Rules for these callbacks are neither obvious nor documented. This patch remove this possibility to register Get/SetProtocol and Get/SetIdle callbacks for the following reasons: The possibility to call unknown application code while processing control requests should be avoided or reduced to a minimum. The Get/SetProtocol callbacks are redundant and do not provide any additional value since the way to inform the application about the change of the protocol exists via the callback hid_protocol_cb_t protocol_change. The core provides implementation to handle Get/SetIdle requests and on idle reports. If this is not suitable in any way then the application should implement everything itself. Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This commit is contained in:
parent
29006bd6fb
commit
8999c30cee
2 changed files with 8 additions and 40 deletions
|
@ -44,11 +44,7 @@ typedef void (*hid_idle_cb_t)(const struct device *dev, uint16_t report_id);
|
|||
*/
|
||||
struct hid_ops {
|
||||
hid_cb_t get_report;
|
||||
hid_cb_t get_idle;
|
||||
hid_cb_t get_protocol;
|
||||
hid_cb_t set_report;
|
||||
hid_cb_t set_idle;
|
||||
hid_cb_t set_protocol;
|
||||
hid_protocol_cb_t protocol_change;
|
||||
hid_idle_cb_t on_idle;
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue