2023-07-16
07:23 AM
- last edited on
2023-07-17
05:00 AM
by
Lina_DABASINSKA
Hi,
We had an LCD problem with a recently bought board STM32F769I-DISCO, revision MB1166-A09.
Now it's resolved by recompilation with macro "USE_STM32F769I_DISCO_REVB03" entered in project options.
My question now is how can I make it universal, without compilation for different LCD versions.
How can I check in runtime which version LCD is installed and call the appropriate version of LCD init function,
" NT35510_Init(NT35510_FORMAT_RGB888, orientation);" or
"OTM8009A_Init(OTM8009A_FORMAT_RGB888, orientation);" ?
Please help us to resolve this issue, we have a lot of applications with our technologies for this board ( A211400002, MB1166 A-03 / A-02 ) and It is very inconvenient to manage the same projects for different types of LCD.
I develop with MDK-ARM µVision.
Best regards,
Dmitry S.,
Embedded software engineer
Post edited to adhere community guidelines.
2023-07-16 07:40 AM - edited 2023-07-16 10:23 AM
The boards are not licensed for commercial usage.
You'd likely need to decompose the code difference, either to allow for the common compilation for the two screens, or make two independent libraries with a common interface.
If you can probe the video controllers you might be able to auto-detect which is used. Or have some configuration setting, or OTP, which identifies what you're using moving forward.
2023-07-16 08:14 AM - edited 2023-07-16 08:16 AM
Our customers use to add a solder bridge or two on spare GPIOs, populate them at the same time when mounting the 'variable' parts.
Or make a post-programming patch in the flash... and so on.