AM64x MCU+ SDK
10.00.00
◆ ENET_UTILS_GET_STATE
#define ENET_UTILS_GET_STATE
(
state ,
mask,
bitshift
)
((*(state ) & (mask)) >> (bitshift))
◆ ENET_UTILS_SET_STATE
#define ENET_UTILS_SET_STATE
(
state ,
mask,
bitshift,
value
)
◆ ENET_UTILS_DRIVER_STATE_MASK
#define ENET_UTILS_DRIVER_STATE_MASK (0x000000FFU)
◆ ENET_UTILS_DRIVER_STATE_BIT_SHIFT
#define ENET_UTILS_DRIVER_STATE_BIT_SHIFT (0U)
◆ ENET_DMA_MEMMGR_STATE_MASK
#define ENET_DMA_MEMMGR_STATE_MASK (0x0000FF00U)
◆ ENET_DMA_MEMMGR_STATE_BIT_SHIFT
#define ENET_DMA_MEMMGR_STATE_BIT_SHIFT (8U)
◆ ENET_UTILS_APP_STATE_MASK
#define ENET_UTILS_APP_STATE_MASK (0x00FF0000U)
◆ ENET_UTILS_APP_STATE_BIT_SHIFT
#define ENET_UTILS_APP_STATE_BIT_SHIFT (16U)
◆ ENET_UTILS_GET_PKT_DRIVER_STATE
#define ENET_UTILS_GET_PKT_DRIVER_STATE
(
state )
◆ ENET_UTILS_SET_PKT_DRIVER_STATE
#define ENET_UTILS_SET_PKT_DRIVER_STATE
(
state ,
value
)
◆ ENET_UTILS_GET_PKT_MEMMGR_STATE
#define ENET_UTILS_GET_PKT_MEMMGR_STATE
(
state )
◆ ENET_UTILS_SET_PKT_MEMMGR_STATE
#define ENET_UTILS_SET_PKT_MEMMGR_STATE
(
state ,
value
)
◆ ENET_UTILS_GET_PKT_APP_STATE
#define ENET_UTILS_GET_PKT_APP_STATE
(
state )
◆ ENET_UTILS_SET_PKT_APP_STATE
#define ENET_UTILS_SET_PKT_APP_STATE
(
state ,
value
)
◆ ENET_DMA_MEMMGR_DESCSTATE_MASK
#define ENET_DMA_MEMMGR_DESCSTATE_MASK (0x000000FFU)
◆ ENET_DMA_MEMMGR_DESCSTATE_SHIFT
#define ENET_DMA_MEMMGR_DESCSTATE_SHIFT (0U)
◆ ENET_UTILS_GET_DESC_MEMMGR_STATE
#define ENET_UTILS_GET_DESC_MEMMGR_STATE
(
state )
◆ ENET_UTILS_SET_DESC_MEMMGR_STATE
#define ENET_UTILS_SET_DESC_MEMMGR_STATE
(
state ,
value
)
◆ EnetDma_DescStateMemMgr
Enet DMA Descriptor state.
DMA descriptor state used by Enet DMA driver for sanity check.
Enumerator ENET_DESCSTATE_MEMMGR_FREE Desc free
ENET_DESCSTATE_MEMMGR_ALLOC Desc Allocated
◆ EnetDma_PktStateApp
App Pkt state.
Packet state for application
Enumerator ENET_PKTSTATE_APP_WITH_FREEQ Packet with APP Free queue
ENET_PKTSTATE_APP_WITH_READYQ Packet with APP Ready queue
ENET_PKTSTATE_APP_WITH_DRIVER Packet with Driver
◆ EnetDma_PktStateDma
DMA Pkt state.
Packet state for DMA
Enumerator ENET_PKTSTATE_DMA_WITH_HW Packet with HW
ENET_PKTSTATE_DMA_NOT_WITH_HW Packet not with HW
◆ EnetDma_PktStateMemMgr
Enet DMA Pkt state.
Packet state for memory manager
Enumerator ENET_PKTSTATE_MEMMGR_FREE Packet free
ENET_PKTSTATE_MEMMGR_ALLOC Packet Allocated
◆ EnetDma_PktStateModuleType
Enet DMA Pkt state.
Type of Enet DMA Pkt state.
Enumerator ENET_PKTSTATE_MODULE_APP Module type is app
ENET_PKTSTATE_MODULE_DRIVER Module type is DMA Driver
ENET_PKTSTATE_MODULE_MEMMGR Module type is MEM Mgr
◆ EnetDma_checkPktState()
static void EnetDma_checkPktState
(
uint32_t *
pStateVar ,
EnetDma_PktStateModuleType
module ,
uint32_t
expectedState ,
uint32_t
newState
)
inline static
Packet state check & set API for app, memory manager and dma driver.
This development time API checks expected state and sets new packet state. This is used by modules handling the packet to confirm the packet is returned and allocated in correct state. Memutils checks (free, allocated), dma driver checks (with Hw, with driver) and app checks which queue it belongs
Parameters
pStateVar [IN/OUT] Pointer to packet state variable of packet structure EnetDma_Pkt
module [IN] Module id. Refer to EnetDma_PktStateModuleType
expectedState [IN] State packet is expected to be.
newState [IN] New state packet is set to.
Note - Optional for MemMgr and app. DMA driver mandatory uses when ENET_CFG_DEV_ERROR is defined.
◆ EnetDma_checkDescState()
Descriptor state check & set API for descriptor memory manager.
This development time API checks expected state and sets new descriptor state. This is used by modules handling the Desc to confirm the Desc is returned and allocated in correct state. Only memutils modules uses it now for checking if desc is free or allocated while allocating or freeing desc respectively.
Parameters
pStateVar [IN/OUT] Pointer to Desc state variable.
expectedState [IN] State Desc is expected to be.
newState [IN] New state Desc is set to.
Note - memory manager may not allocate the descState as this is optional check for MemMgr.
#define ENET_UTILS_APP_STATE_MASK
Definition: enet_dma_pktutils.h:77
#define ENET_UTILS_GET_STATE(state, mask, bitshift)
Definition: enet_dma_pktutils.h:64
#define ENET_UTILS_DRIVER_STATE_MASK
Definition: enet_dma_pktutils.h:71
uint8_t state
Definition: tisci_pm_clock.h:3
#define ENET_DMA_MEMMGR_DESCSTATE_MASK
Definition: enet_dma_pktutils.h:113
#define ENET_UTILS_SET_STATE(state, mask, bitshift, value)
Definition: enet_dma_pktutils.h:65
#define ENET_UTILS_APP_STATE_BIT_SHIFT
Definition: enet_dma_pktutils.h:78
uint32_t value
Definition: tisci_otp_revision.h:2
#define ENET_DMA_MEMMGR_STATE_BIT_SHIFT
Definition: enet_dma_pktutils.h:75
#define ENET_DMA_MEMMGR_DESCSTATE_SHIFT
Definition: enet_dma_pktutils.h:114
#define ENET_DMA_MEMMGR_STATE_MASK
Definition: enet_dma_pktutils.h:74
#define ENET_UTILS_DRIVER_STATE_BIT_SHIFT
Definition: enet_dma_pktutils.h:72