mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-16 10:43:29 +00:00
examples: use default UART settings in echo example
Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
@@ -7,15 +7,13 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
// change these to test a different UART or pins if available
|
|
||||||
var (
|
var (
|
||||||
uart = machine.Serial
|
uart = machine.Serial
|
||||||
tx = machine.UART_TX_PIN
|
|
||||||
rx = machine.UART_RX_PIN
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
uart.Configure(machine.UARTConfig{TX: tx, RX: rx})
|
// use default settings for UART
|
||||||
|
uart.Configure(machine.UARTConfig{})
|
||||||
uart.Write([]byte("Echo console enabled. Type something then press enter:\r\n"))
|
uart.Write([]byte("Echo console enabled. Type something then press enter:\r\n"))
|
||||||
|
|
||||||
input := make([]byte, 64)
|
input := make([]byte, 64)
|
||||||
|
|||||||
Reference in New Issue
Block a user