4.4
Callback Functions
4.4.1
pfcbGetPacket
As described in Section 1.5, the APIs exposed by this layer can be
conveniently grouped according to their functionality into the following
categories:
1) Initialization. EMAC_open
2) Shutdown. EMAC_close
3) Configuration. EMAC_setReceiveFilter, EMAC_getReceiveFilter,
EMAC_setMulticast,
EMAC_enumerate
4) Transmit. EMAC_sendPacket, EMAC_TxServiceCheck (Tx ISR)
5) Receive. EMAC_RxServiceCheck (Rx ISR)
6) Polling. EMAC_TimerTick
The Ethernet mini-driver layer can invoke CSL APIs to perform any
configuration or interrupt related processing only after opening and
setting up the EMAC peripheral successfully using the "EMAC_open"
API. All the error codes, macros, and constants used are defined in the
header files included with the source code and can be found in the "inc"
directory.
The CSL layer doesn't perform any OS specific operations such as
memory allocation, free, initialization, copy etc. Instead, this layer defines
the required callback functions in the "EMAC_Config" data structure and
mandates that the driver implement these functions and register them
with the driver during the "EMAC_open" call. The callback functions that
need to be implemented by the driver and their description are describe
in the subsections that follow.
See the Ethernet driver code for sample implementations of these
functions.
This function is called by the CSL layer when it needs an empty packet
buffer to replenish a receive EMAC Buffer Descriptor (BD) in the EMAC
RAM. This function needs to implement logic to allocate an EMAC packet
(of type "EMAC_Pkt") and to initialize the buffers and offsets
appropriately for use by the CSL layer. This function is typically called
during EMAC initialization to initialize the Receive BDs or can be called
during a receive interrupt servicing to re-fill any empty BDs.
EMAC_getStatus,
Generic EMAC/MDIO CSL Layer
Callback Functions
EMAC_getStatistics,
4-3
Need help?
Do you have a question about the TMS320C6000 and is the answer not in the manual?
Questions and answers