27#ifndef USB_USBUS_HID_H
28#define USB_USBUS_HID_H
43#ifndef CONFIG_USBUS_HID_INTERRUPT_EP_SIZE
44#define CONFIG_USBUS_HID_INTERRUPT_EP_SIZE 0x40
103 size_t report_desc_size);
#define usbdev_ep_buf_t
Instantiation type for usbdev endpoint buffers.
void(* usbus_hid_cb_t)(usbus_hid_device_t *hid, uint8_t *data, size_t len)
HID data callback.
#define CONFIG_USBUS_HID_INTERRUPT_EP_SIZE
USB HID interrupt endpoint size.
void usbus_hid_init(usbus_t *usbus, usbus_hid_device_t *hid, usbus_hid_cb_t cb, const uint8_t *report_desc, size_t report_desc_size)
Initialize an USBUS HID interface.
Definition for USB HID interfaces.
Mutex for thread synchronization.
USBUS descriptor generator.
USBUS HID context struct.
usbus_descr_gen_t hid_descr
HID descriptor generator.
event_t tx_ready
Transmit ready event.
usbus_endpoint_t * ep_in
IN endpoint.
size_t report_desc_size
report descriptor size
usbus_hid_cb_t cb
Callback for data handlers.
usbus_handler_t handler_ctrl
control handler
usbus_interface_t iface
HID interface.
usbus_t * usbus
USBUS reference.
size_t occupied
Number of bytes for the host.
const uint8_t * report_desc
report descriptor reference
mutex_t in_lock
mutex used for locking hid send
usbus_endpoint_t * ep_out
OUT endpoint.
usbdev_ep_buf_t in_buf[CONFIG_USBUS_HID_INTERRUPT_EP_SIZE]
Device to host data buffer.
usbdev_ep_buf_t out_buf[CONFIG_USBUS_HID_INTERRUPT_EP_SIZE]
Host to device data buffer.