stm32: initial support

This commit is contained in:
Ayke van Laethem
2018-09-22 01:51:44 +02:00
parent 12298d23a7
commit dd5b5a381c
9 changed files with 153 additions and 1 deletions
+34
View File
@@ -0,0 +1,34 @@
// +build stm32
package runtime
import (
"device/arm"
)
type timeUnit int64
const tickMicros = 1 // TODO
//go:export Reset_Handler
func handleReset() {
main()
}
func init() {
}
func putchar(c byte) {
// TODO
}
func sleepTicks(d timeUnit) {
// TODO: use a real timer here
for i := 0; i < int(d/535); i++ {
arm.Asm("")
}
}
func ticks() timeUnit {
return 0 // TODO
}