Data Structures | Macros | Typedefs | Functions
mod_null.h File Reference

This file contains the type definitions and helper macros for the "null" Ethernet Module interface. More...

#include <stdint.h>
#include <ti/drv/enet/include/core/enet_types.h>
#include <ti/drv/enet/include/core/enet_mod.h>
#include <ti/drv/enet/include/core/enet_trace.h>

Data Structures

struct  NullMod_Cfg_s
 Null Module configuration parameters. More...
 
struct  NullMod_Obj_s
 Null Module object. More...
 

Macros

#define ENET_NULLMOD_FEAT1   (ENET_BIT(0U))
 
#define ENET_NULLMOD_ERRATA1   (ENET_BIT(0U))
 
#define ENET_NULLMOD_ERRATA2   (ENET_BIT(1U))
 

Typedefs

typedef struct NullMod_Cfg_s NullMod_Cfg
 Null Module configuration parameters.
 
typedef struct NullMod_Obj_s NullMod_Obj
 Null Module object.
 
typedef struct NullMod_Obj_sNullMod_Handle
 Null Module handle.
 

Functions

void NullMod_initCfg (EnetMod_Handle hMod, Enet_Type enetType, void *cfg)
 Initialize Null module's configuration parameters. More...
 
int32_t NullMod_open (EnetMod_Handle hMod, Enet_Type enetType, const void *cfg)
 Open and initialize the Null Module. More...
 
int32_t NullMod_rejoin (EnetMod_Handle hMod, Enet_Type enetType)
 Rejoin the Null Module. More...
 
int32_t NullMod_ioctl (EnetMod_Handle hMod, uint32_t cmd, Enet_IoctlPrms *prms)
 Issue an operation on the Null Module. More...
 
void NullMod_close (EnetMod_Handle hMod)
 Close the Null Module. More...
 

Detailed Description

This file contains the type definitions and helper macros for the "null" Ethernet Module interface.

Macro Definition Documentation

#define ENET_NULLMOD_ERRATA1   (ENET_BIT(0U))

Null module dummy errata 1

#define ENET_NULLMOD_ERRATA2   (ENET_BIT(1U))

Null module dummy errata 2

#define ENET_NULLMOD_FEAT1   (ENET_BIT(0U))

Null module dummy feature 1

Function Documentation

void NullMod_close ( EnetMod_Handle  hMod)

Close the Null Module.

Closes the Null Module.

Parameters
hModEnet Module handle
void NullMod_initCfg ( EnetMod_Handle  hMod,
Enet_Type  enetType,
void *  cfg 
)

Initialize Null module's configuration parameters.

Initializes the configuration parameters for a Null module.

Parameters
hModEnet Module handle
enetTypeEnet Peripheral type
cfgConfiguration parameters to be initialized
int32_t NullMod_ioctl ( EnetMod_Handle  hMod,
uint32_t  cmd,
Enet_IoctlPrms prms 
)

Issue an operation on the Null Module.

Issues a control operation on the Null Module.

Parameters
hModEnet Module handle
cmdIOCTL command Id
prmsIOCTL parameters
Returns
Enet_ErrorCodes
int32_t NullMod_open ( EnetMod_Handle  hMod,
Enet_Type  enetType,
const void *  cfg 
)

Open and initialize the Null Module.

Opens and initializes the Null Module with the configuration parameters provided by the caller.

Parameters
hModEnet Module handle
enetTypeEnet Peripheral type
cfgConfiguration parameters
Returns
Enet_ErrorCodes
int32_t NullMod_rejoin ( EnetMod_Handle  hMod,
Enet_Type  enetType 
)

Rejoin the Null Module.

Reopens the Null Module, but doesn't perform any hardware initialization. This function is expected to be called to attach to a running module.

Parameters
hModEnet Module handle
enetTypeEnet Peripheral type
Returns
Enet_ErrorCodes

Copyright 2020, Texas Instruments Incorporated