BRT Community

Please login or register.

Login with username, password and session length
Advanced search  

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

Author Topic: BT815 loading two bitmap file at the same display list  (Read 427 times)

elektor18

  • Newbie
  • *
  • Posts: 5
    • View Profile
BT815 loading two bitmap file at the same display list
« on: June 12, 2019, 09:35:22 AM »

Hi All,

I'm trying to load two converted png file from mcu flash but something is not right. How to know where to load next one image (display RAMG address) avoiding overwriting previous image?

Code: [Select]
     API_LIB_BeginCoProList();                                                   // Begin new co-processor list
    API_CMD_LOADIMAGE(StartAddress,0);                                          // Load image command. Extract data to RAM_G + 0, options = 0
    API_LIB_EndCoProList();                                                     // Finish the co-processor list
    API_LIB_WriteDataToCMD(EVE_PNG, sizeof(EVE_PNG));                           // Send data immediately after the command (since we don't select MEDIAFIFO as source in Options))
    API_LIB_AwaitCoProEmpty();                                                  // Await completion of the Load Image. Image will now be in RAM_G
 
        // ###### Check parameters of decompressed image ########
    API_LIB_BeginCoProList();                                                   // Begin co-pro list
    API_CMD_GETPROPS(0, 0, 0);                                                  // GetProps command with three dummy 32-bit values
    API_LIB_EndCoProList();                                                     // Finish the co-processor list
    API_LIB_AwaitCoProEmpty();                                                  // Await the command completion


This code is for one image. Shall I duplicate that for another one or there is different way of doing it? And should be StartAddress of second img?
Logged

BRT Community

  • Administrator
  • Jr. Member
  • *****
  • Posts: 56
    • View Profile
Re: BT815 loading two bitmap file at the same display list
« Reply #1 on: June 13, 2019, 10:31:08 AM »

Hello,

You can have a look at the example in section 7.3 of the following application note, this makes use of the GET_PROPS command which can be used to establish the starting point for the next image in RAM_G.
https://brtchip.com/wp-content/uploads/Support/Documentation/Application_Notes/ICs/EVE/BRT_AN_014_FT81X_Simple_PIC_Library_Examples.pdf

Best Regards,
FTDI Community
Logged

elektor18

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: BT815 loading two bitmap file at the same display list
« Reply #2 on: June 20, 2019, 02:11:48 PM »

Have you got maybe an example how to load more images/icons? I tried few ways but non worked. By example I mean steps how to do that, I'm not expecting ready code, that's not the point :)
Probably I'm missing something somewhere and I need guidance.
Logged

BRT Community

  • Administrator
  • Jr. Member
  • *****
  • Posts: 56
    • View Profile
Re: BT815 loading two bitmap file at the same display list
« Reply #3 on: June 21, 2019, 10:45:31 AM »

Hello,

The previously linked example is the example for loading PNG images, for your second image you would just repeat the process loading the next image into RAM_G and the location obtained from the GET_PROPS command.

Best Regards,
BRT Community
Logged

Rudolph

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: BT815 loading two bitmap file at the same display list
« Reply #4 on: June 21, 2019, 04:34:39 PM »

I'm trying to load two converted png file from mcu flash but something is not right. How to know where to load next one image (display RAMG address) avoiding overwriting previous image?

How can you not know the properties of the images that you converted to be loaded from flash? :-)

Loading some random image from a sd-card could be a challenge.
But even then you better make sure that they fit into the space you reserve for them before unpacking these to RAM_G.


this makes use of the GET_PROPS command

That is a good example for a function which is described not so good in the user-manual.
The C prototype "void cmd_getprops( uint32_t ptr, uint32_t width, uint32_t height);" implies that you are feeding
parameters into it, not that you can use it to retrieve parameters.
The way how this works and how the data could be acessed is described a little for cmd_getptr.
Logged

pauljiao

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: BT815 loading two bitmap file at the same display list
« Reply #5 on: July 02, 2019, 10:26:24 AM »

"cmd_loadimage" decodes PNG into various image formats based on the PNG image properties.  It might be in
Paletted4444, or L8 or RGB565.   So user may need use cmd_getprops to retrieve the decoded size to calculate the next available address.

To use cmd_getprops, please see the example in "cmd_regread". It is common practice to read the output parameter from EVE coprocessor buffer.
Logged

AT38

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: BT815 loading two bitmap file at the same display list
« Reply #6 on: July 17, 2019, 11:11:45 AM »

CMD_GETPROPS is returning {0,0,0} for me.

CMD_LOADIMAGE completes successfully.

I've checked that I'm reading out correctly from the CMD buffer by including the command when reading out, and checking its value is correct.

The only error condition in the documentation is CMD_READ == 0xfff.
It says nothing about zero return params, so far as I can see.

Any clues what might be wrong?
Logged