serial: use common initialization for serial

This commit is contained in:
sago35
2022-07-05 21:53:44 +09:00
committed by Ron Evans
parent 7eaad62568
commit ff7c71c99c
22 changed files with 31 additions and 19 deletions
+4
View File
@@ -5,3 +5,7 @@ package machine
// Serial is a null device: writes to it are ignored.
var Serial = NullSerial{}
func InitSerial() {
Serial.Configure(UARTConfig{})
}
+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{})
}
+4
View File
@@ -5,3 +5,7 @@ package machine
// Serial is implemented via USB (USB-CDC).
var Serial = USB
func InitSerial() {
Serial.Configure(UARTConfig{})
}