![]() |
S32 SDK
|
Go to the source code of this file.
Data Structures | |
struct | enet_buffer_t |
Send/Receive buffer information for the user Implements : enet_buffer_t_Class. More... | |
struct | enet_buffer_config_t |
Defines the ENET buffer descriptors ring configuration structure Implements : enet_buffer_config_t_Class. More... | |
struct | enet_config_t |
Defines the ENET module configuration structure Implements : enet_config_t_Class. More... | |
struct | enet_state_t |
Internal driver state structure Implements : enet_state_t_Class. More... | |
Macros | |
#define | ENET_FRAME_MAX_FRAMELEN 1518U |
Defines the maximum Ethernet frame size. More... | |
#define | ENET_MIN_BUFFERSIZE 64U |
ENET minimum buffer size. More... | |
#define | ENET_BUFF_ALIGN(x) (((uint32_t)(x) + (FEATURE_ENET_BUFF_ALIGNMENT - 1)) & ~(FEATURE_ENET_BUFF_ALIGNMENT - 1)) |
Definitions used for aligning the data buffers. More... | |
#define | ENET_BUFF_IS_ALIGNED(x) (((uint32_t)(x) & ~(FEATURE_ENET_BUFF_ALIGNMENT - 1)) != 0) |
#define | ENET_BUFFDESCR_ALIGN(x) (((uint32_t)(x) + (FEATURE_ENET_BUFFDESCR_ALIGNMENT - 1)) & ~(FEATURE_ENET_BUFFDESCR_ALIGNMENT - 1)) |
Definitions used for aligning the buffer descriptors. More... | |
#define | ENET_BUFFDESCR_IS_ALIGNED(x) (((uint32_t)(x) & ~(FEATURE_ENET_BUFFDESCR_ALIGNMENT - 1)) != 0) |
Typedefs | |
typedef void(* | enet_callback_t) (uint8_t instance, enet_event_t event) |
Callback function invoked when one of the events in "enet_event_t" is encountered Implements : enet_callback_t_Class. More... | |
Functions | |
Initialization and De-initialization | |
void | ENET_DRV_GetDefaultConfig (enet_config_t *config) |
Gets the default configuration structure. More... | |
void | ENET_DRV_Init (uint8_t instance, enet_state_t *state, const enet_config_t *config, const enet_buffer_config_t *bufferConfig, uint8_t *macAddr) |
Initializes the ENET module. More... | |
void | ENET_DRV_Deinit (uint8_t instance) |
Deinitializes the ENET module. More... | |
Transmission and reception operations | |
status_t | ENET_DRV_ReadFrame (uint8_t instance, enet_buffer_t *buff) |
Reads a received Ethernet frame. More... | |
void | ENET_DRV_ProvideRxBuff (uint8_t instance, enet_buffer_t *buff) |
Provides a receive buffer to be used by the driver for reception. More... | |
status_t | ENET_DRV_SendFrame (uint8_t instance, enet_buffer_t *buff) |
Sends an Ethernet frame. More... | |
status_t | ENET_DRV_GetTransmitStatus (uint8_t instance, enet_buffer_t *buff) |
Checks if the transmission of a buffer is complete. More... | |
MDIO configuration and operation | |
void | ENET_DRV_EnableMDIO (uint8_t instance, bool miiPreambleDisabled) |
Enables the MDIO interface. More... | |
status_t | ENET_DRV_MDIORead (uint8_t instance, uint8_t phyAddr, uint8_t phyReg, uint16_t *data, uint32_t timeoutMs) |
Reads the selected register of the PHY. More... | |
status_t | ENET_DRV_MDIOWrite (uint8_t instance, uint8_t phyAddr, uint8_t phyReg, uint16_t data, uint32_t timeoutMs) |
Writes the selected register of the PHY. More... | |
MAC Address configuration | |
void | ENET_DRV_SetMacAddr (uint8_t instance, uint8_t *macAddr) |
Configures the physical address of the MAC. More... | |
void | ENET_DRV_GetMacAddr (uint8_t instance, uint8_t *macAddr) |
Gets the physical address of the MAC. More... | |
void | ENET_DRV_SetUnicastForward (uint8_t instance, uint8_t *macAddr, bool enable) |
Enables/Disables forwarding of unicast traffic having a specific MAC address as destination. More... | |
void | ENET_DRV_SetMulticastForward (uint8_t instance, uint8_t *macAddr, bool enable) |
Enables/Disables forwarding of multicast traffic having a specific MAC address as destination. More... | |
void | ENET_DRV_SetMulticastForwardAll (uint8_t instance, bool enable) |
Enables/Disables forwarding of the multicast traffic, irrespective of the destination MAC address. More... | |
Other basic operations | |
void | ENET_DRV_SetSleepMode (uint8_t instance, bool enable) |
Sets the MAC in sleep mode or normal mode. More... | |
void | ENET_DRV_ConfigCounters (uint8_t instance, bool enable) |
Enables/Disables the MIB counters. More... | |
uint32_t | ENET_DRV_GetCounter (uint8_t instance, enet_counter_t counter) |
Gets statistics from the specified counter. More... | |