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

This file contains the type definitions and helper macros for the "null" peripheral 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_per.h>
#include <ti/drv/enet/include/mod/mod_null.h>

Data Structures

struct  NullPer_Cfg_s
 Null Peripheral configuration parameters. More...
 
struct  NullPer_Obj_s
 Null Peripheral object. More...
 

Macros

#define ENET_NULLPER_FEAT1   (ENET_BIT(0U))
 
#define ENET_NULLPER_FEAT2   (ENET_BIT(1U))
 
#define ENET_NULLPER_ERRATA1   (ENET_BIT(0U))
 
#define ENET_NULLPER_CLK_MCLK   (1U)
 

Typedefs

typedef struct NullPer_Cfg_s NullPer_Cfg
 Null Peripheral configuration parameters.
 
typedef struct NullPer_Obj_s NullPer_Obj
 Null Peripheral object.
 
typedef struct NullPer_Obj_sNullPer_Handle
 Null Periperhal handle.
 

Functions

void NullPer_initCfg (EnetPer_Handle hPer, Enet_Type enetType, void *cfg)
 Initialize Null peripheral's configuration parameters. More...
 
int32_t NullPer_open (EnetPer_Handle hPer, Enet_Type enetType, const void *cfg)
 Open and initialize the Null Peripheral. More...
 
int32_t NullPer_rejoin (EnetPer_Handle hPer, Enet_Type enetType)
 Rejoin the Null Peripheral. More...
 
int32_t NullPer_ioctl (EnetPer_Handle hPer, uint32_t cmd, Enet_IoctlPrms *prms)
 Issue an operation on the Null Peripheral. More...
 
void NullPer_poll (EnetPer_Handle hPer, uint32_t evtMask)
 Poll for Ethernet events on the Null Peripheral. More...
 
void NullPer_periodicTick (EnetPer_Handle hPer)
 Run periodic tick on the Null Peripheral. More...
 
void NullPer_close (EnetPer_Handle hPer)
 Close the Null Peripheral. More...
 

Detailed Description

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

Macro Definition Documentation

#define ENET_NULLPER_CLK_MCLK   (1U)

Null peripheral MCLK id

#define ENET_NULLPER_ERRATA1   (ENET_BIT(0U))

Null peripheral dummy errata 1

#define ENET_NULLPER_FEAT1   (ENET_BIT(0U))

Null peripheral dummy feature 1

#define ENET_NULLPER_FEAT2   (ENET_BIT(1U))

Null peripheral dummy feature 2

Function Documentation

void NullPer_close ( EnetPer_Handle  hPer)

Close the Null Peripheral.

Closes the Null Peripheral.

Parameters
hPerEnet Peripheral handle
void NullPer_initCfg ( EnetPer_Handle  hPer,
Enet_Type  enetType,
void *  cfg 
)

Initialize Null peripheral's configuration parameters.

Initializes the configuration parameters for a Null periperhal.

Parameters
hPerEnet Peripheral handle
enetTypeEnet Peripheral type
cfgConfiguration parameters to be initialized
int32_t NullPer_ioctl ( EnetPer_Handle  hPer,
uint32_t  cmd,
Enet_IoctlPrms prms 
)

Issue an operation on the Null Peripheral.

Issues a control operation on the Null Peripheral.

Parameters
hPerEnet Peripheral handle
cmdIOCTL command Id
prmsIOCTL parameters
Returns
Enet_ErrorCodes
int32_t NullPer_open ( EnetPer_Handle  hPer,
Enet_Type  enetType,
const void *  cfg 
)

Open and initialize the Null Peripheral.

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

Parameters
hPerEnet Peripheral handle
enetTypeEnet Peripheral type
cfgConfiguration parameters
Returns
Enet_ErrorCodes
void NullPer_periodicTick ( EnetPer_Handle  hPer)

Run periodic tick on the Null Peripheral.

Run PHY periodic tick on the Ethernet peripheral.

Parameters
hPerEnet Peripheral handle
void NullPer_poll ( EnetPer_Handle  hPer,
uint32_t  evtMask 
)

Poll for Ethernet events on the Null Peripheral.

Unblocking poll for the events specified in evtMask.

Parameters
hPerEnet Peripheral handle
evtMaskEvent bit mask
int32_t NullPer_rejoin ( EnetPer_Handle  hPer,
Enet_Type  enetType 
)

Rejoin the Null Peripheral.

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

Parameters
hPerEnet Peripheral handle
enetTypeEnet Peripheral type
Returns
Enet_ErrorCodes

Copyright 2020, Texas Instruments Incorporated