2023-10-07 03:13 AM
Are there examples? Someone tried this way?
https://support.touchgfx.com/docs/development/ui-development/software-architecture/code-structure
2023-11-06 05:23 AM - edited 2023-11-06 05:24 AM
Hello @RiccardoD ,
Unfortunately, there are no examples of that in TouchGFX because the screens are not implemented in TouchGFX. However, the easiest way it would be to define an empty screen in the designer, and then have a source file defining all the functionalities you want, and then instruct TouchGFX to use which functions for setup and teardown in the View.cpp.
An imaginary example would be:
//MyExternalScreenView.cpp created in TouchGFX
extern "C" {
void setUpTheScreen();
void exitTheScreen();
...
}
void MyExternalScreen::setupScreen()
{
MyExternalScreenBase::setupScreen();
setUpTheScreen();
}
void MyExternalScreen::tearDownScreen()
{
exitTheScreen();
MyExternalScreenBase::tearDownScreen();
}
//MyExternalScreenImplementaion.c created outside of TouchGFX
void setUpTheScreen(){
//Implementation
}
void exitTheScreen(){
//Implementation
}
...
I hope this helps you, don't hesitate to ask more questions