Hello,
I want load different icons to the screen. I uploaded PNG into the flash memory. When I try display two different icons are displayed two the same icons (see attachment).
Additional are displayed artifacts on both icons.
I use also append feature for display this part of screen as static part. I tried display icons without append feature. The icons have no artifact that way, but also
are displayed same icons instead two different.
Has any one idea where is the problem?
Below part of my code:
Thank you in advance!
I want load different icons to the screen. I uploaded PNG into the flash memory. When I try display two different icons are displayed two the same icons (see attachment).
Additional are displayed artifacts on both icons.
I use also append feature for display this part of screen as static part. I tried display icons without append feature. The icons have no artifact that way, but also
are displayed same icons instead two different.
Has any one idea where is the problem?
Below part of my code:
Code Select
#define SETTINGS_ADDRESS_MEM 22976
#define NEXT_ADDRESS_MEM24576
// Clear the first 10K of RAM_G where we will store the static part of the DL #######
Gpu_CoCmd_Dlstart (phost); // Start co-pro list
Gpu_CoCmd_MemSet (phost, 0, 0, 10 * 1024); // Set a block of memory to zeros between address 0 and address 10*1024
App_Flush_Co_Buffer (phost); // Send the above co-pro commands off to the FT800 ...
Gpu_Hal_WaitCmdfifo_empty (phost); // ... and wait for them to be processed
// Create the static part of the display and store it within the FT800's RAM_G
// Create a co-processor list which displays the Static (non-changing) part of the final screen #######
Gpu_CoCmd_Dlstart (phost); //Start the display list
App_WrCoCmd_Buffer (phost, CLEAR(1, 1, 1)); //Command CLEAR is recommended to be used before any other drawing operation,
//in order to put the graphics engine in a known state.
//The end of the display list is always flagged with the command DISPLAY
// Draw background
App_WrCoCmd_Buffer (phost, SCISSOR_XY(0, 0));
App_WrCoCmd_Buffer (phost, SCISSOR_SIZE(240, 320));
Gpu_CoCmd_Gradient (phost, 0, 0, 0x323232, 0, 320, 0x666666);
// Return the stencil and scissor to normal
App_WrCoCmd_Buffer (phost, STENCIL_FUNC(ALWAYS, 1, 255));
App_WrCoCmd_Buffer (phost, SCISSOR_SIZE(240, 320));
App_WrCoCmd_Buffer (phost, SCISSOR_XY(0, 0));
// Draw parameters button menu
Gpu_CoCmd_FlashHelper_SwitchFullMode(&host);
Gpu_CoCmd_FlashSource(phost, PARAMETERS_ADDRESS_MEM);
Gpu_CoCmd_LoadImage(phost, 0, OPT_FLASH );
//Start drawing bitmap
App_WrCoCmd_Buffer(phost, BEGIN(BITMAPS));
App_WrCoCmd_Buffer(phost, VERTEX2II(15, 15, 0, 0));
App_WrCoCmd_Buffer(phost, END());
// Draw parameters button menu
Gpu_CoCmd_FlashHelper_SwitchFullMode(&host);
Gpu_CoCmd_FlashSource(phost, NEXT_ADDRESS_MEM);
Gpu_CoCmd_LoadImage(phost, 0, OPT_FLASH );
//Start drawing bitmap
App_WrCoCmd_Buffer(phost, BEGIN(BITMAPS));
App_WrCoCmd_Buffer(phost, VERTEX2II(130, 15, 0, 0));
App_WrCoCmd_Buffer(phost, END());
dloffset = Gpu_Hal_Rd16 (phost, REG_CMD_DL); // Reading the REG_CMD_DL tells us where the end of the new DL is in
// RAM_DL and therefore the size of our new 'static' display list
Gpu_Hal_WrCmd32 (phost, CMD_MEMCPY); // Command to copy a block of memory within the FT800
Gpu_Hal_WrCmd32 (phost, 1000L); // First parameter is destination, copy to address 1,000 decimal
Gpu_Hal_WrCmd32 (phost, RAM_DL); // Second parameter is the source, here we copy from start of RAM_DL
Gpu_Hal_WrCmd32 (phost, dloffset); // Third parameter is length of data to copy, as determined above
App_WrCoCmd_Buffer(phost, DISPLAY()); // Display command finished the Display List
Gpu_CoCmd_Swap(phost); // Swap to make the new DL active
App_Flush_Co_Buffer(phost); // Send the above co-pro commands off to the FT800 ...
Gpu_Hal_WaitCmdfifo_empty(phost); // ... and wait for them to be processed
Thank you in advance!