AM263x MCU+ SDK  10.00.00
enet_dma_pktutils.h File Reference

Introduction

Enet DMA utility API to check packet and descriptor ownership states during development and debug.

Go to the source code of this file.

Macros

#define ENET_UTILS_GET_STATE(state, mask, bitshift)   ((*(state) & (mask)) >> (bitshift))
 
#define ENET_UTILS_SET_STATE(state, mask, bitshift, value)
 
#define ENET_UTILS_DRIVER_STATE_MASK   (0x000000FFU)
 
#define ENET_UTILS_DRIVER_STATE_BIT_SHIFT   (0U)
 
#define ENET_DMA_MEMMGR_STATE_MASK   (0x0000FF00U)
 
#define ENET_DMA_MEMMGR_STATE_BIT_SHIFT   (8U)
 
#define ENET_UTILS_APP_STATE_MASK   (0x00FF0000U)
 
#define ENET_UTILS_APP_STATE_BIT_SHIFT   (16U)
 
#define ENET_UTILS_GET_PKT_DRIVER_STATE(state)
 
#define ENET_UTILS_SET_PKT_DRIVER_STATE(state, value)
 
#define ENET_UTILS_GET_PKT_MEMMGR_STATE(state)
 
#define ENET_UTILS_SET_PKT_MEMMGR_STATE(state, value)
 
#define ENET_UTILS_GET_PKT_APP_STATE(state)
 
#define ENET_UTILS_SET_PKT_APP_STATE(state, value)
 
#define ENET_DMA_MEMMGR_DESCSTATE_MASK   (0x000000FFU)
 
#define ENET_DMA_MEMMGR_DESCSTATE_SHIFT   (0U)
 
#define ENET_UTILS_GET_DESC_MEMMGR_STATE(state)
 
#define ENET_UTILS_SET_DESC_MEMMGR_STATE(state, value)
 

Enumerations

enum  EnetDma_DescStateMemMgr { ENET_DESCSTATE_MEMMGR_FREE = 0U, ENET_DESCSTATE_MEMMGR_ALLOC }
 Enet DMA Descriptor state. More...
 
enum  EnetDma_PktStateApp { ENET_PKTSTATE_APP_WITH_FREEQ = 0U, ENET_PKTSTATE_APP_WITH_READYQ, ENET_PKTSTATE_APP_WITH_DRIVER }
 App Pkt state. More...
 
enum  EnetDma_PktStateDma { ENET_PKTSTATE_DMA_WITH_HW = 0U, ENET_PKTSTATE_DMA_NOT_WITH_HW }
 DMA Pkt state. More...
 
enum  EnetDma_PktStateMemMgr { ENET_PKTSTATE_MEMMGR_FREE = 0U, ENET_PKTSTATE_MEMMGR_ALLOC }
 Enet DMA Pkt state. More...
 
enum  EnetDma_PktStateModuleType { ENET_PKTSTATE_MODULE_APP = 0U, ENET_PKTSTATE_MODULE_DRIVER, ENET_PKTSTATE_MODULE_MEMMGR }
 Enet DMA Pkt state. More...
 

Functions

static void EnetDma_checkPktState (uint32_t *pStateVar, EnetDma_PktStateModuleType module, uint32_t expectedState, uint32_t newState)
 Packet state check & set API for app, memory manager and dma driver. More...
 
static void EnetDma_checkDescState (uint32_t *pStateVar, EnetDma_DescStateMemMgr expectedState, EnetDma_DescStateMemMgr newState)
 Descriptor state check & set API for descriptor memory manager. More...