1.6.3.5 DRV_G3ADP_MAC_Open Function
C
DRV_HANDLE DRV_G3ADP_MAC_Open(const SYS_MODULE_INDEX drvIndex, const DRV_IO_INTENT intent);
Summary
Opens a client instance of the G3 ADP MAC Driver. This driver is single instance.
Description
This function opens a client instance of the G3 ADP MAC Driver. Used by tcpip_module_manager.
Precondition
DRV_G3ADP_MAC_Initialize() should have been called.
Parameters
Param | Description |
---|---|
index | Identifier for the driver instance to be opened. |
init | Zero or more of the values from the enumeration. DRV_IO_INTENT ORed together to indicate the intended use of the driver |
Returns
If successful, returns a valid handle to a module instance object. Otherwise, returns 0.
Example
pNetIf->hIfMac = DRV_G3ADP_MAC_Open(pMacObj->macId, DRV_IO_INTENT_READWRITE); if(pNetIf->hIfMac == DRV_HANDLE_INVALID) { pNetIf->hIfMac = 0; pNetIf->macObjHandle = 0; SYS_ERROR_PRINT(SYS_ERROR_ERROR, TCPIP_STACK_HDR_MESSAGE "%s MAC Open failed\r\n", pMacObj->macName); netUpFail = 1; break; }
Remarks
The intent parameter is not used in the current implementation and is maintained only for compatibility with the generic driver Open function signature.