# _EMAC_Core_Config Struct Reference
[EMAC Data Structures]

EMAC_Core_Config. More...

`#include <csl_emac.h>`

## Data Fields

EMAC_Pkt *(* | pfcbGetPacket )(Handle hApplication)
void(* | pfcbFreePacket )(Handle hApplication, EMAC_Pkt *pPacket)
EMAC_Pkt *(* | pfcbRxPacket )(Handle hApplication, EMAC_Pkt *pPacket)
void(* | pfcbStatus )(Handle hApplication)
void(* | pfcbStatistics )(Handle hApplication)
Uint8 | DescBase
EMAC_ChannelInfo | ChannelInfo
Uint8 | NumOfMacAddrs
EMAC_AddrConfig ** | MacAddr
Uint32 | RxMaxPktPool

## Detailed Description

EMAC_Core_Config.

The EMAC_Core_Config structure defines configurations specific to individual cores when the EMAC device is operating. It is passed to the device when the device is initialized for individual cores (EMAC_coreInit()), and remains in effect until the device is de-initialized for the corresponding cores (EMAC_coreDeInit()).

The following is a short description of the configuration fields:

A list of callback functions is used to register callback functions with a particular core the EMAC peripheral instance. Callback functions are used by EMAC to communicate with the application. These functions are REQUIRED for operation. The same callback table can be used for multiple cores and/or multiple driver instances.

pfcbGetPacket - Called by EMAC to get a free packet buffer from the application layer for receive data. This function should return NULL is no free packets are available. The size of the packet buffer must be large enough to accommodate a full sized packet (1514 or 1518 depending on the EMAC_CONFIG_MODEFLG_RXCRC flag), plus any application buffer padding (DataOffset).

pfcbFreePacket - Called by EMAC to give a free packet buffer back to the application layer. This function is used to return transmit packets. Note that at the time of the call, structure fields other than pDataBuffer and BufferLen are in an undefined state.

pfcbRxPacket - Called to give a received data packet to the application layer. The applicaiton must accept the packet. When the application is finished with the packet, it can return it to its own free queue. This function also returns a pointer to a free packet to replace the received packet on the EMAC free list. It returns NULL when no free packets are available. The return packet is the same as would be returned by pfcbGetPacket. Thus if a newly received packet is not desired, it can simply be returned to EMAC via the return value.

pfcbStatus - Called to indicate to the application that it should call EMAC_getStatus() to read the current device status. This call is made when device status changes.

pfcbStatistics - Called to indicate to the application that it should call EMAC_getStatistics() to read the current Ethernet statistics. Called when the statistic counters are to the point of overflow.

The hApplication calling argument is the application's handle as supplied to the EMAC device for individual cores in the EMAC_coreInit() function.

DescBase - Descriptor memory selction to place the EMAC descriptors

ChannelInfo - Tx and Rx Channel information to be used by the core

NumOfMacAddrs - Number of MAC addresses to be assigned to the core

MacAddr - Device MAC addresses for the core

RxMaxPktPool - Max Rx packet buffers to get from pool (Must be in the range of 8 to 192)

## Field Documentation

EMAC_ChannelInfo _EMAC_Core_Config::ChannelInfo

Tx and Rx Channel information for individual cores to use

Uint8 _EMAC_Core_Config::DescBase

This member is for descriptor memory selction to place the EMAC descriptors in CPPI RAM or L2 RAM or DDR memory

EMAC_AddrConfig** _EMAC_Core_Config::MacAddr

Mac Addresses structure

Uint8 _EMAC_Core_Config::NumOfMacAddrs

Number of MAC addresses to be assigned for individual cores

void(* _EMAC_Core_Config::pfcbFreePacket)(Handle hApplication, EMAC_Pkt *pPacket)

Free packet call back

EMAC_Pkt*(* _EMAC_Core_Config::pfcbGetPacket)(Handle hApplication)

Get packet call back

EMAC_Pkt*(* _EMAC_Core_Config::pfcbRxPacket)(Handle hApplication, EMAC_Pkt *pPacket)

Receive packet call back

void(* _EMAC_Core_Config::pfcbStatistics)(Handle hApplication)

Get statistics call back

void(* _EMAC_Core_Config::pfcbStatus)(Handle hApplication)

Get status call back

Uint32 _EMAC_Core_Config::RxMaxPktPool

Max Rx packet buffers to get from pool

The documentation for this struct was generated from the following file:

- csl_emac.h

Copyright 2012, Texas Instruments Incorporated