1.4.3.5 MMHI_Open Function
C
MMHI_HANDLE MMHI_Open(SYS_MODULE_OBJ object)
Summary
Opens the specified MM host interface and returns a handle to it.
Description
This routine opens the MMHI and provides a handle that must be provided to all other MMHI operations to identify the caller.
This MMHI is a single client interface, so MMHI_Open API should be called only once until MMHI is closed.
Parameters
| Param | Description |
|---|---|
|
object |
Object handle for the specified driver instance (returned from MMHI_Initialize) |
Returns
If successful, the routine returns a valid open-interface handle.
If an error occurs, the return value is MMHI_HANDLE_INVALID. Error can occur:
- if the MMHI has been already opened once and in use
- if the UART peripheral instance being opened is not initialized or is invalid
Example
MMHI_HANDLE handle;
SYS_MODULE_OBJ sysObjMetersandmore;
handle = MMHI_Open(sysObjMetersandmore);
if (handle == MMHI_HANDLE_INVALID)
{
}
Remarks
The handle returned is valid until the MMHI_Close routine is called.
This routine will NEVER block waiting for hardware.
