Merge pull request #4309 from jepler/rp2040-interrupt-pio

rp2pio: allow keyboard interrupt while waiting for tx fifo to empty (& stall)
This commit is contained in:
Scott Shawcroft 2021-03-02 08:55:27 -08:00 committed by GitHub
commit 2651e15a52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -673,6 +673,9 @@ static bool _transfer(rp2pio_statemachine_obj_t *self,
while (!pio_sm_is_tx_fifo_empty(self->pio, self->state_machine) ||
(self->wait_for_txstall && (self->pio->fdebug & stall_mask) == 0)) {
RUN_BACKGROUND_TASKS;
if (mp_hal_is_interrupted()) {
break;
}
}
}
return true;