8000 rp2pio: Fix writing where the stride was 2 or 4 · russbot/circuitpython@2227671 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2227671

Browse files
committed
rp2pio: Fix writing where the stride was 2 or 4
The wrong stride value was being checked.
1 parent 94d7bfb commit 2227671

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
@@ -640,9 +640,9 @@ static bool _transfer(rp2pio_statemachine_obj_t *self,
640640
while (tx_remaining && !pio_sm_is_tx_fifo_full(self->pio, self->state_machine)) {
641641
if (out_stride_in_bytes == 1) {
642642
*tx_destination = *data_out;
643-
} else if (in_stride_in_bytes == 2) {
643+
} else if (out_stride_in_bytes == 2) {
644644
*((uint16_t*) tx_destination) = *((uint16_t*) data_out);
645-
} else if (in_stride_in_bytes == 4) {
645+
} else if (out_stride_in_bytes == 4) {
646646
*((uint32_t*) tx_destination) = *((uint32_t*) data_out);
647647
}
648648
data_out += out_stride_in_bytes;

0 commit comments

Comments
 (0)
0