USBD_PHDC_WrCfg
Description
Initialize write communication pipe parameters.
Files
usbd_phdc.h / usbd_phdc.c
Prototype
void USBD_PHDC_WrCfg (CPU_INT08U class_nbr,
LATENCY_RELY_FLAGS latency_rely,
CPU_INT08U *p_data_opaque,
CPU_INT08U data_opaque_len,
USBD_ERR *p_err);Arguments
class_nbr
PHDC instance number.
latency_rely
Bitmap of transfer Latency / reliability that this communication pipe will carry. Can be one or more of these values:
USBD_PHDC_LATENCY_VERYHIGH_RELY_BEST
USBD_PHDC_LATENCY_HIGH_RELY_BEST
USBD_PHDC_LATENCY_MEDIUM_RELY_BEST
USBD_PHDC_LATENCY_MEDIUM_RELY_BETTER
USBD_PHDC_LATENCY_MEDIUM_RELY_GOOD
USBD_PHDC_LATENCY_LOW_RELY_GOOD
p_data_opaque
Pointer to a buffer that contains opaque data related to this communication pipe.
data_opaque_len
Length of opaque data (in octets). If 0, no metadata descriptor will be written for the endpoint.
p_err
Pointer to variable that will receive the return error code from this function.
USBD_ERR_NONE
USBD_ERR_NULL_PTR
USBD_ERR_INVALID_ARG
Returned Value
None.
Callers
Application.
Notes / Warnings
USBD_PHDC_WrCfg()should be called after USBD_PHDC_Init and USBD_PHDC_Addbut before USBD_PHDC_CfgAdd().Since low latency transfers will use a different endpoint, it is possible to set different opaque data for that endpoint. In case the application need different opaque data for low latency pipe,
USBD_PHDC_WrCfg()should be called twice. Once with all the desired latency/reliability flags set except for low latency, opaque data passed at this call will be used for the Bulk endpoint metadata descriptor.USBD_PHDC_WrCfg()should then be called once again with only the low latency flag set, opaque data passed at this call will be used for interrupt endpoint metadata descriptor.