emacps: xemacps_bdring.h File Reference

| emacps Xilinx SDK Drivers API Documentation

- Overview
- Data Structures
- APIs
- File List
- Examples

Data Structures | Macros | Functions
xemacps_bdring.h File Reference

## Data Structures
struct | XEmacPs_BdRing
| This is an internal structure used to maintain the DMA list. More...

## Macros
#define | XEmacPs_BdRingCntCalc(Alignment, Bytes) (u32)((Bytes) / (sizeof(XEmacPs_Bd)))
| Use this macro at initialization time to determine how many BDs will fit in a BD list within the given memory constraints. More...
#define | XEmacPs_BdRingMemCalc(Alignment, NumBd) (u32)(sizeof(XEmacPs_Bd) * (NumBd))
| Use this macro at initialization time to determine how many bytes of memory is required to contain a given number of BDs at a given alignment. More...
#define | XEmacPs_BdRingGetCnt(RingPtr) ((RingPtr)->AllCnt)
| Return the total number of BDs allocated by this channel with XEmacPs_BdRingCreate(). More...
#define | XEmacPs_BdRingGetFreeCnt(RingPtr) ((RingPtr)->FreeCnt)
| Return the number of BDs allocatable with XEmacPs_BdRingAlloc() for pre- processing. More...
#define | XEmacPs_BdRingNext(RingPtr, BdPtr)
| Return the next BD from BdPtr in a list. More...
#define | XEmacPs_BdRingPrev(RingPtr, BdPtr)
| Return the previous BD from BdPtr in the list. More...

## Functions
LONG | XEmacPs_BdRingCreate (XEmacPs_BdRing *RingPtr, UINTPTR PhysAddr, UINTPTR VirtAddr, u32 Alignment, u32 BdCount)
| Using a memory segment allocated by the caller, create and setup the BD list for the given DMA channel. More...
LONG | XEmacPs_BdRingClone (XEmacPs_BdRing *RingPtr, XEmacPs_Bd *SrcBdPtr, u8 Direction)
| Clone the given BD into every BD in the list. More...
LONG | XEmacPs_BdRingAlloc (XEmacPs_BdRing *RingPtr, u32 NumBd, XEmacPs_Bd **BdSetPtr)
| Reserve locations in the BD list. More...
LONG | XEmacPs_BdRingUnAlloc (XEmacPs_BdRing *RingPtr, u32 NumBd, XEmacPs_Bd *BdSetPtr)
| Fully or partially undo an XEmacPs_BdRingAlloc() operation. More...
LONG | XEmacPs_BdRingToHw (XEmacPs_BdRing *RingPtr, u32 NumBd, XEmacPs_Bd *BdSetPtr)
| Enqueue a set of BDs to hardware that were previously allocated by XEmacPs_BdRingAlloc(). More...
LONG | XEmacPs_BdRingFree (XEmacPs_BdRing *RingPtr, u32 NumBd, XEmacPs_Bd *BdSetPtr)
| Frees a set of BDs that had been previously retrieved with XEmacPs_BdRingFromHw(). More...
u32 | XEmacPs_BdRingFromHwTx (XEmacPs_BdRing *RingPtr, u32 BdLimit, XEmacPs_Bd **BdSetPtr)
| Returns a set of BD(s) that have been processed by hardware. More...
u32 | XEmacPs_BdRingFromHwRx (XEmacPs_BdRing *RingPtr, u32 BdLimit, XEmacPs_Bd **BdSetPtr)
| Returns a set of BD(s) that have been processed by hardware. More...
LONG | XEmacPs_BdRingCheck (XEmacPs_BdRing *RingPtr, u8 Direction)
| Check the internal data structures of the BD ring for the provided channel. More...
void | XEmacPs_BdRingPtrReset (XEmacPs_BdRing *RingPtr, void *virtaddrloc)
| Reset BD ring head and tail pointers. More...