AM261x MCU+ SDK: TRB API Routines

| AM261x MCU+ SDK 26.00.00 |

Functions
TRB API Routines
APIs for SOC Specific Device Drivers » APIs for USB » APIs for Synopsys driver

## Introduction

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

## Functions
dwc_usb3_dma_desc_t * | dwc_usb3_pcd_trb_alloc (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 (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 (dwc_usb3_pcd_t *pcd, 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 | ( | 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

  ep | The EP for the allocation.
  num_trbs | Number of TRBs to allocate.
  trb_type | Type of the TRB.
  iso_intvl | bInterval if this is an Isoc EP.
  link | True if the TRBs should be linked in a circular chain (only supported for Isoc EPs for now).
  trbs_dma_ret | The 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 | ( | dwc_usb3_pcd_ep_t * | ep | ) |

This routine frees the TRBs allocated by dwc_usb3_pcd_trb_alloc().

Parameters

  ep | The EP for the allocation.

## ◆ dwc_usb3_pcd_fill_trbs()

void dwc_usb3_pcd_fill_trbs | ( | dwc_usb3_pcd_t * | pcd,
|  | dwc_usb3_pcd_ep_t * | ep,
|  | dwc_usb3_pcd_req_t * | req
| ) |  |

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

Parameters

  pcd | Programming view of DWC_usb3 peripheral controller.
  ep | The EP for the transfer.
  req | The request that needs the TRBs.