File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/rp2_common/hardware_dma Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -75,8 +75,9 @@ void dma_channel_cleanup(uint channel) {
7575 // Disable CHAIN_TO, and disable channel, so that it ignores any further triggers
7676 hw_write_masked ( & dma_hw -> ch [channel ].al1_ctrl , (channel << DMA_CH0_CTRL_TRIG_CHAIN_TO_LSB ) | (0u << DMA_CH0_CTRL_TRIG_EN_LSB ), DMA_CH0_CTRL_TRIG_CHAIN_TO_BITS | DMA_CH0_CTRL_TRIG_EN_BITS );
7777 // disable IRQs first as abort can cause spurious IRQs
78- dma_channel_set_irq0_enabled (channel , false);
79- dma_channel_set_irq1_enabled (channel , false);
78+ for (uint i = 0 ; i < NUM_DMA_IRQS ; i ++ ) {
79+ dma_irqn_set_channel_enabled (i , channel , false);
80+ }
8081 dma_channel_abort (channel );
8182 // finally clear the IRQ status, which may have been set during abort
8283 dma_hw -> intr = 1u << channel ;
You can’t perform that action at this time.
0 commit comments