USBD_HID_OS_Init
Description
Initialize HID OS interface.
Files
usbd_hid_os.h/
usbd_hid_os.c
Prototype
void USBD_HID_OS_Init (USBD_ERR *p_err);
Arguments
p_err
Pointer to variable that will receive the return error code from this function.
USBD_ERR_NONE
OS error code(s) relevant to failure(s).
Callers
HID Class.
Implementation Guidelines
The USBD_HID_Init()
function is called only once by the HID class. It usually performs the following operations:
- For each class instance up to the maximum number of HID class instances defined by the constant
USBD_HID_CFG_MAX_NBR_DEV
, create all the required semaphores. If the any semaphore creation fails, setp_err
toUSBD_ERR_OS_SIGNAL_CREATE
and return. - Create a task used to manage periodic Input reports. If the task creation fails, set
p_err
toUSBD_ERR_OS_INIT_FAIL
and return. - Set
p_err
toUSBD_ERR_NONE
if the initialization proceeded as expected.