Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

usbd_phdc_os.h / usbd_phdc_os.c

Prototype

Code Block
languagecpp
void  USBD_PHDC_OS_WrBulkLock (CPU_INT08U   class_nbr,
                               CPU_INT08U   prio,
                               CPU_INT16U   timeout,
                               USBD_ERR    *p_err);


Arguments

class_nbr

PHDC instance number.

...

  1. 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.
  2. 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.
  3. p_err argument should be assigned as described in Table - Error Code Assignment in Function of Lock Operation Result.