USBD_PHDC_PreambleWr
Description
Write metadata preamble. This function is blocking.
Files
usbd_phdc.h / usbd_phdc.c
Prototype
void USBD_PHDC_PreambleWr (CPU_INT08U class_nbr, void *p_data_opaque, CPU_INT16U data_opaque_len, LATENCY_RELY_FLAGS latency_rely CPU_INT08U nbr_xfers, CPU_INT16U timeout, USBD_ERR *p_err);
Arguments
class_nbr
PHDC instance number.
p_data_opaque
Pointer to buffer that will supply opaque data.
data_opaque_len
Length of opaque data buffer in octets.
latency_rely
Latency reliability of related transfers.
nbr_xfers
Number of transfers this preamble will apply to.
timeout
Timeout in milliseconds.
p_err
Pointer to variable that will receive the return error code from this function.
USBD_ERR_NONE
USBD_ERR_INVALID_ARG
USBD_ERR_NULL_PTR
USBD_ERR_TX
USBD_ERR_DEV_INVALID_NBR
USBD_ERR_DEV_INVALID_STATE
USBD_ERR_EP_INVALID_ADDR
USBD_ERR_EP_INVALID_STATE
USBD_ERR_EP_INVALID_TYPE
USBD_OS_ERR_TIMEOUT
USBD_OS_ERR_ABORT
USBD_OS_ERR_FAIL
Returned Value
None.
Callers
Application.
Notes / Warnings
USBD_PHDC_PreambleWr()
should always be called beforeUSBD_PHDC_Wr()
if metadata message preambles are enabled by the host and if the latency of the transfer is not ‘low’.- Application will have to call
USBD_PHDC_Wr()
‘nbr_xfers’
of times with the same latency / reliability parameter after a call toUSBD_PHDC_PreambleWr()
.