Jpeg buffer to riverdi screen 800

General discussion on mikroC PRO for AVR.
Post Reply
Author
Message
Ashaern
Posts: 1
Joined: 09 Sep 2020 12:40

Jpeg buffer to riverdi screen 800

#1 Post by Ashaern » 09 Sep 2020 12:51

I'm working on an embedded system equipped with a riverdi screen. I try to send a JPEG buffer from the microcontroller to the FT800 but I failed et I don't know why.
I put bellow my code, if a person can help me that will be great.

int load_jpg(unsigned char** filename, uint16_t size)
{

Gpu_CoCmd_Dlstart(phost);
App_WrCoCmd_Buffer(phost,CLEAR_COLOR_RGB(rBack,gBack,bBack));
App_WrCoCmd_Buffer(phost,CLEAR(1,1,1));
Gpu_CoCmd_LoadImage(phost,0,0);
int indexInit = 0;
int blocklen = 0;
unsigned char data[8192];

while (size > 0)
{
int i = 0;
blocklen = size > 8192 ? 8192 : size;
for (int index = indexInit; index < blocklen; index ++)
{
data = *filename[index];
i++;
}
indexInit = indexInit + blocklen;
size -= blocklen;
Gpu_Hal_WrCmdBuf(phost, data, blocklen);
}

App_WrCoCmd_Buffer(phost,BEGIN(BITMAPS));
App_WrCoCmd_Buffer(phost,VERTEX2F(50*16,50*16));

App_WrCoCmd_Buffer(phost,DISPLAY());
Gpu_CoCmd_Swap(phost);
App_Flush_Co_Buffer(phost);
Gpu_Hal_WaitCmdfifo_empty(phost);

}

Thank you for your help.

Post Reply

Return to “mikroC PRO for AVR General”