nuttx icon indicating copy to clipboard operation
nuttx copied to clipboard

LCD: Merge files for ST7735 and ST7789 into ST77XX

Open michallenc opened this issue 3 years ago • 3 comments

Summary

This PR presents the changes regarding ST7735 and ST7789 controllers discussed last month in NuttX mailing list. It basically merges those two controllers into one single file called ST77XX. Both files for ST7735 and ST7789 were mostly the same except for different preset resolution and inversion color command in ST7789 driver. This can be helpful to avoid having diverging functionalities and bugfixes and also opens the doors for easier implementation of other similar controllers (like ST7796 etc.)

The configuration options stays separately for ST7735 and ST7789 to make it easier for user to configured those displays and controllers. This also allows to have preset resolutions for different controllers from ST77XX family.

Impact

Boards using ST77XX controllers.

Testing

Tested for ST7789 controller with Teensy 4.1 board, other configurations succesfully configured and compiled.

michallenc avatar Sep 09 '21 16:09 michallenc

Hi Michal, FYI I just opened a PR for adding GC9A01 driver, which is almost identical to ST7789 driver except for some init magic commands and different default orientation configs. You might want to take it into consideration when unifying the drivers :)

PeterBee97 avatar Sep 16 '21 04:09 PeterBee97

Yes, maybe the way to solve it is passing some parameter in the LCD initialize to indicate the type of LCD, this way we could have more than 1 initialization with the same or different type

acassis avatar Sep 16 '21 12:09 acassis

Yes, maybe the way to solve it is passing some parameter in the LCD initialize to indicate the type of LCD, this way we could have more than 1 initialization with the same or different type

Yes, something like in arch/.../imxrt_flexcan.c. I am not sure how this will turn out, It´s likely that I will put this on ice as my semester starts next week and I need to start working on my semestral & bechalor project (also with NuttX btw) and this should be done correctly and carefully otherwise we could end up with 3 or 4 not working lcd drivers. I will see how much time will I be able to put in this merge.

michallenc avatar Sep 17 '21 14:09 michallenc

ST has different variants, so please include ST7796 / ST7796UI as well seen with 3.5" 480x320. Devices also comes with different interfaces like SPI / 8Bit Parallel etc.

sukesh-ak avatar Feb 27 '23 10:02 sukesh-ak