-
-
Notifications
You must be signed in to change notification settings - Fork 39.9k
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
[Driver] ILI9486 on Quantum Painter #18521
Conversation
I'll have a look when I can, but at first glance I'd say that the |
I kept the define for firmware-size concerns. However I've just pushed a change from conditional vtable to having a whole new factory method for the shift-register variant. This gives a runtime option for having both kinds at the same time at the cost of an unused factory if you only have an screen with the hardware quirk, which isn't dramatic imo |
Can I please get this reviewed to merge it before some conflicts appear in the future? |
Latest refactor is still working on regular SPI devices, at least with the small testing i've done on my ILI9163 and ILI9341. But has broken the |
Code has been fixed, simplified and abstracted now. Should be good to merge |
Thank you for your contribution! |
Many months later, but i think this is ready for a review. Code is as clean as i could manage, driver works flawlessly as far as i've been playing with it. It's the display used on this video Sorry for the force-push mess up, but didnt feel like taking the old branch up to date |
I definitely would like an eink display — could this be reviewed and merged (after the drift to merge-Target has been resolved)? |
Co-authored-by: Nick Brassel <nick@tzarc.org>
Description
This PR adds support for the ili9486 LCD screen into Quantum Painter, based on @tzarc's work and @sigprof's suggestions.I implemented an optional flag
#define QUANTUM_PAINTER_SPI_DC_RESET_SHIFT_REG_ENABLE
to handle this Waveshare module which has a hardware SPI->16 bit parallel converter that needs some special care.This way of handling it may be problematic on scenarios which have several screens, and the name could maybe be improvedFor this to work, the QP driver needed to get a new function addedsend_parameters
which sends values after the correspondingsend_command
. In most of the situations it will just be the same ascomms_send
but this addition allows to implement support for other screens with a similar circuit.^ This description is outdated
This code is based on tzarc's code for the ILI9486 chip, however I also added a new
vtable
which was needed for the code to run on my quirky hardware module (see link above).I made this by changing the
qp_comms_spi.c
file to abstract the common code instead of duplicating a good part of it.This way, the new
vtable
just wraps those functions passing the apropiate configuration arguments, with this approach we can easily add support for further extensions/variants in the future.To select whether to use the "normal" or this modified
vtable
, a boolean variable is passed to themake_spi_device
constructor function.vtable
is also used(needed) on my IL91874 driver ([Driver] IL91874 on Quantum Painter #19437)As far as I can test, existing code wasn't broken by these changes. Both my ILI9163 and ILI9341 still work just fine.
Types of Changes
Issues Fixed or Closed by This PR
Checklist