Fixup the status output a bit.
This commit is contained in:
parent
7f4f8c7fd4
commit
7c04cce7d9
4
p1load.c
4
p1load.c
@ -75,7 +75,7 @@ static void cb_progress(void *data, int phase, int current)
|
|||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
break;
|
break;
|
||||||
case LOAD_PHASE_EEPROM_WRITE:
|
case LOAD_PHASE_EEPROM_WRITE:
|
||||||
printf("\rLoading hub memory ... OK \nWriting EEPROM ... ");
|
printf(" -- OK\nWriting EEPROM ... ");
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
break;
|
break;
|
||||||
case LOAD_PHASE_EEPROM_VERIFY:
|
case LOAD_PHASE_EEPROM_VERIFY:
|
||||||
@ -83,7 +83,7 @@ static void cb_progress(void *data, int phase, int current)
|
|||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
break;
|
break;
|
||||||
case LOAD_PHASE_DONE:
|
case LOAD_PHASE_DONE:
|
||||||
printf("OK\n");
|
printf(" -- OK\n");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -57,6 +57,10 @@ int PL_LoadSpinBinary(PL_state *state, int loadType, uint8_t *image, int size)
|
|||||||
}
|
}
|
||||||
TComm(state);
|
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 */
|
/* wait for an ACK indicating a successful load */
|
||||||
if ((sts = WaitForAck(state, CHECKSUM_RETRIES)) < 0)
|
if ((sts = WaitForAck(state, CHECKSUM_RETRIES)) < 0)
|
||||||
return LOAD_STS_TIMEOUT;
|
return LOAD_STS_TIMEOUT;
|
||||||
@ -91,6 +95,7 @@ int PL_LoadSpinBinary(PL_state *state, int loadType, uint8_t *image, int size)
|
|||||||
if (state->progress)
|
if (state->progress)
|
||||||
(*state->progress)(state->progressData, LOAD_PHASE_DONE, 0);
|
(*state->progress)(state->progressData, LOAD_PHASE_DONE, 0);
|
||||||
|
|
||||||
|
/* load completed successfully */
|
||||||
return LOAD_STS_OK;
|
return LOAD_STS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user