driver/lcd: add common lcd base driver#16176
Conversation
b0d48db to
1c05550
Compare
|
@aabadie I re-worked this PR quite a bit, now it's compatible with both drivers, I tested this by running
There are maybe still things to be improved regarding code duplicity, but please tell me what you think of the current approach. |
I don't remember how it was before but looking at the current approach, I must say that I don't fully understand all changes related to the lcd common. It seems to me that it introduces another layer of abstraction and thus is kind of redundant with the disp_dev purpose. It also adds another layer of auto_init code (with driver specific code inside) that I don't like. But anyway, with all recent changes with disp_dev test application and build system enhancement, you have to rebase and rework this again. |
1c05550 to
74c51e1
Compare
I rebased it now. |
74c51e1 to
74e2c67
Compare
aabadie
left a comment
There was a problem hiding this comment.
I tested this PR with the pybadge screen (ST7735) and it works like a charm. I also fixed (and allowed myself to push) some rebasing remaining issues with ili9341 but otherwise everything seems fine there as well.
I have a few comments/questions, see below.
a69adce to
12457e5
Compare
|
@fjmolinas I've updated a bit your PR to something that I think is better. Tested on adafruit-clue (ili9341) and adafruit-pybadge (with #17903 included) and both are working as expected.
If you are ok with my changes, then I think this is ready to go. |
12457e5 to
b255cde
Compare
b255cde to
b2dbb8e
Compare
b2dbb8e to
fff7c63
Compare
- use auto_init_screen if disp_dev is used
fff7c63 to
bf7dccf
Compare
aabadie
left a comment
There was a problem hiding this comment.
Code changes are good enough to me now. @fjmolinas is ok to merge this one as it is now.
ACK
Contribution description
A year ago I wrote an st7735 driver that was based on the ili9341, most of the code is exactly the same though.
LCD controllers ST7735 and ili9341 share very similar functions, the main differences are related to the set of available commands and initialization procedure. So instead of adding a new driver for the st77335 I rename the ili9341 driver to a common lcd driver. Only available commands and initialization procedure are a bit different.
Other changes:
There is a lot of renaming in this PR but
ili9341code should be mostly exactly the same, there is a very small difference in binary size mainly because "puts" have changed and the extraCONFIG_%Testing procedure
make -C tests/driver_lcd_common flashLCD_CONTROLLER=st7735 make -C tests/driver_lcd_common flashmake -C tests/disp_dev flashmake -C tests/pkg_lvgl flash