Loading...
Searching...
No Matches
USBUS HID

USBUS HID interface module. More...

Detailed Description

USBUS HID interface module.

Files

file  hid.h
 Interface and definitions for USB HID type interfaces in USBUS.
 

Data Structures

struct  usbus_hid_device
 USBUS HID context struct. More...
 

Macros

#define CONFIG_USBUS_HID_INTERRUPT_EP_SIZE   0x40
 USB HID interrupt endpoint size.
 

Typedefs

typedef struct usbus_hid_device usbus_hid_device_t
 USBUS HID context struct forward declaration.
 
typedef void(* usbus_hid_cb_t) (usbus_hid_device_t *hid, uint8_t *data, size_t len)
 HID data callback.
 

Functions

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.
 

Macro Definition Documentation

◆ CONFIG_USBUS_HID_INTERRUPT_EP_SIZE

#define CONFIG_USBUS_HID_INTERRUPT_EP_SIZE   0x40

USB HID interrupt endpoint size.

Definition at line 44 of file hid.h.

Typedef Documentation

◆ usbus_hid_cb_t

typedef void(* usbus_hid_cb_t) (usbus_hid_device_t *hid, uint8_t *data, size_t len)

HID data callback.

Callback for received data from the USB host

Parameters
[in]hidHID handler context
[in]dataptr to the data
[in]lenLength of the received data

Definition at line 61 of file hid.h.

◆ usbus_hid_device_t

USBUS HID context struct forward declaration.

Definition at line 50 of file hid.h.

Function Documentation

◆ usbus_hid_init()

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.

Parameters
[in]usbusUSBUS context to register with
[in]hidUSBUS HID handler
[in]cbCallback for data from the USB interface
[in]report_descUSB_HID report descriptor
[in]report_desc_sizeSize of USB_HID report descriptor