![]() |
![]() |
This file contains the type definitions and helper macros for the Enet SoC interface. More...
Functions | |
int32_t | EnetSoc_init (void) |
Initialize SoC layer. More... | |
Enet_Handle | EnetSoc_getEnetHandleByIdx (uint32_t idx) |
Get handle of the Enet driver by its index. More... | |
Enet_Handle | EnetSoc_getEnetHandle (Enet_Type enetType, uint32_t instId) |
Get handle of the Enet driver for a given Ethernet peripheral. More... | |
uint32_t | EnetSoc_getCoreId (void) |
Get core id of caller. More... | |
uint32_t | EnetSoc_getCoreKey (uint32_t coreId) |
Get core key for the given core id. More... | |
bool | EnetSoc_isCoreAllowed (Enet_Type enetType, uint32_t instId, uint32_t coreId) |
Check if core is enable to use an Ethernet peripheral. More... | |
uint32_t | EnetSoc_getEnetNum (void) |
Get number of present Ethernet peripherals. More... | |
uint32_t | EnetSoc_getMacPortMax (Enet_Type enetType, uint32_t instId) |
Get number of MAC ports in a peripheral. More... | |
uint32_t | EnetSoc_getClkFreq (uint32_t clkId) |
Get SoC clock frequency. More... | |
int32_t | EnetSoc_getEFusedMacAddrs (uint8_t *macAddrs, uint32_t *num) |
Get EFused MAC addresses. More... | |
This file contains the type definitions and helper macros for the Enet SoC interface.
uint32_t EnetSoc_getClkFreq | ( | uint32_t | clkId | ) |
Get SoC clock frequency.
Gets the frequency (in Hz) of an SoC clock identified by clkId
.
clkId | Clock id |
uint32_t EnetSoc_getCoreId | ( | void | ) |
Get core id of caller.
Gets id of the core where this function is called from.
uint32_t EnetSoc_getCoreKey | ( | uint32_t | coreId | ) |
Get core key for the given core id.
Gets the core key corresponding to the passed core id.
coreId | Core id |
int32_t EnetSoc_getEFusedMacAddrs | ( | uint8_t * | macAddrs, |
uint32_t * | num | ||
) |
Get EFused MAC addresses.
Get a list of EFused MAC addresses.
macAddrs | MAC address array pointer |
num | Max number of addresses to populate in macAddrs array. It's updated with actual number of addresses filled. |
Enet_Handle EnetSoc_getEnetHandle | ( | Enet_Type | enetType, |
uint32_t | instId | ||
) |
Get handle of the Enet driver for a given Ethernet peripheral.
Gets the handle to the Enet driver corresponding to the Ethernet peripheral identified by its type and instance id.
enetType | Enet Peripheral type |
instId | Instance Id |
Enet_Handle EnetSoc_getEnetHandleByIdx | ( | uint32_t | idx | ) |
Get handle of the Enet driver by its index.
Gets the handle to the Enet driver by its index. The index definition itself it SoC specific and not meaningful outside SoC internal implementation.
This function is mainly used by the Enet top-layer to iterate over all peripherals supported by the SoC. It's used along with EnetSoc_getEnetNum() to query the number of available peripherals.
idx | Ethernet peripheral index |
uint32_t EnetSoc_getEnetNum | ( | void | ) |
Get number of present Ethernet peripherals.
Gets the number of Ethernet peripheral present in this SoC.
uint32_t EnetSoc_getMacPortMax | ( | Enet_Type | enetType, |
uint32_t | instId | ||
) |
Get number of MAC ports in a peripheral.
Gets the number of MAC ports in a peripheral identified by its type and instance id.
int32_t EnetSoc_init | ( | void | ) |
bool EnetSoc_isCoreAllowed | ( | Enet_Type | enetType, |
uint32_t | instId, | ||
uint32_t | coreId | ||
) |
Check if core is enable to use an Ethernet peripheral.
Checks if a given core is allowed to use the Ethernet peripheral identified by its type and instance id.
enetType | Enet Peripheral type |
instId | Instance Id |
coreId | Core id |