This file contains the basic types using across the Enet driver.
Go to the source code of this file.
Data Structures | |
struct | Enet_Version |
Version of a peripheral or module. More... | |
struct | Enet_VlanTag |
VLAN tag. More... | |
Macros | |
#define | ENET_ARRAYSIZE(x) (sizeof(x) / sizeof(x[0])) |
Macro to get the size of an array. More... | |
#define | ENET_BIT(n) (1U << (n)) |
Macro to set bit at given bit position. More... | |
#define | ENET_GET_BIT(val, n) (((val) & ENET_BIT(n)) >> (n)) |
Macro to get bit at given bit position. More... | |
#define | ENET_IS_BIT_SET(val, n) (((val) & ENET_BIT(n)) != 0U) |
Macro to check if bit at given bit position is set. More... | |
#define | ENET_NOT_ZERO(val) ((uint32_t)0U != (uint32_t)(val)) |
Macro to check if value is not zero. More... | |
#define | ENET_FEXT(reg, PER_REG_FIELD) (((reg) & PER_REG_FIELD##_MASK) >> PER_REG_FIELD##_SHIFT) |
Field EXTract macro. We can't use CSL macro as it appends shift/mask with CSL_. More... | |
#define | ENET_FINS(reg, PER_REG_FIELD, val) |
Field INSert macro. We can't use CSL macro as it appends shift/mask with CSL_. More... | |
#define | ENET_DIV_ROUNDUP(val, div) (((val) + (div) - 1) / (div)) |
Macro to perform round-up division. More... | |
#define | ENET_VERSION_NONE (0xFFFFFFFFU) |
Version field is not supported. More... | |
#define | ENET_MAC_ADDR_LEN (6U) |
MAC address length in bytes/octets. More... | |
#define | ENET_OUI_ADDR_LEN (3U) |
Organization Unique Id (OUI) address length in bytes/octets. More... | |
#define | ENET_IPv4_ADDR_LEN (4U) |
IPv4 address length in bytes/octets. More... | |
#define | ENET_IPv6_ADDR_LEN (16U) |
IPv6 address length in bytes/octets. More... | |
#define | ENET_PRI_NUM (8U) |
Packet priority. More... | |
#define | ENET_PRI_MIN (0U) |
Lowest packet priority. More... | |
#define | ENET_PRI_MAX (ENET_PRI_NUM - 1U) |
Lowest packet priority. More... | |
#define | ENET_TOS_PRI_NUM (64U) |
Type of Service (ToS) priority. More... | |
#define | ENET_TOS_PRI_MIN (0U) |
Lowest ToS priority. More... | |
#define | ENET_TOS_PRI_MAX (ENET_TOS_PRI_NUM - 1U) |
Highest ToS priority. More... | |
#define | ENET_VLAN_ID_MAX (4095U) |
Maximum value for VLAN ID. More... | |
#define | ENET_ETHERTYPE_PTP (0x88F7U) |
EtherType value for PTP over Ethernet Annex F (IEEE 802.3). More... | |
#define | ENET_TYPE_NUM (ENET_TYPE_COUNT + 1U) |
Number of supported Ethernet peripheral types. More... | |
#define | ENET_MAC_PORT_NUM ((uint32_t)ENET_MAC_PORT_LAST + 1U) |
Number of MAC ports - For internal use only. More... | |
#define | ENET_MACPORT_NORM(n) ((n) - ENET_MAC_PORT_FIRST) |
Normalize Enet_MacPort. More... | |
#define | ENET_MACPORT_DENORM(n) ((Enet_MacPort)((n) + ENET_MAC_PORT_FIRST)) |
De-normalize Enet_MacPort. More... | |
#define | ENET_MACPORT_ID(n) ((n) - ENET_MAC_PORT_FIRST + 1U) |
Convert Enet_MacPort to an integer id. More... | |
#define | ENET_MAC_PORT_INV ((Enet_MacPort)0xFFFFU) |
MAC invalid port number. Used for error checks only. More... | |
#define | ENET_TRAFFIC_CLASS_INV ((uint32_t)0xFFFFU) |
TX traffic class invalid value. Used for error checks only. More... | |
#define | ENET_MACPORT_MASK(n) (ENET_BIT(ENET_MACPORT_NORM(n))) |
Convert Enet_MacPort to a bit mask. More... | |
Enet Error Codes | |
#define | ENET_SOK (CSL_PASS) |
Success. More... | |
#define | ENET_SINPROGRESS (1) |
Operation in progress. More... | |
#define | ENET_EFAIL (CSL_EFAIL) |
Generic failure error condition (typically caused by hardware). More... | |
#define | ENET_EBADARGS (CSL_EBADARGS) |
Bad arguments (i.e. NULL pointer). More... | |
#define | ENET_EINVALIDPARAMS (CSL_EINVALID_PARAMS) |
Invalid parameters (i.e. value out-of-range). More... | |
#define | ENET_ETIMEOUT (CSL_ETIMEOUT) |
Time out while waiting for a given condition to happen. More... | |
#define | ENET_EALLOC (CSL_EALLOC) |
Allocation failure. More... | |
#define | ENET_EUNEXPECTED (CSL_EALLOC - 1) |
Unexpected condition occurred (sometimes unrecoverable). More... | |
#define | ENET_EBUSY (CSL_EALLOC - 2) |
The resource is currently busy performing an operation. More... | |
#define | ENET_EALREADYOPEN (CSL_EALLOC - 3) |
Already open error. More... | |
#define | ENET_EPERM (CSL_EALLOC - 4) |
Operation not permitted. More... | |
#define | ENET_ENOTSUPPORTED (CSL_EALLOC - 5) |
Operation not supported. More... | |
#define | ENET_ENOTFOUND (CSL_EALLOC - 6) |
Resource not found. More... | |
#define | ENET_EUNKNOWNIOCTL (CSL_EALLOC - 7) |
Unknown IOCTL. More... | |
#define | ENET_EMALFORMEDIOCTL (CSL_EALLOC - 8) |
Malformed IOCTL (args pointer or size not as expected). More... | |
Typedefs | |
typedef void(* | Enet_EventCallback) (Enet_Event evt, uint32_t evtNum, void *evtCbArgs, void *arg1, void *arg2) |
Event callback. More... | |
Functions | |
static bool | Enet_isCpswFamily (Enet_Type enetType) |
Check if Ethernet peripheral type is part of CPSW family. More... | |
static bool | Enet_isIcssFamily (Enet_Type enetType) |
Check if Ethernet peripheral type is part of ICSS family. More... | |