Add serial initialization

This commit is contained in:
sago35
2022-05-17 08:34:51 +09:00
parent d9d29d3c68
commit 674b3b966f
4 changed files with 11 additions and 0 deletions
+3
View File
@@ -5,3 +5,6 @@ package machine
// Serial is a null device: writes to it are ignored.
var Serial = NullSerial{}
func InitSerial() {
}
+4
View File
@@ -5,3 +5,7 @@ package machine
// Serial is implemented via the default (usually the first) UART on the chip.
var Serial = DefaultUART
func InitSerial() {
Serial.Configure(UARTConfig{})
}
+3
View File
@@ -5,3 +5,6 @@ package machine
// Serial is implemented via USB (USB-CDC).
var Serial = USB
func InitSerial() {
}
+1
View File
@@ -34,6 +34,7 @@ func init() {
//}
machine.InitUSB()
machine.InitSerial()
}
func putchar(c byte) {