Fixup the status output a bit.

This commit is contained in:
David Betz 2015-02-08 09:56:42 -05:00
parent 7f4f8c7fd4
commit 7c04cce7d9
2 changed files with 7 additions and 2 deletions

View File

@ -75,7 +75,7 @@ static void cb_progress(void *data, int phase, int current)
fflush(stdout);
break;
case LOAD_PHASE_EEPROM_WRITE:
printf("\rLoading hub memory ... OK \nWriting EEPROM ... ");
printf(" -- OK\nWriting EEPROM ... ");
fflush(stdout);
break;
case LOAD_PHASE_EEPROM_VERIFY:
@ -83,7 +83,7 @@ static void cb_progress(void *data, int phase, int current)
fflush(stdout);
break;
case LOAD_PHASE_DONE:
printf("OK\n");
printf(" -- OK\n");
break;
default:
break;

View File

@ -57,6 +57,10 @@ int PL_LoadSpinBinary(PL_state *state, int loadType, uint8_t *image, int size)
}
TComm(state);
/* report load of program code finished */
if (state->progress)
(*state->progress)(state->progressData, LOAD_PHASE_PROGRAM, size);
/* wait for an ACK indicating a successful load */
if ((sts = WaitForAck(state, CHECKSUM_RETRIES)) < 0)
return LOAD_STS_TIMEOUT;
@ -91,6 +95,7 @@ int PL_LoadSpinBinary(PL_state *state, int loadType, uint8_t *image, int size)
if (state->progress)
(*state->progress)(state->progressData, LOAD_PHASE_DONE, 0);
/* load completed successfully */
return LOAD_STS_OK;
}