This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DLPLCR6500EVM: 6500 code for uploading images to the DMD

Part Number: DLPLCR6500EVM

I have .NET wrapped some of the TI C code so I can use it in LabVIEW. However, LCR_pattenMemLoad() wants a pointer *pByteArray and I've never used pointers before. How do I get the pointer for the data I want to load into the DMD?

From line 3446 of API.c from C:\Texas Instruments-DLP\DLPC900REF-SW-3.0.0\DLPC900REF-GUI\Sources\GUI\HiresLib
int LCR_pattenMemLoad(BOOL master, unsigned char *pByteArray, int size)
{
hidMessageStruct msg;
int retval;
int dataLen;

dataLen = 512 - sizeof(msg.head)- sizeof(msg.text.cmd) - 2;//The last -2 is to workaround a bug in bootloader.
// dataLen = 186;

/* if (size < dataLen)
{
memcpy(&msg.text.data[3], pByteArray, size);
}
else
{
memcpy(&msg.text.data[3], pByteArray, dataLen);
}*/

if (size < dataLen)
dataLen = size;


memcpy(&msg.text.data[4], pByteArray, dataLen);
msg.text.data[2] = dataLen & 0xFF;
msg.text.data[3] = (dataLen >> 8) & 0xFF;

if (master)
{
CmdList[PATMEM_LOAD_DATA_MASTER].len = dataLen + 2;
LCR_PrepWriteCmd(&msg, PATMEM_LOAD_DATA_MASTER);
}
else
{
CmdList[PATMEM_LOAD_DATA_SLAVE].len = dataLen + 2;
LCR_PrepWriteCmd(&msg, PATMEM_LOAD_DATA_SLAVE);
}

retval = LCR_SendMsg(&msg);
if(retval > 0)
return dataLen;

return -1;
}