mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-12 06:53:40 +00:00
runtime: update to avoid //go:volatile
There was exactly one change in the output of the smoke tests: examples/test. However, it still runs just fine on a PCA10040.
This commit is contained in:
committed by
Ron Evans
parent
9673ad3774
commit
c84c625585
@@ -7,6 +7,7 @@ package runtime
|
||||
|
||||
import (
|
||||
"device/arm"
|
||||
"runtime/volatile"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
@@ -36,12 +37,9 @@ func ticks() timeUnit {
|
||||
return timestamp
|
||||
}
|
||||
|
||||
//go:volatile
|
||||
type regValue uint32
|
||||
|
||||
// UART0 output register.
|
||||
var stdoutWrite *regValue = (*regValue)(unsafe.Pointer(uintptr(0x4000c000)))
|
||||
var stdoutWrite = (*volatile.Register8)(unsafe.Pointer(uintptr(0x4000c000)))
|
||||
|
||||
func putchar(c byte) {
|
||||
*stdoutWrite = regValue(c)
|
||||
stdoutWrite.Set(uint8(c))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user