Skip to content

Commit f7d3645

Browse files
HamishPooleandre-richter
authored andcommitted
Copy editing and UART clarification.
1 parent 840f6d6 commit f7d3645

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

05_drivers_gpio_uart/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ $ DEV_SERIAL=/dev/tty.usbserial-0001 make miniterm
8181

8282
7. Connect the USB serial to your host PC.
8383
- Wiring diagram at [top-level README](../README.md#-usb-serial-output).
84+
- \## <u>**NOTE**</u> ## TX (transmit) wire connects to the RX (receive) pin.
8485
- Make sure that you **DID NOT** connect the power pin of the USB serial. Only RX/TX and GND.
8586
8. Connect the RPi to the (USB) power cable and observe the output:
8687

common/serial/minipush.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def send_payload
8282

8383
# override
8484
def handle_reconnect(_error)
85-
connetion_reset
85+
connection_reset
8686

8787
puts
8888
puts "[#{@name_short}] ⚡ " \
@@ -107,7 +107,7 @@ def run
107107
rescue StandardError => e
108108
handle_unexpected(e)
109109
ensure
110-
connetion_reset
110+
connection_reset
111111
puts
112112
puts "[#{@name_short}] Bye 👋"
113113
end

common/serial/miniterm.rb

+4-4
Original file line numberDiff line numberDiff line change
@@ -88,22 +88,22 @@ def terminal
8888
end
8989
end
9090

91-
def connetion_reset
91+
def connection_reset
9292
@target_serial&.close
9393
@target_serial = nil
9494
@host_console.cooked!
9595
end
9696

9797
# When the serial lost power or was removed during R/W operation.
9898
def handle_reconnect(_error)
99-
connetion_reset
99+
connection_reset
100100

101101
puts
102102
puts "[#{@name_short}] ⚡ #{'Connection Error: Reinsert the USB serial again'.light_red}"
103103
end
104104

105105
def handle_unexpected(error)
106-
connetion_reset
106+
connection_reset
107107

108108
puts
109109
puts "[#{@name_short}] ⚡ #{"Unexpected Error: #{error.inspect}".light_red}"
@@ -120,7 +120,7 @@ def run
120120
rescue StandardError => e
121121
handle_unexpected(e)
122122
ensure
123-
connetion_reset
123+
connection_reset
124124
puts
125125
puts "[#{@name_short}] Bye 👋"
126126
end

0 commit comments

Comments
 (0)