Closed Frederic98 closed 2 years ago
Lgtm. If the tests run ok and code coverage is about the same I will merge and make a release.
Thanks for taking the time to investigate and provide a fix. Could you add yourself to the contributors list too please?
This pull request adds support for more ST7789 based screens with resolutions other than 240x240.
As in #142, passing the width and height to set_window() didn't directly work. This is because the arguments to the RASET and CASET commands are sent as command bytes. They should, however, be sent as data bytes. This also applies to all other commands with arguments, like those called to initialize the screen.
The reason that the screen went blank in #142 was because 320px translates to 0x01 0x3F, where the command 0x01 is mapped to software reset in the LCD driver.
To solve this, I add the
command(self, cmd, *args)
function in st7789 where it callssuper.command(self, cmd)
andself.data(args)
to send the arguments as data bytes.