mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-21 22:32:29 +00:00
avr: sleep fix
This commit is contained in:
parent
6ee153a3e2
commit
b0071c5070
@ -57,10 +57,13 @@ mod thread {
|
||||
|
||||
loop {
|
||||
unsafe {
|
||||
avr_device::interrupt::disable();
|
||||
if SIGNAL_WORK_THREAD_MODE.swap(false, Ordering::SeqCst) {
|
||||
self.inner.poll();
|
||||
} else {
|
||||
avr_device::interrupt::enable();
|
||||
avr_device::asm::sleep();
|
||||
} else {
|
||||
avr_device::interrupt::enable();
|
||||
self.inner.poll();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user