-
Notifications
You must be signed in to change notification settings - Fork 10
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
Refactor and add support for Inky Impression 7.3" #49
base: master
Are you sure you want to change the base?
Refactor and add support for Inky Impression 7.3" #49
Conversation
Fixes a off by one error
Just put a comment instead of an actual call in case we want to restore the calls later.
Jax/inky impression
There's no code changes, only the version number has been updated: https://github.com/elixir-circuits/circuits_gpio/blob/cc7d77479a4d2ffba1a24962ad067f4680003de4/CHANGELOG.md#v100---10-20-2021
Support circuits_gpio 1.0
Add support for buttons on Inky Impression
There's no breaking changes except for a small one in circuits spi 1.4.0 that says "Remove Erlang convenience functions since no one used them"
I did some searching and found |
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.
Lookin great! Here's a first pass with plenty of small suggestions and some questions. I don't think anything here is a blocker really, but I'd be happy to see some of these changes.
} | ||
end | ||
|
||
# WARNING: This is untested on actual hardware |
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.
Hmm, I wonder if Pimoroni would be willing to send us one? I went ahead and wrote a quick note to their support team to see if there's a chance.
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.
Pimoroni is sending me a 4" Impression for testing 🎉
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.
Wow, that's great!!
end | ||
|
||
# | ||
# pipe-able wrappers |
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.
Since these are re-used, does it make sense to put them into a common helper module?
|
||
spi_address = "spidev0." <> to_string(pin_mappings[:spi]) | ||
|
||
IO.puts("opening DC pin") |
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.
In other places, we're using Logger
. Probably best to be consistent and use Logger
here too.
spi_write(state, @spi_command, value) | ||
end | ||
|
||
require Logger |
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.
Move up.
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.
Lookin great! Here's a first pass with plenty of small suggestions and some questions. I don't think anything here is a blocker really, but I'd be happy to see some of these changes.
So glad to see this continues to get usage/updates, nothing constructive to add, really. ✌️ |
Well spotted! Updated in 975d63b |
Also improve the moduledocs
The Inky Impression 7.3" uses a different chip than the Impression 5.7" and 4" so it required a new HAL module.
To fit this new chip support into the library I also undertook a refactor
I have tested this on (using https://github.com/axelson/inky_tester):
This merges the contents of the
impression
branch which also includes code/work from @lawik and @jasonmj ❤️