File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ void deviceFirmwareActionMenu(DEVICE_FIRMWARE_CTX * ctx)
7474 systemPrintf (" x) Exit\r\n " );
7575
7676 // Discard the input
77- serialInputClear ();
77+ serialInputClear (&Serial );
7878
7979 // Output the prompt
8080 systemPrintf (" Select an action: " );
@@ -426,7 +426,7 @@ void deviceFirmwareDeviceListMenu(DEVICE_FIRMWARE_CTX * ctx)
426426 systemPrintf (" x) Exit\r\n " );
427427
428428 // Discard the input
429- serialInputClear ();
429+ serialInputClear (&Serial );
430430 ctx->_buffer [0 ] = 0 ;
431431 ctx->_validDataBytes = 0 ;
432432
@@ -492,7 +492,7 @@ void deviceFirmwareFileListMenu(DEVICE_FIRMWARE_CTX * ctx)
492492 systemPrintf (" x) Exit\r\n " );
493493
494494 // Discard the input
495- serialInputClear ();
495+ serialInputClear (&Serial );
496496 ctx->_buffer [0 ] = 0 ;
497497 ctx->_validDataBytes = 0 ;
498498
Original file line number Diff line number Diff line change @@ -946,7 +946,7 @@ void reportFatalError(const char *errorMsg)
946946 displayHalt ();
947947
948948 // Empty the FIFO of any incoming data
949- serialInputClear ();
949+ serialInputClear (&Serial );
950950
951951 lastDisplayMsec = millis () - MILLISECONDS_IN_A_DAY ;
952952 while (1 )
Original file line number Diff line number Diff line change @@ -1568,8 +1568,8 @@ int countAppPartitions()
15681568// ----------------------------------------
15691569// Discard any input data
15701570// ----------------------------------------
1571- void serialInputClear ()
1571+ void serialInputClear (Stream * stream )
15721572{
1573- while (Serial. available ())
1574- Serial. read ();
1573+ while (stream-> available ())
1574+ stream-> read ();
15751575}
You can’t perform that action at this time.
0 commit comments