Description
Adds a new instance of the HID class.
Files
usbd_hid.h/usbd_hid.c
Prototype
Arguments
subclass
Subclass code.
protocol
Protocol code.
country_code
Country code ID.
p_report_desc
Pointer to report descriptor structure.
report_desc_len
Report descriptor length.
p_phy_desc
Pointer to physical descriptor structure.
phy_desc_len
Physical descriptor length.
interval_in
Polling interval for input transfers, in milliseconds. It must be a power of 2.
interval_out
Polling interval for output transfers, in milliseconds. It must be a power of 2. Used only when read operations are not through control transfers.
ctrl_rd_en
Enable read operations through control transfers.
p_hid_callback
Pointer to HID descriptor and request callback structure. Can be null.
p_err
Pointer to variable that will receive the return error code from this function.
USBD_ERR_NONE
USBD_ERR_ALLOC
USBD_ERR_NULL_PTR
USBD_ERR_INVALID_ARG
USBD_ERR_FAIL
Returned Value
Class interface number, if NO error(s).
USBD_CLASS_NBR_NONE
, otherwise.
Callers
Application.
Notes / Warnings
None.