VxWorks API Reference : USB libraries

usbTcdLib [USB]

NAME

usbTcdLib [USB] - TCD functional API

ROUTINES

usbTcdAttach( ) - Attach/initialize a TCD
usbTcdDetach( ) - Detaches/shuts down TCD
usbTcdEnable( ) - Enables TCD
usbTcdDisable( ) - Disables TCD
usbTcdAddressSet( ) - Sets device address on the USB
usbTcdSignalResume( ) - Drives USB RESUME signalling
usbTcdEndpointAssign( ) - Assigns an endpoint for subsequent data transfer
usbTcdEndpointRelease( ) - Release a previously assigned endpoint
usbTcdEndpointStateSet( ) - Sets endpoint stall/unstall state
usbTcdCurrentFrameGet( ) - Gets current USB frame number
usbTcdErpSubmit( ) - Submits a USB_ERP for execution
usbTcdErpCancel( ) - Cancels a USB_ERP

DESCRIPTION

This file defines a generic functional interface to a USB TCD (Target Controller Driver). USB TCDs export a single public entry point, their USB_TCD_EXEC_FUNC. To this entry point the caller passes a USB_TRB, or TCD Request Block, which contains a function code identifying a task to be performed by the TCD and which contains any parameters required for the specified function.

This library provides a functional API which to the TCD which hides the underlying USB_TRBs from the caller. This simplifies the caller's use of the TCD.

Normally, this library is used only by usbTargLib. Other modules should have no need to call this library directly.


USB libraries : Routines

usbTcdAttach( )

NAME

usbTcdAttach( ) - Attach/initialize a TCD

SYNOPSIS

STATUS usbTcdAttach
    (
    USB_TCD_EXEC_FUNC         tcdExecFunc,        /* TCD's primary entry */
                                                  /* point */ 
    pVOID                     tcdParam,           /* TCD-specific param */
    pTCD_NEXUS                pNexus,             /* nexus will be */
                                                  /* initialized on return 
    USB_TCD_MNGMT_CALLBACK    mngmtCallback,      /* caller's management */
                                                  /* callback */ 
    pVOID                     mngmtCallbackParam, /* caller-defined mngmt */
                                                  /* callback param */ 
    pUINT16                   pSpeed,             /* bfr to receive */
                                                  /* target's speed */ 
    pUINT16                   pNumEndpoints,      /* bfr to receive nbr */
                                                  /* of endpoints */ 
    pUSB_TARG_ENDPOINT_INFO * ppEndpoints         /* bfr to receive ptr */
                                                  /* to endpt tbl */ 
    )

DESCRIPTION

RETURNS

OK, or ERROR if unable to attach TCD

ERRNO

  S_usbTcdLib_BAD_PARAM

SEE ALSO

usbTcdLib


USB libraries : Routines

usbTcdDetach( )

NAME

usbTcdDetach( ) - Detaches/shuts down TCD

SYNOPSIS

STATUS usbTcdDetach
    (
    pTCD_NEXUS pNexus         /* client's nexus */
    )

DESCRIPTION

RETURNS

OK, or ERROR if unable to detach TCD

SEE ALSO

usbTcdLib


USB libraries : Routines

usbTcdEnable( )

NAME

usbTcdEnable( ) - Enables TCD

SYNOPSIS

STATUS usbTcdEnable
    (
    pTCD_NEXUS pNexus         /* client's nexus */
    )

DESCRIPTION

RETURNS

OK, or ERROR if unable to enable TCD

SEE ALSO

usbTcdLib


USB libraries : Routines

usbTcdDisable( )

NAME

usbTcdDisable( ) - Disables TCD

SYNOPSIS

STATUS usbTcdDisable
    (
    pTCD_NEXUS pNexus         /* client's nexus */
    )

DESCRIPTION

RETURNS

OK, or ERROR if unable to disable TCD

SEE ALSO

usbTcdLib


USB libraries : Routines

usbTcdAddressSet( )

NAME

usbTcdAddressSet( ) - Sets device address on the USB

SYNOPSIS

STATUS usbTcdAddressSet
    (
    pTCD_NEXUS pNexus,        /* client's nexus */
    UINT16     deviceAddress  /* new address for target */
    )

DESCRIPTION

RETURNS

OK, or ERROR if unable to set USB address

SEE ALSO

usbTcdLib


USB libraries : Routines

usbTcdSignalResume( )

NAME

usbTcdSignalResume( ) - Drives USB RESUME signalling

SYNOPSIS

STATUS usbTcdSignalResume
    (
    pTCD_NEXUS pNexus         /* client's nexus */
    )

DESCRIPTION

RETURNS

OK, or ERROR if unable to drive RESUME signalling

SEE ALSO

usbTcdLib


USB libraries : Routines

usbTcdEndpointAssign( )

NAME

usbTcdEndpointAssign( ) - Assigns an endpoint for subsequent data transfer

SYNOPSIS

STATUS usbTcdEndpointAssign
    (
    pTCD_NEXUS pNexus,        /* client's nexus */
    UINT16     endpointId,    /* TCD-assigned endpoint ID */
    UINT16     endpointNum,   /* endpoint number to be assigned */
    UINT16     configuration, /* configuration associated with endpoint */
    UINT16     interface,     /* interface associated with endpoint */
    UINT16     transferType,  /* transfer type for endpoint */
    UINT16     direction      /* direction for endpoint */
    )

DESCRIPTION

RETURNS

OK, or ERROR if unable to assign endpoint.

SEE ALSO

usbTcdLib


USB libraries : Routines

usbTcdEndpointRelease( )

NAME

usbTcdEndpointRelease( ) - Release a previously assigned endpoint

SYNOPSIS

STATUS usbTcdEndpointRelease
    (
    pTCD_NEXUS pNexus,        /* client's nexus */
    UINT16     endpointId     /* endpointId to release */
    )

DESCRIPTION

RETURNS

OK, or ERROR if unable to release endpoint

SEE ALSO

usbTcdLib


USB libraries : Routines

usbTcdEndpointStateSet( )

NAME

usbTcdEndpointStateSet( ) - Sets endpoint stall/unstall state

SYNOPSIS

STATUS usbTcdEndpointStateSet
    (
    pTCD_NEXUS pNexus,        /* client's nexus */
    UINT16     endpointId,    /* endpointId */
    UINT16     state          /* TCD_ENDPOINT_STALL/UNSTALL */
    )

DESCRIPTION

RETURNS

OK, or ERROR if unable to set endpoint state

SEE ALSO

usbTcdLib


USB libraries : Routines

usbTcdCurrentFrameGet( )

NAME

usbTcdCurrentFrameGet( ) - Gets current USB frame number

SYNOPSIS

STATUS usbTcdCurrentFrameGet
    (
    pTCD_NEXUS pNexus,        /* client's nexus */
    pUINT16    pFrameNo       /* current frame number */
    )

DESCRIPTION

RETURNS

OK, or ERROR if unable to get USB frame number

SEE ALSO

usbTcdLib


USB libraries : Routines

usbTcdErpSubmit( )

NAME

usbTcdErpSubmit( ) - Submits a USB_ERP for execution

SYNOPSIS

STATUS usbTcdErpSubmit
    (
    pTCD_NEXUS pNexus,        /* client's nexus */
    pUSB_ERP   pErp           /* ERP to be executed */
    )

DESCRIPTION

RETURNS

OK, or ERROR if unable to submit ERP

SEE ALSO

usbTcdLib


USB libraries : Routines

usbTcdErpCancel( )

NAME

usbTcdErpCancel( ) - Cancels a USB_ERP

SYNOPSIS

STATUS usbTcdErpCancel
    (
    pTCD_NEXUS pNexus,        /* client's nexus */
    pUSB_ERP   pErp           /* ERP to be canceled */
    )

DESCRIPTION

RETURNS

OK, or ERROR if unable to cancel ERP

SEE ALSO

usbTcdLib