MIDeviceWriteFunction

Definition

#include <nitro/mi.h>
typedef int (*MIDeviceWriteFunction)(void *userdata, const void *buffer, u32 offset, u32 length);

Arguments

userdata An arbitrary user-defined value specified with MI_InitDevice().
This is provided for the sake of convenience in implementing callback functions.
buffer The transfer source memory where the data for writing is stored.
offset The starting address in the device where data should be written.
length The data write size.

Return Values

If the function succeeds, it must return the actual amount of data that has been written. If it fails, it must return a negative value.

Description

This is the function prototype indicating the callback format for writing data to the device.
Use this format to implement a device-writing operation and to specify your implementation in MI_InitDevice().

See Also

MI_InitDevice, MI_ReadDevice MI_WriteDevice
MIDevice, MIDeviceReadFunction, MIDeviceWriteFunction

Revision History

2007/05/09 Initial version.


CONFIDENTIAL