1.6.3.1 DRV_G3ADP_MAC_Initialize Function

C

SYS_MODULE_OBJ DRV_G3ADP_MAC_Initialize(const SYS_MODULE_INDEX index, const SYS_MODULE_INIT * const init);

Summary

Initializes the G3 ADP MAC.

Description

This function supports the initialization of the G3 ADP MAC. Used by tcpip_module_manager.

Precondition

None.

Parameters

ParamDescription
indexIndex of the G3 ADP MAC driver to be initialized
initPointer to TCPIP_MAC_INIT initialization data containing: - moduleInit - macControl - moduleData. moduleInit and moduleData are not used in this implementation.

Returns

If successful, returns a valid handle to a module instance object. Otherwise, returns SYS_MODULE_OBJ_INVALID.

Example

    TCPIP_MAC_INIT macInit =
    {
        { 0 }, // SYS_MODULE_INIT not currently used
        &macCtrl,
        macConfig,
    };

    pNetIf->macObjHandle = DRV_G3ADP_MAC_Initialize(pMacObj->macId, &macInit.moduleInit);

    if( pNetIf->macObjHandle == SYS_MODULE_OBJ_INVALID)
    {
        pNetIf->macObjHandle = 0;
        SYS_ERROR_PRINT(SYS_ERROR_ERROR, TCPIP_STACK_HDR_MESSAGE "%s MAC initialization failed\r\n", pMacObj->macName);
        netUpFail = 1;
        break;
    }

Remarks

This routine must be called before any other G3 ADP MAC routine is called.