ProSoft Technology MVI69-ADM User Manual
Page 215

MVI-ADM ♦ 'C' Programmable
Backplane API Functions
'C' Programmable Application Development Module
Developer's Guide
ProSoft Technology, Inc.
Page 215 of 342
February 20, 2013
MVIbp_WriteInputImage
Syntax
int MVIbp_WriteInputImage(MVIHANDLE handle, WORD *buffer, WORD offset, WORD
length);
Parameters
handle
Handle returned by previous call to MVIbp_Open
buffer
Pointer to buffer of data to be written to input image
offset
Word offset into input image at which to begin writing
length
Number of words to write
Description
MVIbp_Wri
teInputImage writes to the module’s input image.
handle must be a valid handle returned from MVIbp_Open.
buffer must point to a buffer of at least length words in size.
offset specifies the word in the input image to begin writing, and length specifies
the number of words to write. The error MVI_ERR_BADPARAM will be returned
if an attempt is made to access the input image beyond the range configured for
direct I/O. If this error is returned, no data will be written to the input image. Refer
to the MVIbp_SetIOConfig function for more information.
The input image is written by the module and read by the control processor.
Return Value
MVI_SUCCESS
The data was written to the input image successfully.
MVI_ERR_NOACCESS
handle does not have access
MVI_ERR_BADPARAM
Parameter contains invalid value
MVI_ERR_BADCONFIG
the data connection is not open (MVI46 and MVI56 only)
Example
MVIHANDLE Handle;
WORD buffer[2];
int rc;
/* Write 2 words of data to the input image, starting with word 0 */
rc = MVIbp_WriteInputImage(Handle, buffer, 0, 2);
if (rc != MVI_SUCCESS)
printf("ERROR: MVIbp_WriteInputImage failed");
See Also
MVIbp_SetIOConfig (page 208)
MVIbp_ReadOutputImage (page 214)