DRV_MIIM_Open Function

C

DRV_HANDLE DRV_MIIM_Open(const SYS_MODULE_INDEX drvIndex, const DRV_IO_INTENT intent); 

Returns

  • valid open-instance handle if successful (a number identifying both the caller and the module instance).

  • DRV_HANDLE_INVALID if an error occurs

Description

This function opens the specified MIIM driver instance and provides a handle that must be provided to all other client-level operations to identify the caller and the instance of the driver.

Remarks

The handle returned is valid until the DRV_MIIM_Close routine is called. This function will NEVER block waiting for hardware.

Preconditions

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

Example

DRV_HANDLE handle; 
handle = DRV_MIIM_Open(DRV_MIIM_INDEX_0, 0); 
if (DRV_HANDLE_INVALID == handle) 
{ 
// Unable to open the driver 
}