The following fails, while the commented version works:
async fn blink(
blink::Context {
shared:
blink::SharedResources {
mut red_led,
mut usb_serial,
..
},
..
}: blink::Context,
) {
loop {
(&red_led, &usb_serial).lock(|led, s| {
led.toggle().unwrap();
let _ = s.write(b"fjdklsf");
});
// usb_serial.lock(|s| {
// red_led.lock(|led| {
// led.toggle().unwrap();
// let _ = s.write(b"fjdklsf");
// })
// });
Mono::delay(2u64.secs()).await;
}
}
I would have expected both of these to work.
The following fails, while the commented version works:
I would have expected both of these to work.