1.6.3.3 DRV_G3ADP_MAC_Status Function

C

SYS_STATUS DRV_G3ADP_MAC_Status ( SYS_MODULE_OBJ object );

Summary

Provides the current status of the G3 ADP MAC driver.

Description

This function provides the current status of the G3 ADP MAC driver module.

Precondition

The DRV_G3ADP_MAC_Initialize function must have been called before calling this function.

Parameters

ParamDescription
objectDriver object handle, returned from DRV_G3ADP_MAC_Initialize

Returns

  • SYS_STATUS_READY - Indicates that any previous module operation for the specified module has completed

  • SYS_STATUS_BUSY - Indicates that a previous module operation for the specified module has not yet completed

  • SYS_STATUS_ERROR - Indicates that the specified module is in an error state

Example

    SYS_STATUS macStat = DRV_G3ADP_MAC_Status(pNetIf->macObjHandle);
    if(macStat < 0)
    {   // failed; kill the interface
        TCPIP_STACK_BringNetDown(&tcpip_stack_ctrl_data, pNetIf, TCPIP_STACK_ACTION_IF_DOWN, TCPIP_MAC_POWER_DOWN);
        pNetIf->Flags.bMacInitDone = true;
    }
    else if(macStat == SYS_STATUS_READY)
    {   // get the MAC address and MAC processing flags
        ...
    }

Remarks

None.