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(*const | 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(*const | EnetMod_Rejoin) (EnetMod_Handle hMod, Enet_Type enetType, uint32_t instId) |
Rejoin the Enet Module. More... | |
typedef int32_t(*const | EnetMod_Ioctl) (EnetMod_Handle hMod, uint32_t cmd, Enet_IoctlPrms *prms) |
Issue an operation on the Enet Module. More... | |
typedef void(*const | EnetMod_Close) (EnetMod_Handle hMod) |
Close the Enet Module. More... | |
typedef void(*const | EnetMod_SaveCtxt) (EnetMod_Handle hMod) |
Saves and closes the Enet Module context before resetting. More... | |
typedef int32_t(*const | EnetMod_RestoreCtxt) (EnetMod_Handle hMod, Enet_Type enetType, uint32_t instId, const void *cfg, uint32_t cfgSize) |
Restores and opens the Enet Module after reset. 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_registerMacportIoctlHandler (EnetMod_Handle hMod, uint32_t cmdBase, uint32_t cmd, Enet_IoctlPrms *prms) |
Wrapper function to register IOCTL for Macport Module. This function is defined for the cases when ONLY second macport module is opened without opening the first Macport 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... | |
void | EnetMod_saveCtxt (EnetMod_Handle hMod) |
Wrapper function to save and close Enet Module. More... | |
int32_t | EnetMod_restoreCtxt (EnetMod_Handle hMod, Enet_Type enetType, uint32_t instId, const void *cfg, uint32_t cfgSize) |
Wrapper to retore and open Enet Module. More... | |
static bool | EnetMod_isOpen (EnetMod_Handle hMod) |
Check if Enet Module is open or not. More... | |
#define ENET_MOD | ( | mod | ) | ((EnetMod_Handle)mod) |
Convert module specific handle to EnetMod generic handle.
typedef struct EnetMod_Obj_s* EnetMod_Handle |
Ethernet Module handle.
Ethernet Module handle used to call any EnetMod related APIs.
typedef int32_t(*const 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.
hMod | Enet Module handle |
enetType | Enet Peripheral type |
instId | Enet Peripheral instance id |
cfg | Configuration parameters |
cfgSize | Size of the configuration parameters |
typedef int32_t(* const 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.
hMod | Enet Module opaque handle |
enetType | Enet Peripheral type |
instId | Enet Peripheral instance id |
typedef int32_t(* const 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.
hMod | Enet Module opaque handle |
cmd | IOCTL command Id |
prms | IOCTL parameters |
typedef void(* const EnetMod_Close) (EnetMod_Handle hMod) |
Close the Enet Module.
Closes the Enet Module.
hMod | Enet Module opaque handle |
typedef void(* const EnetMod_SaveCtxt) (EnetMod_Handle hMod) |
Saves and closes the Enet Module context before resetting.
Saves the Enet Module.
hMod | Enet Module opaque handle |
typedef int32_t(* const EnetMod_RestoreCtxt) (EnetMod_Handle hMod, Enet_Type enetType, uint32_t instId, const void *cfg, uint32_t cfgSize) |
Restores and opens the Enet Module after reset.
Restores and opens the Enet Module with the configuration parameters provided by the caller.
hMod | Enet Module handle |
enetType | Enet Peripheral type |
instId | Enet Peripheral instance id |
cfg | Configuration parameters |
cfgSize | Size of the configuration parameters |
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.
hMod | Enet Module handle |
enetType | Enet Peripheral type |
instId | Enet Peripheral instance id |
cfg | Configuration parameters |
cfgSize | Size of the configuration parameters |
int32_t EnetMod_rejoin | ( | EnetMod_Handle | hMod, |
Enet_Type | enetType, | ||
uint32_t | instId | ||
) |
Wrapper to rejoin an Enet Module.
hMod | Enet Module handle |
enetType | Enet Peripheral type |
instId | Enet Peripheral instance id |
int32_t EnetMod_ioctl | ( | EnetMod_Handle | hMod, |
uint32_t | cmd, | ||
Enet_IoctlPrms * | prms | ||
) |
Wrapper function to issue an operation on an Enet Module.
hMod | Enet Module handle |
cmd | IOCTL command Id |
prms | IOCTL parameters |
int32_t EnetMod_registerMacportIoctlHandler | ( | EnetMod_Handle | hMod, |
uint32_t | cmdBase, | ||
uint32_t | cmd, | ||
Enet_IoctlPrms * | prms | ||
) |
Wrapper function to register IOCTL for Macport Module. This function is defined for the cases when ONLY second macport module is opened without opening the first Macport module.
hMod | Enet Module handle |
cmdBase | IOCTL command Base |
cmd | IOCTL command Id |
prms | IOCTL parameters |
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.
hMod | Enet Module handle |
cmd | IOCTL command Id |
prms | IOCTL parameters |
void EnetMod_close | ( | EnetMod_Handle | hMod | ) |
Wrapper function to close an Enet Module.
hMod | Enet Module handle |
void EnetMod_saveCtxt | ( | EnetMod_Handle | hMod | ) |
Wrapper function to save and close Enet Module.
hMod | Enet Module handle |
int32_t EnetMod_restoreCtxt | ( | EnetMod_Handle | hMod, |
Enet_Type | enetType, | ||
uint32_t | instId, | ||
const void * | cfg, | ||
uint32_t | cfgSize | ||
) |
Wrapper to retore and open Enet Module.
hMod | Enet Module handle |
enetType | Enet Peripheral type |
instId | Enet Peripheral instance id |
cfg | Configuration parameters |
cfgSize | Size of the configuration parameters |
|
inlinestatic |
Check if Enet Module is open or not.
hMod | Enet Module handle |