This commit is contained in:
iceman1001 2020-01-24 16:28:39 +01:00
parent ef8cdc8bab
commit 6ad7f1ecf7

View file

@ -522,8 +522,17 @@ static int write_block(uint32_t address, uint8_t *data, uint32_t length) {
return ret; return ret;
} }
const char ice[] =
"...................................................................\n @@@ @@@@@@@ @@@@@@@@ @@@@@@@@@@ @@@@@@ @@@ @@@\n"
" @@! !@@ @@! @@! @@! @@! @@! @@@ @@!@!@@@\n !!@ !@! @!!!:! @!! !!@ @!@ @!@!@!@! @!@@!!@!\n"
" !!: :!! !!: !!: !!: !!: !!! !!: !!!\n : :: :: : : :: ::: : : : : : :: : \n"
" . .. .. . . .. ... . . . . . .. . \n"
;
// Write a file's segments to Flash // Write a file's segments to Flash
int flash_write(flash_file_t *ctx) { int flash_write(flash_file_t *ctx) {
int len = 0;
PrintAndLogEx(SUCCESS, "Writing segments for file: %s", ctx->filename); PrintAndLogEx(SUCCESS, "Writing segments for file: %s", ctx->filename);
for (int i = 0; i < ctx->num_segs; i++) { for (int i = 0; i < ctx->num_segs; i++) {
flash_seg_t *seg = &ctx->segments[i]; flash_seg_t *seg = &ctx->segments[i];
@ -552,7 +561,11 @@ int flash_write(flash_file_t *ctx) {
baddr += block_size; baddr += block_size;
length -= block_size; length -= block_size;
block++; block++;
if ( len < strlen(ice) )
fprintf(stdout, "%c", ice[len++]);
else
fprintf(stdout, "."); fprintf(stdout, ".");
fflush(stdout); fflush(stdout);
} }
PrintAndLogEx(NORMAL, " " _GREEN_("OK")); PrintAndLogEx(NORMAL, " " _GREEN_("OK"));