/
USBD_OS_EP_LockAcquire
USBD_OS_EP_LockAcquire
Description
Wait for an endpoint to become available and acquire its lock.
Files
usbd_internal.h/usbd_os.c
Prototype
void USBD_OS_EP_LockAcquire (CPU_INT08U dev_nbr, CPU_INT08U ep_ix, CPU_INT16U timeout_ms, USBD_ERR *p_err);
Arguments
dev_nbr
Device number.
ep_ix
Endpoint index.
timeout_ms
Timeout in milliseconds.
p_err
Pointer to variable that will receive the return error code from this function.
Returned Value
None.
Implementation guidelines
- A call to this function should pend on the lock associated to the specified endpoint.
Following table describes the error codes that should be assigned to
p_err
depending on the operation result.
Table - Error code for pend operations
Operation result | Error code |
---|---|
No error. | USBD_ERR_NONE |
Pend timeout | USBD_ERR_OS_TIMEOUT |
Pend aborted | USBD_ERR_OS_ABORT |
Pend failed for any other reason | USBD_ERR_OS_FAIL |
, multiple selections available,
Related content
USBD_OS_EP_LockRelease
USBD_OS_EP_LockRelease
More like this
USBD_OS_EP_LockCreate
USBD_OS_EP_LockCreate
More like this
USBD_EP_IsStalled
USBD_EP_IsStalled
More like this
USBD_OS_EP_SignalPend
USBD_OS_EP_SignalPend
More like this
USBD_OS_CoreEventGet
USBD_OS_CoreEventGet
More like this
USBD_OS_EP_LockDel
USBD_OS_EP_LockDel
More like this