protect unconnected USB-CDC from being used
found a few more places where Serial was used without first checking if its connected. Arduino docs: `if (Serial)` indicates whether or not the USB CDC serial connection is open. For all non-USB CDC ports, this will always return true
This commit is contained in:
@@ -543,6 +543,8 @@ void show_psram_info_part2(void)
|
||||
|
||||
void showRealSpeed() {
|
||||
//Serial.begin(115200);
|
||||
if (!Serial) return; // Avoid writing to unconnected USB-CDC
|
||||
|
||||
Serial.flush();
|
||||
Serial.println(F("\n"));
|
||||
for(int aa=0; aa<65; aa++) Serial.print("="); Serial.println();
|
||||
|
||||
Reference in New Issue
Block a user