3.3.1
HwPktInit — Initialize Packet Driver Environment
Syntax
Parameters
Return Value
Description
3.3.2
HwPktOpen — Open Ethernet Device Instance
Syntax
Parameters
Return Value
Description
3.3.3
HwPktClose — Close Ethernet Device and Disable Interrupts
Syntax
Parameters
Return Value
Description
uint HwPktInit();
None
The number of Ethernet devices initialized. 0 indicates an error. All other
positive values are considered success.
This function is called to initialize the mini-driver environment and
enumerate the number of devices in the system. A device instance may
be opened for each device represented in the return count. If the function
returns zero, no devices are supported.
uint HwPktOpen (PDINFO *pi);
pi - Pointer to Ethernet device instance structure.
Returns 0 on success and a positive value to indicate an error.
This function is called to open a packet device instance. When
HwPktOpen is called, the PDINFO structure is assumed to be valid. This
function sets up the EMAC configuration and invokes the CSL layer's
EMAC_open function to configure the EMAC peripheral. As part of the
configuration passed to EMAC_open, the driver sets up the required
callback functions that the CSL layer in turn invokes to allocate/free
packet buffers, update statistics or status, and to hand over received
packets.
This function is also responsible for setting up the interrupts and any
other PHY related configuration to ready it for Tx/Rx operations.
void HwPktClose (PDINFO *pi);
pi - Pointer to Ethernet device instance structure.
None.
This function is called to close a packet device instance. When called,
this function invokes the CSL layer EMAC_close function to disable
EMAC Tx/Rx operations and free up any enqueued packets. This
function also disables the EMAC interrupts.
Ethernet Mini-Driver APIs
Ethernet Mini-Driver Layer
3-5
Need help?
Do you have a question about the TMS320C6000 and is the answer not in the manual?
Questions and answers