Hi all,
I'm trying to find a way to display images one by one from SD card but rapidly one by one. The problem is that when I'm trying to do this I got always rolling effect for all images except the first one. Below is the code with just two images, and it is not working because second images is slightly overwritten with white colour. Images are about 300-500kb. What is the best method to do this? do I have to put images to a different part of the RAM_G? Is there any trick to do this with media fifo or something like that to save a ram for fonts etc.?
The best solution will be:
- froze the screen
- fill with new data using fifo or RAM_G but with the same address
- switch to the new screen
But now everytime I start to write to the RAM_G new data it is automaticaly writed to the screen.
void TFT_loop(void)
{
static int index = 0;
uint32_t target_address=0;
target_address = index ? 512*1024 : 0;
EVE_cmd_load_from_sd(target_address, EVE_OPT_NODL , file_name[index], CMD_LOADIMAGE);
EVE_start_cmd_burst(); /* start writing to the cmd-fifo as one stream of bytes, only sending the address once */
EVE_cmd_dl(CMD_DLSTART);/* start the display list */
EVE_cmd_dl(DL_CLEAR_RGB | WHITE); /* set the default clear color to white */
EVE_cmd_dl(BITMAP_HANDLE(index));
EVE_cmd_dl(BITMAP_SOURCE(target_address));
EVE_cmd_setbitmap(target_address, EVE_RGB565, EVE_HSIZE, EVE_VSIZE);
EVE_cmd_dl(DL_BEGIN | EVE_BITMAPS);
EVE_cmd_dl(VERTEX2II(0, 0, index, 0));
EVE_cmd_dl(DL_DISPLAY); /* instruct the graphics processor to show the list */
EVE_cmd_dl(CMD_SWAP); /* make this list active */
EVE_end_cmd_burst(); /* stop writing to the cmd-fifo */
EVE_cmd_start(); /* order the command co-processor to start processing its FIFO queue but do not wait for completion */
index ^= 1;
DELAY_MS(1000);
}