subsys: usb: class: hid: Add OUT interrupt endpoint
patch add a OUT interrupt endpoint descriptor and registers a corresponding notification callback with usb driver, which is invoked when data is sent to device from host. Implement the read ready notification as suggesteed by Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com> Signed-off-by: Johann Fischer <j.fischer@phytec.de>
This commit is contained in:
parent
d2b4d8f049
commit
6b44a00336
3 changed files with 63 additions and 7 deletions
|
@ -69,6 +69,9 @@ struct hid_ops {
|
|||
* the next transfer.
|
||||
*/
|
||||
hid_int_ready_callback int_in_ready;
|
||||
#ifdef CONFIG_ENABLE_HID_INT_OUT_EP
|
||||
hid_int_ready_callback int_out_ready;
|
||||
#endif
|
||||
};
|
||||
|
||||
/* HID Report Definitions */
|
||||
|
@ -157,6 +160,9 @@ void usb_hid_register_device(const u8_t *desc, size_t size,
|
|||
/* Write to hid interrupt endpoint */
|
||||
int hid_int_ep_write(const u8_t *data, u32_t data_len, u32_t *bytes_ret);
|
||||
|
||||
/* Read from hid interrupt endpoint */
|
||||
int hid_int_ep_read(u8_t *data, u32_t max_data_len, u32_t *ret_bytes);
|
||||
|
||||
/* Initialize USB HID */
|
||||
int usb_hid_init(void);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue