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

The trait embedded_hal::delay::DelayNs is not implemented for Timer<microbit::nrf52833_pac::TIMER0> #437

Open
relia1 opened this issue Mar 8, 2024 · 1 comment

Comments

@relia1
Copy link

relia1 commented Mar 8, 2024

Configuration/Setup Information

  • Microbit v2 firmware v258
  • I have the nrf-rs/microbit repository pulled down locally with the microbit-common/Cargo.toml updated so nrf52833-hal v0.16.1 is being used
  • My local version of microbit is forked from this branch Update to embedded-hal 1.0. microbit#123

Steps to reproduce

  • Unzip attached .zip for the program I ran that ran into this
  • Pull down a version of microbit based on the above PR and update the Cargo.toml to point to nrf52833-hal v0.16.1
  • cargo run

Results

error[E0277]: the trait bound `Timer<microbit::nrf52833_pac::TIMER0>: embedded_hal::delay::DelayNs` is not satisfied
   --> src/main.rs:43:22
    |
43  |         display.show(&mut timer, fb, 100);
    |                 ---- ^^^^^^^^^^ the trait `embedded_hal::delay::DelayNs` is not implemented for `Timer<microbit::nrf52833_pac::TIMER0>`
    |                 |
    |                 required by a bound introduced by this call
    |
    = help: the trait `embedded_hal::delay::DelayNs` is implemented for `&mut T`
note: required by a bound in `microbit::display::blocking::Display::show`
   --> /Users/robert/open_source/microbit/microbit-common/src/display/blocking.rs:145:20
    |
145 |     pub fn show<D: DelayNs>(&mut self, delay: &mut D, led_display: [[u8; 5]; 5], duration_ms: u32) {
    |                    ^^^^^^^ required by this bound in `Display::show`

For more information about this error, try `rustc --explain E0277`.
error: could not compile `poll-buttons` (bin "poll-buttons") due to previous error

Expected

  • Expected the DelayNs trait to be implemented

Attached zip

DelayNs.zip

@qwandor
Copy link
Member

qwandor commented Mar 12, 2024

I tried to reproduce this locally with just the nrf52833-hal package and couldn't, so I suspect there is something weird going on with versions. I'll leave this open for now but please try again once we have released versions of everything.

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

No branches or pull requests

2 participants