File tree Expand file tree Collapse file tree 3 files changed +3
-4
lines changed Expand file tree Collapse file tree 3 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -308,7 +308,7 @@ func timerSleep(ticks uint32) bool {
308308 sam .RTC_MODE0 .INTENSET .SetBits (sam .RTC_MODE0_INTENSET_CMP0 )
309309
310310wait:
311- arm . Asm ( "wfe" )
311+ waitForEvents ( )
312312 if timerWakeup .Get () != 0 {
313313 return true
314314 }
Original file line number Diff line number Diff line change @@ -292,7 +292,7 @@ func timerSleep(ticks uint32) bool {
292292 sam .RTC_MODE0 .INTENSET .SetBits (sam .RTC_MODE0_INTENSET_CMP0 )
293293
294294wait:
295- arm . Asm ( "wfe" )
295+ waitForEvents ( )
296296 if timerWakeup .Get () != 0 {
297297 return true
298298 }
Original file line number Diff line number Diff line change 33package runtime
44
55import (
6- "device/arm"
76 "device/nrf"
87 "machine"
98 "runtime/interrupt"
@@ -114,6 +113,6 @@ func rtc_sleep(ticks uint32) {
114113 }
115114 nrf .RTC1 .CC [0 ].Set ((nrf .RTC1 .COUNTER .Get () + ticks ) & 0x00ffffff )
116115 for rtc_wakeup .Get () == 0 {
117- arm . Asm ( "wfi" )
116+ waitForEvents ( )
118117 }
119118}
You can’t perform that action at this time.
0 commit comments