Skip to content

Commit f776749

Browse files
committed
Key off len, not buf, to decide if anything to DMA
1 parent 1a9034f commit f776749

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -894,8 +894,8 @@ bool common_hal_rp2pio_statemachine_background_write(rp2pio_statemachine_obj_t *
894894
uint8_t pio_index = pio_get_index(self->pio);
895895
uint8_t sm = self->state_machine;
896896

897-
int pending_buffers = (once->info.buf != NULL) + (loop->info.buf != NULL);
898-
if (!once->info.buf) {
897+
int pending_buffers = (once->info.len != 0) + (loop->info.len != 0);
898+
if (!once->info.len) {
899899
once = loop;
900900
}
901901

0 commit comments

Comments
 (0)