USBD_OS_EP_SignalCreate
Description
Creates a signal/semaphore for endpoints operations.
Files
usbd_internal.h/usbd_os.c
Prototype
void USBD_OS_EP_SignalCreate (CPU_INT08U dev_nbr,
CPU_INT08U ep_ix,
USBD_ERR *p_err);
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
The purpose of this function is to allocate a signal or a semaphore for the specified endpoint.
Typically, the RTOS layer code should create a two-dimensional array to store the signals/semaphores handlers. The
dev_nbrandep_ixare used to index this array.dev_nbrranges between 0 andUSBD_CFG_MAX_NBR_DEV.ep_ixranges between 0 andUSBD_CFG_MAX_NBR_EP_OPEN.In case the creation fails,
USBD_ERR_OS_SIGNAL_CREATEshould be assigned top_err. Otherwise,USBD_ERR_NONEshould be assigned top_err.