rp2pio: Allow background_write(None) to terminate after complete loop

This commit is contained in:
Jeff Epler 2022-05-06 14:21:09 -05:00
parent a9d929627a
commit 1a9034ff7c
No known key found for this signature in database
GPG Key ID: D5BF15AB975AB4DE

View File

@ -917,7 +917,7 @@ bool common_hal_rp2pio_statemachine_background_write(rp2pio_statemachine_obj_t *
self->loop = *loop;
self->pending_buffers = pending_buffers;
if (self->dma_completed) {
if (self->dma_completed && self->once.info.len) {
rp2pio_statemachine_dma_complete(self, SM_DMA_GET_CHANNEL(pio_index, sm));
self->dma_completed = false;
}