News:

Welcome to the Bridgetek Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ Bridgetek Support

Please refer to our website for detailed information on all our products - Bridgetek - Bridging Technology

Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - koyocik88

#1
Discussion - EVE / Load image
June 24, 2024, 07:42:31 AM
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:


#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!
#2
Discussion - EVE / Screen updates
March 11, 2024, 10:32:59 AM
Hello!

I'm trying to find a way how to update part of displayed screen (i.e. change only some values on displayed screen or status of displayed button). I don't want each time send whole display list. I found a document "APPLICATION NOTE AN_340 FT800_Optimising screen updates with Macro and Append" given by Bridgtech.
In my example I want change only values for displayed labels. Could you advise me if gives other possibility how to update choose parts of the showed screen ?


void showScreen ()
{
uint32_t coordinates = Gpu_Hal_Rd32(phost, REG_TOUCH_SCREEN_XY);
uint8_t Read_tag = Gpu_Hal_Rd8(phost, REG_TOUCH_TAG);
uint16_t x_coordinate, y_coordinate;

x_coordinate = (coordinates >> 16);
y_coordinate = coordinates;

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


Gpu_CoCmd_Gradient(phost,0, 0, 0x636363UL, 0, DispHeight, 0x222222UL);

Gpu_CoCmd_Number(phost, 20, 20, 28 , 0, coordinates);
Gpu_CoCmd_Number(phost, 20, 40, 28 , 0, x_coordinate);
Gpu_CoCmd_Number(phost, 20, 60, 28 , 0, y_coordinate);
Gpu_CoCmd_Number(phost, 20, 80, 28 , 0, Read_tag);

App_WrCoCmd_Buffer(phost, DISPLAY()); //instruct the graphics processor to show the list
Gpu_CoCmd_Swap(phost); //make this list active
App_Flush_Co_Buffer(phost);
Gpu_Hal_WaitCmdfifo_empty(phost);
}


Thank you in advance!