-
Notifications
You must be signed in to change notification settings - Fork 2.1k
driver/lcd: add common lcd base driver #16176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
ili9341
code 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 flash
LCD_CONTROLLER=st7735 make -C tests/driver_lcd_common flash
make -C tests/disp_dev flash
make -C tests/pkg_lvgl flash