-
Notifications
You must be signed in to change notification settings - Fork 252
Labels
bugSomething isn't workingSomething isn't working
Description
I can't quite tell where the break is happening, but the uno-timer example no longer seems to work. It seems to be due to a combination of Pin<Output, Dynamic>, calling the toggle method and using MaybeUninit.
If I change the pin declaration to a static pin Pin<Output, PB7> and remove the.downgrade(), the example works again.
I've also tried moving the interrupt code into a main loop, but again it only works with a static pin or with separate set_high/set_low calls.
This works:
// in main()
loop {
let state = unsafe {
&mut *INTERRUPT_STATE.as_mut_ptr()
};
state.blinker.set_high();
delay_ms(100);
state.blinker.set_low();
delay_ms(100);
}But this doesn't:
// in main()
loop {
let state = unsafe {
&mut *INTERRUPT_STATE.as_mut_ptr()
};
state.blinker.toggle();
delay_ms(100);
}I'm still new to low level Rust, so I'd appreciate any (raw)pointers with regard to diagnosing this kind of issue. It might be related to #286.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working