machine/stm32: add support for stm32f103xx UART

Signed-off-by: Ron Evans <ron@hybridgroup.com>
This commit is contained in:
Ron Evans
2018-12-13 16:12:33 +01:00
committed by Ayke van Laethem
parent a830451426
commit 47b667a4b8
6 changed files with 264 additions and 82 deletions
-21
View File
@@ -2,14 +2,8 @@
package runtime
import (
"device/arm"
)
type timeUnit int64
const tickMicros = 1 // TODO
//go:export Reset_Handler
func main() {
preinit()
@@ -17,18 +11,3 @@ func main() {
mainWrapper()
abort()
}
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
}