os, runtime: enable os.Stdin for baremetal target

This commit is contained in:
sago35
2022-03-29 08:25:04 +09:00
committed by Ron Evans
parent 97842b367c
commit 39805bca45
26 changed files with 327 additions and 2 deletions
+12
View File
@@ -111,6 +111,18 @@ func putchar(c byte) {
machine.Serial.WriteByte(c)
}
func getchar() byte {
for machine.Serial.Buffered() == 0 {
Gosched()
}
v, _ := machine.Serial.ReadByte()
return v
}
func buffered() int {
return machine.Serial.Buffered()
}
var timerWakeup volatile.Register8
func ticks() timeUnit {