Check events_acquired
This commit is contained in:
parent
3a1ddd66c6
commit
0b066b22d1
@ -296,7 +296,7 @@ impl<'d, T: Instance> Spis<'d, T> {
|
|||||||
// Wait until CPU has acquired the semaphore.
|
// Wait until CPU has acquired the semaphore.
|
||||||
poll_fn(|cx| {
|
poll_fn(|cx| {
|
||||||
s.waker.register(cx.waker());
|
s.waker.register(cx.waker());
|
||||||
if r.semstat.read().bits() == 1 {
|
if r.events_acquired.read().bits() == 1 {
|
||||||
r.events_acquired.reset();
|
r.events_acquired.reset();
|
||||||
return Poll::Ready(());
|
return Poll::Ready(());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user