![]() |
![]() |
This file contains the type definitions and helper macros for the Enet Module interface. More...
#include <stdint.h>
#include <ti/drv/enet/include/core/enet_types.h>
#include <ti/drv/enet/include/core/enet_ioctl.h>
Data Structures | |
struct | EnetMod_Obj_s |
Ethernet Module object. More... | |
Macros | |
#define | ENET_MOD_CFG_MAGIC (0xBBBBBBBBU) |
Enet Module configuration magic vlaue. | |
#define | ENET_MOD(mod) ((EnetMod_Handle)mod) |
Convert module specific handle to EnetMod generic handle. | |
Typedefs | |
typedef struct EnetMod_Obj_s * | EnetMod_Handle |
Ethernet Module handle. More... | |
typedef void(* | EnetMod_InitCfg )(EnetMod_Handle hMod, Enet_Type enetType, void *cfg) |
Initialize module's configuration parameters. More... | |
typedef int32_t(* | EnetMod_Open )(EnetMod_Handle hMod, Enet_Type enetType, const void *cfg) |
Open and initialize the Enet Module. More... | |
typedef int32_t(* | EnetMod_Rejoin )(EnetMod_Handle hMod, Enet_Type enetType) |
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... | |
typedef struct EnetMod_Obj_s | EnetMod_Obj |
Ethernet Module object. | |
Functions | |
static void | EnetMod_initCfg (EnetMod_Handle hMod, Enet_Type enetType, void *cfg) |
Wrapper to initialize module's configuration parameters. More... | |
static int32_t | EnetMod_open (EnetMod_Handle hMod, Enet_Type enetType, const void *cfg) |
Wrapper to open and initialize an Enet Module. More... | |
static int32_t | EnetMod_rejoin (EnetMod_Handle hMod, Enet_Type enetType) |
Wrapper to rejoin an Enet Module. More... | |
static int32_t | EnetMod_ioctl (EnetMod_Handle hMod, uint32_t cmd, Enet_IoctlPrms *prms) |
Wrapper function to issue an operation on an Enet Module. More... | |
static void | EnetMod_close (EnetMod_Handle hMod) |
Wrapper function to close an Enet Module. More... | |
This file contains the type definitions and helper macros for the Enet Module interface.
typedef void(* EnetMod_Close)(EnetMod_Handle hMod) |
Close the Enet Module.
Closes the Enet Module.
hEnet | Enet Module opaque handle |
typedef struct EnetMod_Obj_s* EnetMod_Handle |
Ethernet Module handle.
Ethernet Module handle used to call any EnetMod related APIs.
typedef void(* EnetMod_InitCfg)(EnetMod_Handle hMod, Enet_Type enetType, void *cfg) |
Initialize module's configuration parameters.
Initializes the configuration parameter of the Enet module.
hMod | Enet Module handle |
enetType | Enet Peripheral type |
cfg | Configuration parameters to be initialized |
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.
hEnet | Enet Module opaque handle |
cmd | IOCTL command Id |
prms | IOCTL parameters |
typedef int32_t(* EnetMod_Open)(EnetMod_Handle hMod, Enet_Type enetType, const void *cfg) |
Open and initialize the Enet Module.
Opens and initializes the Enet Module with the configuration parameters provided by the caller.
hMod | Enet Module handle |
enetType | Enet Peripheral type |
cfg | Configuration parameters |
typedef int32_t(* EnetMod_Rejoin)(EnetMod_Handle hMod, Enet_Type enetType) |
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.
hMod | Enet Module opaque handle |
enetType | Enet Peripheral type |
|
inlinestatic |
Wrapper function to close an Enet Module.
hMod | Enet Module handle |
|
inlinestatic |
Wrapper to initialize module's configuration parameters.
hMod | Enet Module handle |
enetType | Enet Peripheral type |
cfg | Configuration parameters to be initialized |
|
inlinestatic |
Wrapper function to issue an operation on an Enet Module.
hMod | Enet Module handle |
cmd | IOCTL command Id |
prms | IOCTL parameters |
|
inlinestatic |
Wrapper to open and initialize an Enet Module.
hMod | Enet Module handle |
enetType | Enet Peripheral type |
cfg | Configuration parameters |
|
inlinestatic |
Wrapper to rejoin an Enet Module.
hMod | Enet Module handle |
enetType | Enet Peripheral type |