

#include <nitro/mi.h>
void MI_InitDevice(MIDevice *device, void *userdata,
MIDeviceReadFunction read,
MIDeviceWriteFunction write);| device | Pointer to the MIDevice structure to be initialized. |
| userdata | Any user-defined value to be linked with the structure. |
| read | The pointer to the callback function that will be used for read access. |
| device | The pointer to the callback function that will be used for write access. |
None.
Specifies the callbacks to use for read and write access and a freely configurable argument, and initializes the MIDevice structure.
Calling MI_ReadDevice() or MI_WriteDevice() with this structure will cause the callback functions to be called directly.
This is a utility feature designed to separate the device control component from the module design. For more information, see the reference for the MIDevice structure.
MI_ReadDevice, MI_WriteDevice
MIDevice, MIDeviceReadFunction, MIDeviceWriteFunction
2007/05/09 Initial version.
CONFIDENTIAL