VxWorks API Reference : USB libraries

usbDescrCopyLib [USB]

NAME

usbDescrCopyLib [USB] - USB descriptor copy utility functions

ROUTINES

usbDescrCopy32( ) - copies descriptor to a buffer
usbDescrCopy( ) - copies descriptor to a buffer
usbDescrStrCopy32( ) - copies an ASCII string to a string descriptor
usbDescrStrCopy( ) - copies an ASCII string to a string descriptor

DESCRIPTION

This modules contains miscellaneous functions which may be used by the USB driver (USBD), USB HCD (USB Host Controller Driver), USB HCD (USB Target Controller Driver) or by USBD clients.


USB libraries : Routines

usbDescrCopy32( )

NAME

usbDescrCopy32( ) - copies descriptor to a buffer

SYNOPSIS

VOID usbDescrCopy32
    (
    pUINT8  pBfr,             /* destination buffer */
    pVOID   pDescr,           /* source buffer */
    UINT32  bfrLen,           /* dest len */
    pUINT32 pActLen           /* actual length copied */
    )

DESCRIPTION

This function is the same as usbDescrCopy( ) except that bfrLen and pActLen refer to UINT32 quantities.

RETURNS

N/A

SEE ALSO

usbDescrCopyLib


USB libraries : Routines

usbDescrCopy( )

NAME

usbDescrCopy( ) - copies descriptor to a buffer

SYNOPSIS

VOID usbDescrCopy
    (
    pUINT8  pBfr,             /* destination buffer */
    pVOID   pDescr,           /* source buffer */
    UINT16  bfrLen,           /* dest len */
    pUINT16 pActLen           /* actual length copied */
    )

DESCRIPTION

Copies the USB descriptor at pDescr to the pBfr of length bfrLen. Returns the actual number of bytes copied - which is the shorter of the pDescr or bfrLen - in pActLen if pActLen is non-NULL.

RETURNS

N/A

SEE ALSO

usbDescrCopyLib


USB libraries : Routines

usbDescrStrCopy32( )

NAME

usbDescrStrCopy32( ) - copies an ASCII string to a string descriptor

SYNOPSIS

VOID usbDescrStrCopy32
    (
    pUINT8  pBfr,             /* destination buffer */
    char *  pStr,             /* source buffer */
    UINT32  bfrLen,           /* dest len */
    pUINT32 pActLen           /* actual length copied */
    )

DESCRIPTION

This function is the same as usbDescrStrCopy( ) except that bfrLen and pActLen refer to UINT32 quantities.

RETURNS

N/A

SEE ALSO

usbDescrCopyLib


USB libraries : Routines

usbDescrStrCopy( )

NAME

usbDescrStrCopy( ) - copies an ASCII string to a string descriptor

SYNOPSIS

VOID usbDescrStrCopy
    (
    pUINT8  pBfr,             /* destination buffer */
    char *  pStr,             /* source buffer */
    UINT16  bfrLen,           /* dest len */
    pUINT16 pActLen           /* actual length copied */
    )

DESCRIPTION

This function constructs a properly formatted USB string descriptor in pBfr. The ASCII string pStr is copied to pBfr as a UNICODE string - as required by the USB spec. The actual length of the resulting descriptor is returned in pActLen if pActLen is non-NULL.

NOTE

The complete length of the string descriptor can be calculated as 2 * strlen (pStr) + 2. The pActLen will be the shorter of bfrLen or this value.

RETURNS

N/A

SEE ALSO

usbDescrCopyLib