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: Widgets  (Read 21254 times)

raffaeler

  • Newbie
  • *
  • Posts: 13
    • View Profile
Widgets
« on: March 06, 2023, 04:19:44 PM »

Hello,
how can I create, upload to the display (BT815) and call a widget?
Note: I can't use the ESD.

Thanks
Logged
Electronic Engineer, Senior Software Architect, Speaker, Trainer

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 770
    • View Profile
Re: Widgets
« Reply #1 on: March 06, 2023, 04:54:06 PM »

Hello,

Thank you for your question.

EVE has many in-built widgets which can be utilised by issuing the appropriate co-processor commands to the IC (such as CMD_BUTTON()) for example.
Please see the programmers guide for the full list of widgets:
https://brtchip.com/wp-content/uploads/Support/Documentation/Programming_Guides/ICs/EVE/BRT_AN_033_BT81X_Series_Programming_Guide.pdf

If you require some basics on how the EVE series of ICs can be programmed, please refer to the following application notes:
https://brtchip.com/wp-content/uploads/Support/Documentation/Application_Notes/ICs/EVE/BRT-AN-006-FT81x-Simple-PIC-Example.pdf
https://brtchip.com/wp-content/uploads/Support/Documentation/Application_Notes/ICs/EVE/BRT_AN_008_FT81x_Creating_a_Simple_Library_For_PIC_MCU.pdf

These cover the low level SPI transactions required to interface with EVE and generate displays.

Finally Section 8 and 9 of the following examples application note covers some cases of widget usage:
https://brtchip.com/wp-content/uploads/Support/Documentation/Application_Notes/ICs/EVE/BRT_AN_014_FT81X_Simple_PIC_Library_Examples.pdf

Have you chosen an MCU to use as a SPI master interface yet?
The BRT_AN_025 library is an port of the PIC library from the above application notes, and provides support for a wider range of MCU platforms, you can find the source here:
https://github.com/Bridgetek/EVE-MCU-BRT_AN_025

Best Regards,
BRT Community
Logged

Rudolph

  • Sr. Member
  • ****
  • Posts: 418
    • View Profile
Re: Widgets
« Reply #2 on: March 07, 2023, 03:31:29 PM »

Hello,
how can I create, upload to the display (BT815) and call a widget?
Note: I can't use the ESD.

Thanks

No, uploading functions for the command co-processor to execute and add lines to the display-list based on supplied parameters is not possible,
or at least there is no documented API for that.
And the few bits and pieces that I gathered about the undocumented API do not seem to allow this either.

What you can do is pre-calculate sequences of display-list commands, copy these from the display-list to RAM_G and then use CMD_APPEND to add these snippets into your display list.
Ok, this not not CMD_MYBUTTON but you can still reduce the SPI traffic significantly.
In my simple example code I am using this mechanism only to create a section of display list commands that never change, a colored rectangle on top, a line to separate things, a text in the middle and o logo.

Sure, you could take it one step further and manipulate the snippets before using them.
But this would mean to mix co-processor commands for the display llist and memory functions,
probably does not much to reduce the SPI traffic and the result is probably rather slow compared to
do the display update in one DMA transfer.

There also is CMD_NEWLIST / CMD_CALLIST which allows to write co-processor commands verbatim to RAM_G and execute this snippets during display list building.
The difference to CMD_APPEND is that you get for example cmd_button(20, 20, 60, 60, 30, 0, "OK!"); in RAM_G and not all the display list commands that the co-processor is generating from a widget command.
Logged

raffaeler

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Widgets
« Reply #3 on: March 08, 2023, 04:47:15 PM »

Quote from: BRT Community
Have you chosen an MCU to use as a SPI master interface yet?

Thank you but I already developed my own ESP32 library and a decompiler to iterate in CI/CD.
I believe Rudolph understood my question. Substantially I would like to create my own widgets, upload them (in flash?) and then use them as I can do with the Button.
The reason for this is that I really miss primitives like Arcs and (unfilled) Circles.
I read the documents that you linked but they are not exhaustive and do not explain how to do this.
Is there any reason why BRT is not allowing to create custom widgets?


No, uploading functions for the command co-processor to execute and add lines to the display-list based on supplied parameters is not possible,
or at least there is no documented API for that.
And the few bits and pieces that I gathered about the undocumented API do not seem to allow this either.

Too bad, thanks for confirming.

What you can do is pre-calculate sequences of display-list commands, copy these from the display-list to RAM_G and then use CMD_APPEND to add these snippets into your display list.
Ok, this not not CMD_MYBUTTON but you can still reduce the SPI traffic significantly.
In my simple example code I am using this mechanism only to create a section of display list commands that never change, a colored rectangle on top, a line to separate things, a text in the middle and o logo.

Currently I am quite fine with the SPI speed. This was my starting point when I first wrote the code for ESP32. Anyway, thank you for the tip.

There also is CMD_NEWLIST / CMD_CALLIST which allows to write co-processor commands verbatim to RAM_G and execute this snippets during display list building.
The difference to CMD_APPEND is that you get for example cmd_button(20, 20, 60, 60, 30, 0, "OK!"); in RAM_G and not all the display list commands that the co-processor is generating from a widget command.

Sure, good point.
Logged
Electronic Engineer, Senior Software Architect, Speaker, Trainer

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 770
    • View Profile
Re: Widgets
« Reply #4 on: March 09, 2023, 05:01:16 PM »

Hello,

Quote from: BRT Community
Have you chosen an MCU to use as a SPI master interface yet?

Thank you but I already developed my own ESP32 library and a decompiler to iterate in CI/CD.
I believe Rudolph understood my question. Substantially I would like to create my own widgets, upload them (in flash?) and then use them as I can do with the Button.
The reason for this is that I really miss primitives like Arcs and (unfilled) Circles.
I read the documents that you linked but they are not exhaustive and do not explain how to do this.
Is there any reason why BRT is not allowing to create custom widgets?

Yes unfortunately it is not possible to define a widget in this way with EVE to the extent that you would be able to issue custom co-processor commands. I will however suggest this as a feature for future EVE revisions.

Currently the approach to generate custom widgets is to code them individually into custom functions (this is the approach ESD uses) using the inbuilt primitives or co-processor functions. OR as Rudolph has suggested utilise the CMD_NEWLIST / CMD_CALLIST or CMD_APPEND functions.

Best Regards,
BRT Community
Logged

raffaeler

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Widgets
« Reply #5 on: March 10, 2023, 05:30:40 PM »

Currently the approach to generate custom widgets is to code them individually into custom functions (this is the approach ESD uses) using the inbuilt primitives or co-processor functions.

Is there any documentation on this approach (without using ESD)?

Thank you
Logged
Electronic Engineer, Senior Software Architect, Speaker, Trainer