1.2.5.2.22 TCPIP_MAC_Initialize Function
C
SYS_MODULE_OBJ TCPIP_MAC_Initialize(
const SYS_MODULE_INDEX index,
const SYS_MODULE_INIT * const init
);
Description
MAC Initialize function. SYS_MODULE_OBJ TCPIP_MAC_Initialize(const SYS_MODULE_INDEX index, const SYS_MODULE_INIT * const init);
This is the function that initializes the MAC. It is called by the stack as a result of one interface going up.
Precondtions
None.
Parameters
Parameters | Description |
---|---|
index | Index for the MAC driver instance to be initialized. |
init | Pointer to TCPIP_MAC_INIT initialization data containing: - macControl - Stack prepared data. - moduleData - Driver specific. Dependent on the MAC type. For PIC32 MAC driver, the TCPIP_MODULE_MAC_PIC32INT_CONFIG is used. |
Returns
A valid handle to a driver object - If successful.
SYS_MODULE_OBJ_INVALID - If initialization failed.
Remarks
If this function fails, the stack won't turn up that interface. If the operation needs to wait for the hardware, the initialization function can return a pending code.
The returned object must be passed as argument to TCPIP_MAC_Reinitialize(), TCPIP_MAC_Deinitialize(), TCPIP_MAC_Tasks() and TCPIP_MAC_Status routines().