

#include <nitro/mi.h>
int MI_ReadDevice(MIDevice *device, void *buffer, u32 offset, u32 length);| device | Pointer to the MIDevice structure to access.The device must have been initialized using MI_InitDevice(). |
| buffer | The destination memory to store the loaded data. |
| offset | The start address of the device to which data should be read. |
| length | Data size to load. |
If the function succeeds, it will return the actual amount of data that has been read. If it fails, it will return a negative value.
Reads data from a device using the MIDevice structure.
Internally, this just calls the callback function for reads specified in MI_InitDevice().
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_InitDevice, MI_WriteDevice
MIDevice, MIDeviceReadFunction, MIDeviceWriteFunction
2007/05/09 Initial version.
CONFIDENTIAL