USBD_StrAdd
Description
Adds a string to the USB device.
Files
usbd_core.h/usbd_core.c
Prototype
void USBD_StrAdd ( CPU_INT08U dev_nbr, const CPU_CHAR *p_str, USBD_ERR *p_err);
Arguments
dev_nbr
Device number.
p_str
Pointer to string to add.
p_err
Pointer to variable that will receive the return error code from this function.
USBD_ERR_NONE
USBD_ERR_DEV_INVALID_NBR
Returned Value
None.
Callers
Classes.
Notes / Warnings
USB spec 2.0 chapter 9.5 states "Where appropriate, descriptors contain references to string descriptors that provide displayable information describing a descriptor in human-readable form. The inclusion of string descriptors is optional. However, the reference fields within descriptors are mandatory. If a device does not support string descriptors, string reference fields must be reset to zero to indicate no string descriptor is available". Since string descriptors are optional, 'p_str' could be a NULL pointer.