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

Inky what #14

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Inky what #14

wants to merge 3 commits into from

Conversation

Thra11
Copy link

@Thra11 Thra11 commented Jun 24, 2020

Draft as I still need to test this specific combination: I had bumped the embedded-graphics dependency in the branch I developed and tested the changes on: This branch drops the version bump, but I haven't yet refactored my application to use the old API in order to test that this still works.

Updates to display.rs are mostly based on a recent version of pimoroni's python library. Need to double check that all the constants which I've used aren't display-specific. There's also some display-variant-specific code in the python library which I haven't copied yet:
https://github.com/pimoroni/inky/blob/feb2303e377badbf4cf940e8e5e309da6a2e5168/library/inky/inky.py#L291-L294
Given that this ssd1675 crate already requires the user to provide the correct LUT for their display, we may also need to have them pass in the SourceDrivingVoltage values as well. It might be nice to provide a separate inky crate at some point with all the LUTs and display-specific knowledge.

The other changes are to allow the 400x300 resolution of the what, including widening the cols type from u8 to u16, and fixing some multiplication overflows.

I did wonder whether MAX_GATE_OUTPUTS, MAX_SOURCE_OUTPUTS and the assertions based on them are really meaningful. As far as I can tell, they don't represent any limitation of the chip itself, nor do they represent a resolution above which the code no longer works (e.g. due to overflows, etc.). Having said that, I suppose they do represent the highest resolution which has been tested, so if a higher-resolution version comes out in future, then the user is warned that they are responsible for confirming that the calculations are still valid.

@Thra11
Copy link
Author

Thra11 commented Jun 24, 2020

One potentially confusing thing is that this crate is named after the ssd1675, but these changes would make it work with what I assume is the ssd1619.

(I guess the MAX_ constants make more sense if it's ssd1675-specific)

Thra11 added 2 commits June 24, 2020 16:25
Type of cols changed from u8 -> u16 throughout.
Max values increased to what resolution of 400x300.
self.config.write_vcom.execute(&mut self.interface)?;

// POR is HiZ. Need pull from config
// Command::BorderWaveform(u8).execute(&mut self.interface)?;
Command::BorderWaveform(0b00110001).execute(&mut self.interface)?;
Copy link
Author

Choose a reason for hiding this comment

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

Instead of / in addition to calling this in init, it might be nice to expose this via a set_border function.

@wezm
Copy link
Owner

wezm commented Aug 13, 2020

I've ordered an Inky wHAT to try this out. I'm also looking to reorganise the crate a bit. I'd like to make it a bit less controller specific so that it captures the ssd1675 and others such as the ssd1619 you mention. I'd also like to move out inky specific stuff into a separate crate so that it's easier to deal with the different size and colour variants.

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.

2 participants