From f7d3645d88ace0272d5510266ec8c11fb34c3a81 Mon Sep 17 00:00:00 2001 From: Hamish Poole Date: Sat, 30 Jul 2022 18:25:09 +1000 Subject: [PATCH] Copy editing and UART clarification. --- 05_drivers_gpio_uart/README.md | 1 + common/serial/minipush.rb | 4 ++-- common/serial/miniterm.rb | 8 ++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/05_drivers_gpio_uart/README.md b/05_drivers_gpio_uart/README.md index 555ac031..85f53650 100644 --- a/05_drivers_gpio_uart/README.md +++ b/05_drivers_gpio_uart/README.md @@ -81,6 +81,7 @@ $ DEV_SERIAL=/dev/tty.usbserial-0001 make miniterm 7. Connect the USB serial to your host PC. - Wiring diagram at [top-level README](../README.md#-usb-serial-output). + - \## **NOTE** ## TX (transmit) wire connects to the RX (receive) pin. - Make sure that you **DID NOT** connect the power pin of the USB serial. Only RX/TX and GND. 8. Connect the RPi to the (USB) power cable and observe the output: diff --git a/common/serial/minipush.rb b/common/serial/minipush.rb index 62feebf2..262ce20a 100755 --- a/common/serial/minipush.rb +++ b/common/serial/minipush.rb @@ -82,7 +82,7 @@ class MiniPush < MiniTerm # override def handle_reconnect(_error) - connetion_reset + connection_reset puts puts "[#{@name_short}] ⚡ " \ @@ -107,7 +107,7 @@ class MiniPush < MiniTerm rescue StandardError => e handle_unexpected(e) ensure - connetion_reset + connection_reset puts puts "[#{@name_short}] Bye 👋" end diff --git a/common/serial/miniterm.rb b/common/serial/miniterm.rb index 996e1d3f..038ed978 100755 --- a/common/serial/miniterm.rb +++ b/common/serial/miniterm.rb @@ -88,7 +88,7 @@ class MiniTerm end end - def connetion_reset + def connection_reset @target_serial&.close @target_serial = nil @host_console.cooked! @@ -96,14 +96,14 @@ class MiniTerm # When the serial lost power or was removed during R/W operation. def handle_reconnect(_error) - connetion_reset + connection_reset puts puts "[#{@name_short}] ⚡ #{'Connection Error: Reinsert the USB serial again'.light_red}" end def handle_unexpected(error) - connetion_reset + connection_reset puts puts "[#{@name_short}] ⚡ #{"Unexpected Error: #{error.inspect}".light_red}" @@ -120,7 +120,7 @@ class MiniTerm rescue StandardError => e handle_unexpected(e) ensure - connetion_reset + connection_reset puts puts "[#{@name_short}] Bye 👋" end