Skip to end of metadata
Go to start of metadata

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

Compare with Current View Page History

Version 1 Current »

Description

Creates a signal/semaphore for endpoints operations.

Files

usbd_internal.h/usbd_os.c

Prototype

Arguments

dev_nbr

Device number.

ep_ix

Endpoint index.

p_err

Pointer to variable that will receive the return error code from this function.

Returned Value

None.

Callers

Endpoints open functions.

Implementation guidelines

  1. The purpose of this function is to allocate a signal or a semaphore for the specified endpoint.
  2. Typically, the RTOS layer code should create a two-dimensional array to store the signals/semaphores handlers. The dev_nbr and ep_ix are used to index this array.
  3. dev_nbr ranges between 0 and USBD_CFG_MAX_NBR_DEV.
  4. ep_ix ranges between 0 and USBD_CFG_MAX_NBR_EP_OPEN.
  5. In case the creation fails, USBD_ERR_OS_SIGNAL_CREATE should be assigned to p_err. Otherwise, USBD_ERR_NONE should be assigned to p_err.
  • No labels