all: change special type __volatile to pragma //go:volatile

This is one step towards removing unnecessary special casts in most
cases. It is also part of removing as much magic as possible from the
compiler (the pragma is explicit, the special name is not).
This commit is contained in:
Ayke van Laethem
2018-09-28 13:17:03 +02:00
parent 0e813c4cb7
commit 8d170d3bd2
6 changed files with 52 additions and 30 deletions
+3 -2
View File
@@ -81,9 +81,10 @@ func ticks() timeUnit {
return timestamp
}
type __volatile bool
//go:volatile
type isrFlag bool
var rtc_wakeup __volatile
var rtc_wakeup isrFlag
func rtc_sleep(ticks uint32) {
nrf.RTC0.INTENSET = nrf.RTC_INTENSET_COMPARE0