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 -3
View File
@@ -33,8 +33,8 @@ import (
"unsafe"
)
type __volatile uint32
type RegValue = __volatile
//go:volatile
type RegValue uint32
type __asm string
@@ -47,7 +47,7 @@ const (
// Nested Vectored Interrupt Controller (NVIC).
type NVIC_Type struct {
ISER [8]__volatile
ISER [8]RegValue
}
var NVIC = (*NVIC_Type)(unsafe.Pointer(uintptr(NVIC_BASE)))