mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-06 03:53:42 +00:00
machine/rp2040: implement UART0/UART1, can be used on all rp2040 boards
Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
@@ -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() {}
|
||||
|
||||
Reference in New Issue
Block a user