AM261x MCU+ SDK  11.00.00

Introduction

These routines handle the allocation, deallocation, and setup of TRBs.

Functions

dwc_usb3_dma_desc_tdwc_usb3_pcd_trb_alloc (volatile dwc_usb3_pcd_ep_t *ep, int num_trbs, uByte trb_type, int iso_intvl, int link, dwc_dma_t *trbs_dma_ret)
 This routine allocates the TRBs for an EP. More...
 
void dwc_usb3_pcd_trb_free (volatile dwc_usb3_pcd_ep_t *ep)
 This routine frees the TRBs allocated by dwc_usb3_pcd_trb_alloc(). More...
 
void dwc_usb3_pcd_fill_trbs (volatile dwc_usb3_pcd_t *pcd, volatile dwc_usb3_pcd_ep_t *ep, dwc_usb3_pcd_req_t *req)
 This routine assigns and fills in the TRBs for a request. More...
 

Function Documentation

◆ dwc_usb3_pcd_trb_alloc()

dwc_usb3_dma_desc_t* dwc_usb3_pcd_trb_alloc ( volatile dwc_usb3_pcd_ep_t ep,
int  num_trbs,
uByte  trb_type,
int  iso_intvl,
int  link,
dwc_dma_t trbs_dma_ret 
)

This routine allocates the TRBs for an EP.

Parameters
epThe EP for the allocation.
num_trbsNumber of TRBs to allocate.
trb_typeType of the TRB.
iso_intvlbInterval if this is an Isoc EP.
linkTrue if the TRBs should be linked in a circular chain (only supported for Isoc EPs for now).
trbs_dma_retThe DMA address of the allocation is returned through this pointer.
Returns
The address of the allocated memory, or NULL if the allocation fails.

◆ dwc_usb3_pcd_trb_free()

void dwc_usb3_pcd_trb_free ( volatile dwc_usb3_pcd_ep_t ep)

This routine frees the TRBs allocated by dwc_usb3_pcd_trb_alloc().

Parameters
epThe EP for the allocation.

◆ dwc_usb3_pcd_fill_trbs()

void dwc_usb3_pcd_fill_trbs ( volatile dwc_usb3_pcd_t pcd,
volatile dwc_usb3_pcd_ep_t ep,
dwc_usb3_pcd_req_t req 
)

This routine assigns and fills in the TRBs for a request.

Parameters
pcdProgramming view of DWC_usb3 peripheral controller.
epThe EP for the transfer.
reqThe request that needs the TRBs.