Skip to content

Commit

Permalink
examples: use default UART settings in echo example
Browse files Browse the repository at this point in the history
Signed-off-by: deadprogram <[email protected]>
  • Loading branch information
deadprogram committed Nov 29, 2024
1 parent 392a709 commit 65b085a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/examples/echo/echo.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@ import (
"time"
)

// change these to test a different UART or pins if available
var (
uart = machine.Serial
tx = machine.UART_TX_PIN
rx = machine.UART_RX_PIN
)

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"))

input := make([]byte, 64)
Expand Down

0 comments on commit 65b085a

Please sign in to comment.