VxWorks API Reference : USB libraries
usbTcdLib [USB] - TCD functional API
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
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.
usbTcdAttach( ) - Attach/initialize a TCD
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 */ )
OK, or ERROR if unable to attach TCD
S_usbTcdLib_BAD_PARAM
usbTcdDetach( ) - Detaches/shuts down TCD
STATUS usbTcdDetach ( pTCD_NEXUS pNexus /* client's nexus */ )
OK, or ERROR if unable to detach TCD
usbTcdEnable( ) - Enables TCD
STATUS usbTcdEnable ( pTCD_NEXUS pNexus /* client's nexus */ )
OK, or ERROR if unable to enable TCD
usbTcdDisable( ) - Disables TCD
STATUS usbTcdDisable ( pTCD_NEXUS pNexus /* client's nexus */ )
OK, or ERROR if unable to disable TCD
usbTcdAddressSet( ) - Sets device address on the USB
STATUS usbTcdAddressSet ( pTCD_NEXUS pNexus, /* client's nexus */ UINT16 deviceAddress /* new address for target */ )
OK, or ERROR if unable to set USB address
usbTcdSignalResume( ) - Drives USB RESUME signalling
STATUS usbTcdSignalResume ( pTCD_NEXUS pNexus /* client's nexus */ )
OK, or ERROR if unable to drive RESUME signalling
usbTcdEndpointAssign( ) - Assigns an endpoint for subsequent data transfer
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 */ )
OK, or ERROR if unable to assign endpoint.
usbTcdEndpointRelease( ) - Release a previously assigned endpoint
STATUS usbTcdEndpointRelease ( pTCD_NEXUS pNexus, /* client's nexus */ UINT16 endpointId /* endpointId to release */ )
OK, or ERROR if unable to release endpoint
usbTcdEndpointStateSet( ) - Sets endpoint stall/unstall state
STATUS usbTcdEndpointStateSet ( pTCD_NEXUS pNexus, /* client's nexus */ UINT16 endpointId, /* endpointId */ UINT16 state /* TCD_ENDPOINT_STALL/UNSTALL */ )
OK, or ERROR if unable to set endpoint state
usbTcdCurrentFrameGet( ) - Gets current USB frame number
STATUS usbTcdCurrentFrameGet ( pTCD_NEXUS pNexus, /* client's nexus */ pUINT16 pFrameNo /* current frame number */ )
OK, or ERROR if unable to get USB frame number
usbTcdErpSubmit( ) - Submits a USB_ERP for execution
STATUS usbTcdErpSubmit ( pTCD_NEXUS pNexus, /* client's nexus */ pUSB_ERP pErp /* ERP to be executed */ )
OK, or ERROR if unable to submit ERP
usbTcdErpCancel( ) - Cancels a USB_ERP
STATUS usbTcdErpCancel ( pTCD_NEXUS pNexus, /* client's nexus */ pUSB_ERP pErp /* ERP to be canceled */ )
OK, or ERROR if unable to cancel ERP