Skip to content

Commit 1b62921

Browse files
committed
Run background tasks before non-dma transfer
1 parent 9bceb32 commit 1b62921

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ports/raspberrypi/common-hal/rp2pio/StateMachine.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,7 @@ static bool _transfer(rp2pio_statemachine_obj_t *self,
545545
size_t rx_remaining = in_len;
546546
size_t tx_remaining = out_len;
547547

548+
RUN_BACKGROUND_TASKS; // clear any pending tasks before writing the small number of bytes
548549
while (rx_remaining || tx_remaining) {
549550
if (tx_remaining && !pio_sm_is_tx_fifo_full(self->pio, self->state_machine)) {
550551
*tx_destination = *data_out;

0 commit comments

Comments
 (0)