GxFpga3571LoadArray

Purpose

Loads the video memory with data from the specified byte array.

Syntax

GxFpga3571LoadArray (nHandle, pucData, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
Handle to a GX3500 board.
pucData
BYTE[ ]
Specifies the array to be loaded into the video memory.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

The array should contain at least 921,600 elements.  Every three elements in the array specifies the red, green and blue values of a single pixel, respectively.  The order of the pixels in the array should be row (top to bottom) and column (left to right).  For example:

Byte Array Element
Pixel / Color Referenced
pucData[0]
Row 0, Column 0, Red Value.
pucData[1]
Row 0, Column 0, Green Value.
pucData[2]
Row 0, Column 0, Blue Value.
pucData[3]
Row 0, Column 1, Red Value.
pucData[1920]
Row 1, Column 1, Red Value.
pucData[1923]
Row 1, Column 1, Red Value.
pucData[921599]
Row 479, Column 639, Blue Value.

Example

The following example loads the values from pucData into the Gx3571’s video memory.  The resulting video output will be all black pixels:

 

BYTE pucData[921600];

for (int i = 0; i++, i<921600)

{

pucData[i]=0xFF;

}

GxFpga3571LoadArray (nHandle, pucData, &nStatus);

 

See Also

GxFpga3571LoadColor, GxFpga3571LoadFile, GxFpgaGetErrorString