diff --git a/p1load.c b/p1load.c index 0c49f9a..0a81013 100644 --- a/p1load.c +++ b/p1load.c @@ -45,6 +45,7 @@ int main(int argc, char *argv[]) int baudRate, baudRate2, verbose, terminalMode, pstMode, i; int loadType = LOAD_TYPE_RUN; int loadTypeOptionSeen = FALSE; + int allowExitSequence = FALSE; int actionSpecified = FALSE; char *file = NULL; long imageSize; @@ -138,6 +139,9 @@ int main(int argc, char *argv[]) ShowPorts(&state, PORT_PREFIX); actionSpecified = TRUE; break; + case 'q': + allowExitSequence = TRUE; + break; case 'r': if (!loadTypeOptionSeen) { loadTypeOptionSeen = TRUE; @@ -236,7 +240,7 @@ int main(int argc, char *argv[]) fflush(stdout); if (baudRate2 != baudRate) serial_baud(baudRate2); - terminal_mode(FALSE, pstMode); + terminal_mode(allowExitSequence, pstMode); } return 0; @@ -253,6 +257,7 @@ usage: p1load\n\ [ -e ] write a bootable image to EEPROM\n\ [ -p port ] serial port (default is to auto-detect the port)\n\ [ -P ] list available serial ports\n\ + [ -q ] quit on the exit sequence (0xff, 0x00, status)\n\ [ -r ] run the program after loading (default)\n\ [ -t ] enter terminal mode after running the program\n\ [ -T ] enter PST-compatible terminal mode\n\