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:
Ayke van Laethem
2020-08-01 17:55:26 +02:00
committed by Ron Evans
parent 32c7f3baf9
commit b75f042c23
3 changed files with 3 additions and 4 deletions
+1 -1
View File
@@ -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
}