machine/rp2040: implement UART0/UART1, can be used on all rp2040 boards

Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
deadprogram
2021-06-09 19:11:42 +02:00
committed by Ron Evans
parent b406b81416
commit 87e48c1057
6 changed files with 192 additions and 8 deletions
+5
View File
@@ -4,6 +4,8 @@ package runtime
import (
"device/arm"
"machine"
)
// machineTicks is provided by package machine.
@@ -39,6 +41,7 @@ func waitForEvents() {
}
func putchar(c byte) {
machine.Serial.WriteByte(c)
}
// machineInit is provided by package machine.
@@ -46,6 +49,8 @@ func machineInit()
func init() {
machineInit()
machine.Serial.Configure(machine.UARTConfig{})
}
func postinit() {}