Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

Version 1 Current »

Description

Initialize HID OS interface.

Files

usbd_hid_os.h/usbd_hid_os.c

Prototype

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:

  1. 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, set p_err to USBD_ERR_OS_SIGNAL_CREATE and return.
  2. Create a task used to manage periodic Input reports. If the task creation fails, set p_err to USBD_ERR_OS_INIT_FAIL and return.
  3. Set p_err to USBD_ERR_NONE if the initialization proceeded as expected.
  • No labels