Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion p1load.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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\
Expand Down