![]() |
![]() |
EMAC driver interface.
============================================================================
The EMAC header file should be included in an application as follows:
The EMAC driver interface module is joined (at link time) to a NULL-terminated array of EMAC_Config data structures named EMAC_config. EMAC_config is implemented in the application with each entry being an instance of a EMAC peripheral. Each entry in EMAC_config contains a:
The EMAC driver interface produces log statements if instrumentation is enabled.
| Diagnostics Mask | Log details |
|---|---|
| Diags_USER1 | basic operations |
| Diags_USER2 | detailed operations |
#include <stdbool.h>#include <stdint.h>Go to the source code of this file.
Data Structures | |
| struct | EMAC_FxnTable |
| EMAC Function table structure. More... | |
| struct | EMAC_Config |
| EMAC Global configuration. More... | |
Macros | |
| #define | EMAC_CMD_RESERVED 32 |
| #define | EMAC_STATUS_RESERVED -32 |
| #define | EMAC_STATUS_SUCCESS 0 |
| Successful status code returned by EMAC_control(). More... | |
| #define | EMAC_STATUS_ERROR -1 |
| Generic error status code returned by EMAC_control(). More... | |
| #define | EMAC_STATUS_UNDEFINEDCMD -2 |
| An error status code returned by EMAC_control() for undefined command codes. More... | |
Typedefs | |
| typedef void(* | EMAC_InitFxn) (uint32_t) |
| typedef bool(* | EMAC_isLinkUpFxn) (uint32_t) |
| typedef struct EMAC_FxnTable | EMAC_FxnTable |
| EMAC Function table structure. More... | |
| typedef struct EMAC_Config | EMAC_Config |
| EMAC Global configuration. More... | |
Functions | |
| void | EMAC_init (void) |
| This function initializes the EMAC driver. More... | |
| bool | EMAC_isLinkUp (unsigned int index) |
| This function returns if the link is up. More... | |
| typedef void(* EMAC_InitFxn) (uint32_t) |
| typedef bool(* EMAC_isLinkUpFxn) (uint32_t) |
| typedef struct EMAC_FxnTable EMAC_FxnTable |
EMAC Function table structure.
| typedef struct EMAC_Config EMAC_Config |
EMAC Global configuration.
The EMAC_Config structure contains a set of pointers used to characterize the EMAC driver implementation.
This structure needs to be defined before calling EMAC_init() and it must not be changed thereafter.
| void EMAC_init | ( | void | ) |
This function initializes the EMAC driver.
This function must be called by the application before the NDK stack thread is started.
| bool EMAC_isLinkUp | ( | unsigned int | index | ) |
This function returns if the link is up.