Skip to content

Commit a9d41bb

Browse files
committed
fix bugs noticed in review by @relic-se
1 parent f593813 commit a9d41bb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ports/raspberrypi/audio_dma.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ void __not_in_flash_func(isr_dma_0)(void) {
488488
}
489489
if (MP_STATE_PORT(background_pio_read)[i] != NULL) {
490490
rp2pio_statemachine_obj_t *pio = MP_STATE_PORT(background_pio_read)[i];
491-
rp2pio_statemachine_dma_complete_write(pio, i);
491+
rp2pio_statemachine_dma_complete_read(pio, i);
492492
}
493493
if (MP_STATE_PORT(background_pio_write)[i] != NULL) {
494494
rp2pio_statemachine_obj_t *pio = MP_STATE_PORT(background_pio_write)[i];

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1392,9 +1392,9 @@ bool common_hal_rp2pio_statemachine_background_read(rp2pio_statemachine_obj_t *s
13921392

13931393
common_hal_mcu_disable_interrupts();
13941394
// Acknowledge any previous pending interrupt
1395-
dma_hw->ints1 |= 1u << channel_read;
1395+
dma_hw->ints0 |= 1u << channel_read;
13961396
MP_STATE_PORT(background_pio_read)[channel_read] = self;
1397-
dma_hw->inte1 |= 1u << channel_read;
1397+
dma_hw->inte0 |= 1u << channel_read;
13981398
irq_set_mask_enabled(1 << DMA_IRQ_0, true);
13991399
dma_start_channel_mask((1u << channel_read));
14001400
common_hal_mcu_enable_interrupts();

0 commit comments

Comments
 (0)