mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-04 02:57:46 +00:00
stm32: initial support
This commit is contained in:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user