![]() |
![]() |
This file contains the basic types using across the Enet driver. More...
#include <stdint.h>
#include <ti/csl/csl_types.h>
Data Structures | |
struct | Enet_Version_s |
Version of a peripheral or module. More... | |
struct | Enet_VlanTag_s |
VLAN tag. More... | |
Macros | |
#define | ENET_ARRAYSIZE(x) (sizeof(x) / sizeof(x[0])) |
Macro to get the size of an array. | |
#define | ENET_BIT(n) (1U << (n)) |
Macro to set bit at given bit position. | |
#define | ENET_GET_BIT(val, n) (((val) & ENET_BIT(n)) >> (n)) |
Macro to get bit at given bit position. | |
#define | ENET_IS_BIT_SET(val, n) (((val) & ENET_BIT(n)) != 0U) |
Macro to check if bit at given bit position is set. | |
#define | ENET_VERSION_NONE (0xFFFFFFFFU) |
Version field is not supported. | |
#define | ENET_MAC_ADDR_LEN (6U) |
MAC address length in bytes/octets. | |
#define | ENET_OUI_ADDR_LEN (3U) |
Organization Unique Id (OUI) address length in bytes/octets. | |
#define | ENET_IPv4_ADDR_LEN (4U) |
IPv4 address length in bytes/octets. | |
#define | ENET_IPv6_ADDR_LEN (16U) |
IPv6 address length in bytes/octets. | |
#define | ENET_PRIORITY_NUM (8U) |
Packet priority. | |
#define | ENET_PRIORITY_MIN (0U) |
Lowest packet priority. | |
#define | ENET_PRIORITY_MAX (ENET_PRIORITY_NUM - 1U) |
Lowest packet priority. | |
#define | ENET_TOS_PRIORITY_NUM (64U) |
Type of Service (ToS) priority. | |
#define | ENET_TOS_PRIORITY_MIN (0U) |
Lowest ToS priority. | |
#define | ENET_TOS_PRIORITY_MAX (ENET_TOS_PRIORITY_NUM - 1U) |
Highest ToS priority. | |
#define | ENET_TYPE_NUM (ENET_TYPE_COUNT + 1U) |
Number of supported Ethernet peripheral types. | |
#define | ENET_MAC_PORT_NUM (ENET_MAC_PORT_COUNT) |
Number of MAC ports. | |
#define | ENET_NORM_MACPORT(n) ((n) - ENET_MAC_PORT_FIRST) |
Normalize Enet_MacPort. More... | |
#define | ENET_DENORM_MACPORT(n) ((Enet_MacPort)((n) + ENET_MAC_PORT_FIRST) |
De-normalize Enet_MacPort. More... | |
#define | ENET_MAC_PORT_INV ((Enet_MacPort)0xFFFFU) |
MAC invalid port number. Used for error checks only. | |
Enet Error Codes | |
#define | ENET_SOK (CSL_PASS) |
Success. | |
#define | ENET_SINPROGRESS (1) |
Operation in progress. | |
#define | ENET_EFAIL (CSL_EFAIL) |
Generic failure error condition (typically caused by hardware). | |
#define | ENET_EBADARGS (CSL_EBADARGS) |
Bad arguments (i.e. NULL pointer). | |
#define | ENET_EINVALIDPARAMS (CSL_EINVALID_PARAMS) |
Invalid parameters (i.e. value out-of-range). | |
#define | ENET_ETIMEOUT (CSL_ETIMEOUT) |
Time out while waiting for a given condition to happen. | |
#define | ENET_EALLOC (CSL_EALLOC) |
Allocation failure. | |
#define | ENET_EUNEXPECTED (CSL_EALLOC - 1) |
Unexpected condition occurred (sometimes unrecoverable). | |
#define | ENET_EBUSY (CSL_EALLOC - 2) |
The resource is currently busy performing an operation. | |
#define | ENET_EALREADYOPEN (CSL_EALLOC - 3) |
Already open error. | |
#define | ENET_EPERM (CSL_EALLOC - 4) |
Operation not permitted. | |
#define | ENET_ENOTSUPPORTED (CSL_EALLOC - 5) |
Operation not supported. | |
#define | ENET_ENOTFOUND (CSL_EALLOC - 6) |
Resource not found. | |
#define | ENET_EUNKNOWNIOCTL (CSL_EALLOC - 7) |
Unknown IOCTL. | |
#define | ENET_EMALFORMEDIOCTL (CSL_EALLOC - 8) |
Malformed IOCTL (args pointer or size not as expected). | |
Typedefs | |
typedef enum Enet_Type_e | Enet_Type |
Ethernet peripheral type. | |
typedef enum Enet_Event_e | Enet_Event |
Ethernet events. More... | |
typedef struct Enet_Version_s | Enet_Version |
Version of a peripheral or module. More... | |
typedef enum Enet_Speed_e | Enet_Speed |
MAC interface speed. | |
typedef enum Enet_Duplexity_e | Enet_Duplexity |
MAC interface duplexity. | |
typedef enum Enet_VlanTagType_e | Enet_VlanTagType |
Double tagging VLAN type. | |
typedef struct Enet_VlanTag_s | Enet_VlanTag |
VLAN tag. | |
typedef enum Enet_MacPort_e | Enet_MacPort |
MAC port. | |
This file contains the basic types using across the Enet driver.