12#ifndef ZEPHYR_INCLUDE_USBD_HID_CLASS_DEVICE_H_
13#define ZEPHYR_INCLUDE_USBD_HID_CLASS_DEVICE_H_
int hid_device_submit_report(const struct device *dev, const uint16_t size, const uint8_t *const report)
Submit new input report.
int hid_device_register(const struct device *dev, const uint8_t *const rdesc, const uint16_t rsize, const struct hid_device_ops *const ops)
Register HID device report descriptor and user callbacks.
@ HID_REPORT_TYPE_INPUT
Definition usbd_hid.h:80
@ HID_REPORT_TYPE_OUTPUT
Definition usbd_hid.h:81
@ HID_REPORT_TYPE_FEATURE
Definition usbd_hid.h:82
USB Human Interface Device (HID) common definitions header.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
Runtime device structure (in ROM) per driver instance.
Definition device.h:411
HID device user callbacks.
Definition usbd_hid.h:96
void(* sof)(const struct device *dev)
Optional Start of Frame (SoF) event callback.
Definition usbd_hid.h:179
void(* set_idle)(const struct device *dev, const uint8_t id, const uint32_t duration)
Notification to limit input report frequency.
Definition usbd_hid.h:140
void(* iface_ready)(const struct device *dev, const bool ready)
The interface ready callback is called with the ready argument set to true when the corresponding int...
Definition usbd_hid.h:104
void(* output_report)(const struct device *dev, const uint16_t len, const uint8_t *const buf)
New output report callback.
Definition usbd_hid.h:171
int(* set_report)(const struct device *dev, const uint8_t type, const uint8_t id, const uint16_t len, const uint8_t *const buf)
This callback is called for the HID Set Report request to set a feature, input, or output report,...
Definition usbd_hid.h:128
void(* input_report_done)(const struct device *dev)
Notification that input report submitted with hid_device_submit_report() has been sent.
Definition usbd_hid.h:162
void(* set_protocol)(const struct device *dev, const uint8_t proto)
Notification that the host has changed the protocol from Boot Protocol(0) to Report Protocol(1) or vi...
Definition usbd_hid.h:154
uint32_t(* get_idle)(const struct device *dev, const uint8_t id)
If a report ID is used in the report descriptor, the device must implement this callback and return t...
Definition usbd_hid.h:148
int(* get_report)(const struct device *dev, const uint8_t type, const uint8_t id, const uint16_t len, uint8_t *const buf)
This callback is called for the HID Get Report request to get a feature, input, or output report,...
Definition usbd_hid.h:116