usb: hid: Add status_cb to hid ops
Adding status callback allows to control report sending only when i.e. device is connected or configured. Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This commit is contained in:
parent
7ff64bfead
commit
3288da9c0b
2 changed files with 32 additions and 27 deletions
|
@ -54,6 +54,7 @@ struct usb_hid_descriptor {
|
|||
typedef int (*hid_cb_t)(struct usb_setup_packet *setup, s32_t *len,
|
||||
u8_t **data);
|
||||
typedef void (*hid_int_ready_callback)(void);
|
||||
typedef void (*status_cb_t)(enum usb_dc_status_code status, u8_t *param);
|
||||
|
||||
struct hid_ops {
|
||||
hid_cb_t get_report;
|
||||
|
@ -72,6 +73,7 @@ struct hid_ops {
|
|||
#ifdef CONFIG_ENABLE_HID_INT_OUT_EP
|
||||
hid_int_ready_callback int_out_ready;
|
||||
#endif
|
||||
status_cb_t status_cb;
|
||||
};
|
||||
|
||||
/* HID Report Definitions */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue