USBD_MSC_OS_CommSignalPend

Description

Wait on a semaphore to become available for MSC communication.

Files

usbd_msc_os.h / usbd_msc_os.c

Prototype

void  USBD_MSC_OS_CommSignalPend (CPU_INT08U   class_nbr,
                                  CPU_INT32U   timeout,
                                  USBD_ERR    *p_err);


Arguments

class_nbr

MSC instance class number.

timeout

Timeout in milliseconds.

p_err

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

USBD_ERR_NONE
USBD_ERR_OS_TIMEOUT
USBD_ERR_OS_FAIL

Returned Value

None.

Callers

Mass Storage Class.

Implementation Guidelines

The lock operation typically consists in pending on a semaphore. If the semaphore is free, the task continues normally its execution, otherwise it waits until another task releases the semaphore. p_err argument should be assigned as described in following table.

Table - Error code assignment according to pend operation result
Operation resultError code to assign
No errorUSBD_ERR_NONE
Pend abortedUSBD_ERR_OS_ABORT
Pend failed for any other reasonUSBD_ERR_OS_FAIL