-
Notifications
You must be signed in to change notification settings - Fork 65
Add a nonblocking LED display driver #14
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
Conversation
New modules: display display::image Adds a dependency on the tiny-led-matrix crate.
Demonstrates the display module.
This looks good. Two things I'm not too happy about is funny formatting in some places and the custom timer implementation, it would be great if we could work that into the regular timer code. |
Formatting: would it make sense for me to run the whole thing through rustfmt? With the default settings? Can you say more about where the timer code could move to? |
Use the fact that TIMER0, TIMER1, and TIMER2 are all Deref <Target = nrf51::timer0::RegisterBlock> to avoid having to implement everything three times.
For what it's worth, I've pushed a much simpler version of |
Yes, please. |
The timer code lives mostly in the underlying There're a number of issues and PRs floating around here and in the |
I've run rustfmt. |
I've looked at the embedded-hal timers. The current timer-related traits aren't suitable:
Supporting interrupts looks like the more serious limitation. I could propose something for inclusion in nrf51-hal based on what's currently in (I've read rust-embedded/embedded-hal#57.) |
@mattheww Providing platform specific interfaces on top of the Of course if there was a way to create a universal abstraction over that would be excellent but that is entirely optional... |
Closing in favour of draft PR #16 |
This is the core of the code from https://github.com/mattheww/microbit-blinkenlights, as discussed in #13.
I've left out the font and scrolling support to start with.
Notes:
I haven't done anything with the existing 'blocking' led.rs module.
The rustdoc is using RFC1946-style links, which aren't stable but do work on docs.rs . I can remove those if you don't want to require nightly rustdoc.