qmk_firmware
qmk_firmware copied to clipboard
Quantum Painter fix for ST7789 driver
In the process of adding support for ST7735 in Quantum Painter, and in doing so I uncovered a few issues with the existing ST7789 driver
Description
- In qp_st7789.c, ST77XX_CMD_INVERT_ON is used in the init sequence, but this should instead default to ST77XX_CMD_INVERT_OFF
- In qp_st7789.c, ST77XX_MADCTL_RGB is assigned but it it should be ST77XX_MADCTL_BGR (which also happens to match the "BGR" settings for other QP drivers)
When I made these changes for an ST7735 display, the hardware began working correctly (i.e. colors were wrong with the original settings, but are correct with the new settings; see image displaying the correct colors).
I haven't actually tested on an ST7789, but everything I'm seeing suggests these two settings should be changed as these settings are handled the same for ST7789 and ST7735.
The last change is just correcting a typo I noticed elsewhere in the qp code.
Types of Changes
- [ ] Core
- [X] Bugfix
- [ ] New feature
- [ ] Enhancement/optimization
- [ ] Keyboard (addition or update)
- [ ] Keymap/layout/userspace (addition or update)
- [ ] Documentation
Issues Fixed or Closed by This PR
Checklist
- [ ] My code follows the code style of this project: C, Python
- [x] I have read the PR Checklist document and have made the appropriate changes.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [x] I have read the CONTRIBUTING document.
- [ ] I have added tests to cover my changes.
- [x] I have tested the changes and verified that they work and don't break anything (as well as I can manage).