Key off len, not buf, to decide if anything to DMA

This commit is contained in:
Jeff Epler 2022-05-06 14:22:07 -05:00
parent 1a9034ff7c
commit f776749ca3
No known key found for this signature in database
GPG Key ID: D5BF15AB975AB4DE
1 changed files with 2 additions and 2 deletions

View File

@ -894,8 +894,8 @@ bool common_hal_rp2pio_statemachine_background_write(rp2pio_statemachine_obj_t *
uint8_t pio_index = pio_get_index(self->pio);
uint8_t sm = self->state_machine;
int pending_buffers = (once->info.buf != NULL) + (loop->info.buf != NULL);
if (!once->info.buf) {
int pending_buffers = (once->info.len != 0) + (loop->info.len != 0);
if (!once->info.len) {
once = loop;
}