Description
Lock the write bulk pipe.
Files
usbd_phdc_os.h / usbd_phdc_os.c
Prototype
Arguments
class_nbr
PHDC instance number.
prio
Priority of the transfer. This value is between 0 and 4 and is computed in function of the transfer’s QoS by the caller.
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
- Two typical implementations will be possible here. The first one consists in pending on a semaphore that locks the write bulk pipe, just as we saw previously.
- But since different QoS data can travel using a single bulk IN endpoint, you might want to prioritize them in function of the QoS. See PHDC RTOS QoS-based scheduler for more details on how a priority manager can be implemented.
p_err
argument should be assigned as described in .