Open Thra11 opened 4 years ago
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)
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.
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 fromu8
tou16
, 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.