move uf2 led blink fast to ghostfat
This commit is contained in:
@ -280,6 +280,13 @@ int write_block(uint32_t block_no, uint8_t *data, bool quiet/*, WriteState *stat
|
||||
} else {
|
||||
// logval("write block at", bl->targetAddr);
|
||||
NRF_LOG_DEBUG("Write block at %x", bl->targetAddr);
|
||||
|
||||
static bool first_write = true;
|
||||
if ( first_write ) {
|
||||
first_write = false;
|
||||
led_blink_fast(true);
|
||||
}
|
||||
|
||||
flash_write(bl->targetAddr, bl->data, bl->payloadSize);
|
||||
}
|
||||
|
||||
@ -299,13 +306,7 @@ int write_block(uint32_t block_no, uint8_t *data, bool quiet/*, WriteState *stat
|
||||
state->numWritten++;
|
||||
}
|
||||
if (state->numWritten >= state->numBlocks) {
|
||||
// wait a little bit before resetting, to avoid Windows transmit error
|
||||
// https://github.com/Microsoft/uf2-samd21/issues/11
|
||||
if (!quiet) {
|
||||
|
||||
}
|
||||
|
||||
// flush last blocks if needed
|
||||
// flush last blocks
|
||||
flash_flush();
|
||||
|
||||
uf2_write_complete(state->numBlocks);
|
||||
|
Reference in New Issue
Block a user