mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-11 14:33:41 +00:00
runtime: use waitForEvents when appropriate
This is better than using the wfe or wfi instruction directly as it can be replaced with build tags.
This commit is contained in:
committed by
Ron Evans
parent
32c7f3baf9
commit
b75f042c23
@@ -292,7 +292,7 @@ func timerSleep(ticks uint32) bool {
|
||||
sam.RTC_MODE0.INTENSET.SetBits(sam.RTC_MODE0_INTENSET_CMP0)
|
||||
|
||||
wait:
|
||||
arm.Asm("wfe")
|
||||
waitForEvents()
|
||||
if timerWakeup.Get() != 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user