TI-RTOS Drivers  tidrivers_tivac_2_16_00_08
Data Structures | Macros | Typedefs | Functions
EMAC.h File Reference

Detailed Description

EMAC driver interface.

============================================================================

The EMAC header file should be included in an application as follows:

Implementation

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:

Instrumentation

The EMAC driver interface produces log statements if instrumentation is enabled.

Diagnostics Mask Log details
Diags_USER1 basic operations
Diags_USER2 detailed operations

#include <stdint.h>
#include <stdbool.h>
Include dependency graph for EMAC.h:
This graph shows which files directly or indirectly include this file:

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 Documentation

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.

See also
EMAC_init()

Function Documentation

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.

Precondition
The EMAC_config structure must exist and be persistent before this function can be called. This function must also be called before any other EMAC driver APIs. This function call does not modify any peripheral registers.
bool EMAC_isLinkUp ( unsigned int  index)

This function returns if the link is up.

Returns
true is the link is up. false if it is down.
Copyright 2016, Texas Instruments Incorporated