esp32-smartdisplay icon indicating copy to clipboard operation
esp32-smartdisplay copied to clipboard

Add custom board to make it possible to define custom mix of display and touch from code with C functions

Open paaspaas00 opened this issue 1 year ago • 5 comments

You have some nicely-defined boards here. However, people may want to use the library for use with a compatible display (for which there are drivers in this lib) and with this library's touch drivers etc. To do so people are currently forced to write a custom board definition even if they actually don't have an actual, phisical board, but just a display. To make stuff easier, would it be possible to provide a nice programming API exposing basically everything it's exposed via compile flags, bit as C/C++ functions? So people can mix and match display, touch etc straight from code, without writing a board. The board config for this would simply be "esp32_custom"

paaspaas00 avatar Sep 05 '24 19:09 paaspaas00

basically something like #126 for use of functions

paaspaas00 avatar Sep 05 '24 19:09 paaspaas00

You can also remove the git-submodule and create your own board (or start with a predefined board) in the boards directory... This is already possible...

rzeldent avatar Sep 07 '24 18:09 rzeldent

@rzeldent hi, thanks for your reply! Yes I know it's already possible with custom boards, but I meant more of a way to define stuff via software, in C++. Like create a display with some constructor, create a touchscreen with some constructor etc

paaspaas00 avatar Sep 07 '24 23:09 paaspaas00

The driver is now written in C, not C++. This would involve quite some changes. Somewhere in the future this would be something to make classes out of the drivers but for now not a priority...

rzeldent avatar Sep 08 '24 09:09 rzeldent

@rzeldent thank you! I mean, C++ is just easier with classes etc, but no problem, the API could be made available in C as well, no big deal. You could as well expose C APIs

paaspaas00 avatar Sep 08 '24 14:09 paaspaas00