Skip to content
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 Epd2in13b v4 #145

Merged
merged 8 commits into from
Oct 30, 2024
Merged

Conversation

tommy-gilligan
Copy link
Contributor

I saw #138 . I'm not too sure whether V4 makes sense as a separate driver or not. I did try getting V2 driver working with V4 display with as few as changes as possible. As far as I can tell, there are a few more changes involved for V3->V4 than there is V2->V3 but it doesn't rule out a shared driver.

I added some tests to help me understand TriColor better (but I don't know if they're super necessary).

fn test_tricolor_bitmask() {
assert_eq!(
TriColor::Black.bitmask(false, 0),
(0b01111111, u16::from_le_bytes([0b00000000, 0b00000000]))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using LE here so that it's bw buffer and then chromatic buffer

@romarioferrao
Copy link

Hey @tommy-gilligan thanks for the work you did here. I just have a quick question. Does this code also work for waveshare 2in13 v4 (the black and white version)? Because I see there is not support for that particular device in edp-waveshare.

@tommy-gilligan
Copy link
Contributor Author

The EPD that I have is black/white/red. This works for that but it sounds like you have black/white only? I'm not sure if it works for that but worth giving it a try IMHO.

@caemor caemor merged commit 6b89b15 into caemor:main Oct 30, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants