-
Notifications
You must be signed in to change notification settings - Fork 143
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
Add support for GDEH0154D67 (aka epd1in54_v2) #106
Conversation
The main changes from the previous version of the display, are the lookup tables and the initialization procedures. Also, partial vs. full updates have a slightly different logic. The changes were mostly ported from the vendor driver (EPAPER.c) as well as Waveshare example driver (EPD_1in54_V2.cpp). Both drivers are released under public "use at will" license. This was tested as: ``` use epd_waveshare::{epd1in54_v2::*, prelude::*}; let mut epd = Epd1in54::new(&mut spi, cs_pin, busy_in, dc, rst, &mut delay)?; epd.set_lut(&mut spi, Some(RefreshLut::Full))?; epd.clear_frame(&mut spi, &mut delay)?; epd.display_frame(&mut spi, &mut delay)?; // display cleared, yay! let mut display = Display1in54::default(); let bmp: Bmp<BinaryColor> = Bmp::from_slice(light_data)?; let image = Image::new(&bmp, Point::zero()); image.draw(&mut display)?; epd.set_lut(&mut spi, Some(RefreshLut::Quick))?; epd.update_frame(&mut spi, &display.buffer(), &mut delay)?; epd.display_frame(&mut spi, &mut delay)?; // display shows image ```
Question to the maintainer regarding this patch: The file |
Yes this sounds good, if they behave the same way. |
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.
Thanks for the PR.
It nearly looks ready to merge besides the move of the graphics file and the LUTs.
Avoid code duplication and ensure that future fixes and additions to the Display implementation are applied to both displays.
These tables are specific to that display, so no need to expose them to others.
I believe I addressed all the change requests. Let me know if there's anything else that should be addressed before merging. |
I think the new constants/LUTs file might be missing |
Duh! Sorry about that. Just added it. |
Thanks. Now I believe it just needs the cargo fmt once more. |
Thanks for your work 🥳 |
:o!!! Awesome work! Thank you! |
The main changes from the previous version of the display, are the
lookup tables and the initialization procedures. Also, partial vs. full
updates have a slightly different logic.
The changes were mostly ported from the vendor driver (EPAPER.c) as well
as Waveshare example driver (EPD_1in54_V2.cpp). Both drivers are
released under public "use at will" license.
This was tested as:
#102 #79