AM64x MCU+ SDK  08.02.00
enet_mod.h File Reference

Introduction

This file contains the type definitions and helper macros for the Enet Module interface.

Go to the source code of this file.

Data Structures

struct  EnetMod_Obj
 Ethernet Module object. More...
 

Macros

#define ENET_MOD(mod)   ((EnetMod_Handle)mod)
 Convert module specific handle to EnetMod generic handle. More...
 

Typedefs

typedef struct EnetMod_Obj_s * EnetMod_Handle
 Ethernet Module handle. More...
 
typedef int32_t(* EnetMod_Open) (EnetMod_Handle hMod, Enet_Type enetType, uint32_t instId, const void *cfg, uint32_t cfgSize)
 Open and initialize the Enet Module. More...
 
typedef int32_t(* EnetMod_Rejoin) (EnetMod_Handle hMod, Enet_Type enetType, uint32_t instId)
 Rejoin the Enet Module. More...
 
typedef int32_t(* EnetMod_Ioctl) (EnetMod_Handle hMod, uint32_t cmd, Enet_IoctlPrms *prms)
 Issue an operation on the Enet Module. More...
 
typedef void(* EnetMod_Close) (EnetMod_Handle hMod)
 Close the Enet Module. More...
 

Functions

int32_t EnetMod_open (EnetMod_Handle hMod, Enet_Type enetType, uint32_t instId, const void *cfg, uint32_t cfgSize)
 Wrapper to open and initialize an Enet Module. More...
 
int32_t EnetMod_rejoin (EnetMod_Handle hMod, Enet_Type enetType, uint32_t instId)
 Wrapper to rejoin an Enet Module. More...
 
int32_t EnetMod_ioctl (EnetMod_Handle hMod, uint32_t cmd, Enet_IoctlPrms *prms)
 Wrapper function to issue an operation on an Enet Module. More...
 
int32_t EnetMod_ioctlFromIsr (EnetMod_Handle hMod, uint32_t cmd, Enet_IoctlPrms *prms)
 Wrapper function to issue an operation on an Enet Module from ISR context. More...
 
void EnetMod_close (EnetMod_Handle hMod)
 Wrapper function to close an Enet Module. More...
 
static bool EnetMod_isOpen (EnetMod_Handle hMod)
 Check if Enet Module is open or not. More...
 

Macro Definition Documentation

◆ ENET_MOD

#define ENET_MOD (   mod)    ((EnetMod_Handle)mod)

Convert module specific handle to EnetMod generic handle.

Typedef Documentation

◆ EnetMod_Handle

typedef struct EnetMod_Obj_s* EnetMod_Handle

Ethernet Module handle.

Ethernet Module handle used to call any EnetMod related APIs.

◆ EnetMod_Open

typedef int32_t(* EnetMod_Open) (EnetMod_Handle hMod, Enet_Type enetType, uint32_t instId, const void *cfg, uint32_t cfgSize)

Open and initialize the Enet Module.

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

Parameters
hModEnet Module handle
enetTypeEnet Peripheral type
instIdEnet Peripheral instance id
cfgConfiguration parameters
cfgSizeSize of the configuration parameters
Returns
Enet_ErrorCodes

◆ EnetMod_Rejoin

typedef int32_t(* EnetMod_Rejoin) (EnetMod_Handle hMod, Enet_Type enetType, uint32_t instId)

Rejoin the Enet Module.

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

Parameters
hModEnet Module opaque handle
enetTypeEnet Peripheral type
instIdEnet Peripheral instance id
Returns
Enet_ErrorCodes

◆ EnetMod_Ioctl

typedef int32_t(* EnetMod_Ioctl) (EnetMod_Handle hMod, uint32_t cmd, Enet_IoctlPrms *prms)

Issue an operation on the Enet Module.

Issues a control operation on the Enet Module.

Parameters
hModEnet Module opaque handle
cmdIOCTL command Id
prmsIOCTL parameters
Returns
Enet_ErrorCodes

◆ EnetMod_Close

typedef void(* EnetMod_Close) (EnetMod_Handle hMod)

Close the Enet Module.

Closes the Enet Module.

Parameters
hModEnet Module opaque handle

Function Documentation

◆ EnetMod_open()

int32_t EnetMod_open ( EnetMod_Handle  hMod,
Enet_Type  enetType,
uint32_t  instId,
const void *  cfg,
uint32_t  cfgSize 
)

Wrapper to open and initialize an Enet Module.

Parameters
hModEnet Module handle
enetTypeEnet Peripheral type
instIdEnet Peripheral instance id
cfgConfiguration parameters
cfgSizeSize of the configuration parameters
Returns
Enet_ErrorCodes

◆ EnetMod_rejoin()

int32_t EnetMod_rejoin ( EnetMod_Handle  hMod,
Enet_Type  enetType,
uint32_t  instId 
)

Wrapper to rejoin an Enet Module.

Parameters
hModEnet Module handle
enetTypeEnet Peripheral type
instIdEnet Peripheral instance id
Returns
Enet_ErrorCodes

◆ EnetMod_ioctl()

int32_t EnetMod_ioctl ( EnetMod_Handle  hMod,
uint32_t  cmd,
Enet_IoctlPrms prms 
)

Wrapper function to issue an operation on an Enet Module.

Parameters
hModEnet Module handle
cmdIOCTL command Id
prmsIOCTL parameters
Returns
Enet_ErrorCodes

◆ EnetMod_ioctlFromIsr()

int32_t EnetMod_ioctlFromIsr ( EnetMod_Handle  hMod,
uint32_t  cmd,
Enet_IoctlPrms prms 
)

Wrapper function to issue an operation on an Enet Module from ISR context.

Parameters
hModEnet Module handle
cmdIOCTL command Id
prmsIOCTL parameters
Returns
Enet_ErrorCodes

◆ EnetMod_close()

void EnetMod_close ( EnetMod_Handle  hMod)

Wrapper function to close an Enet Module.

Parameters
hModEnet Module handle

◆ EnetMod_isOpen()

static bool EnetMod_isOpen ( EnetMod_Handle  hMod)
inlinestatic

Check if Enet Module is open or not.

Parameters
hModEnet Module handle
Returns
Module's open status.