USBD_PHDC_OS_RdLock
Description
Lock the read pipe.
Files
usbd_phdc_os.h / usbd_phdc_os.c
Prototype
void USBD_PHDC_OS_RdLock (CPU_INT08U class_nbr, CPU_INT16U timeout, USBD_ERR *p_err);
Arguments
class_nbr
PHDC instance number.
timeout
Timeout.
p_err
Pointer to variable that will receive the return error code from this function.
Returned Value
None.
Callers
Personal Healthcare Device Class.
Implementation guidelines
Typical implementation will consist in pending on a semaphore that locks the read pipe.p_err
argument should be assigned as described in following table.
Table - Error Code Assignment in Function of Lock Operation Result
Operation result | Error code to assign |
---|---|
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 |