From f82577c56f8525fc56aa6a0b71ec62435a4c13ba Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Mon, 25 Apr 2011 17:58:37 -0400 Subject: Minor test-session.cpp fixup --- examples/test-session.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'examples') diff --git a/examples/test-session.cpp b/examples/test-session.cpp index 01dd184..d97d0ca 100644 --- a/examples/test-session.cpp +++ b/examples/test-session.cpp @@ -356,19 +356,18 @@ void cmd_serial1_echo(void) { "early."); while (!SerialUSB.available()) ; - SerialUSB.read(); + if (SerialUSB.read() == ESC) return; SerialUSB.println("Testing 115200 baud on USART1."); serial_echo_test(&Serial1, 115200); - if (SerialUSB.read() == ESC) return; + if (SerialUSB.read() == ESC) return; SerialUSB.println("Testing 57600 baud on USART1."); serial_echo_test(&Serial1, 57600); - if (SerialUSB.read() == ESC) return; + if (SerialUSB.read() == ESC) return; SerialUSB.println("Testing 9600 baud on USART1."); serial_echo_test(&Serial1, 9600); - if (SerialUSB.read() == ESC) return; } void cmd_gpio_monitoring(void) { -- cgit v1.2.3