Skip to content

Commit c315aa7

Browse files
committed
address conflicts
1 parent 3f2fee4 commit c315aa7

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

ports/raspberrypi/bindings/rp2pio/StateMachine.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,6 @@ MP_DEFINE_CONST_FUN_OBJ_1(rp2pio_statemachine_get_writing_obj, rp2pio_statemachi
623623
MP_PROPERTY_GETTER(rp2pio_statemachine_writing_obj,
624624
(mp_obj_t)&rp2pio_statemachine_get_writing_obj);
625625

626-
627626
//| pending_write: int
628627
//| pending: int
629628
//| """Returns the number of pending buffers for background writing.

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,6 +1156,8 @@ bool common_hal_rp2pio_statemachine_background_write(rp2pio_statemachine_obj_t *
11561156
false);
11571157

11581158
common_hal_mcu_disable_interrupts();
1159+
// Acknowledge any previous pending interrupt
1160+
dma_hw->ints0 |= 1u << channel_write;
11591161
MP_STATE_PORT(background_pio)[channel_write] = self;
11601162
dma_hw->inte0 |= 1u << channel_write;
11611163
irq_set_mask_enabled(1 << DMA_IRQ_0, true);
@@ -1327,6 +1329,8 @@ bool common_hal_rp2pio_statemachine_background_read(rp2pio_statemachine_obj_t *s
13271329
false);
13281330

13291331
common_hal_mcu_disable_interrupts();
1332+
// Acknowledge any previous pending interrupt
1333+
dma_hw->ints0 |= 1u << channel_read;
13301334
MP_STATE_PORT(background_pio)[channel_read] = self;
13311335
dma_hw->inte1 |= 1u << channel_read;
13321336
irq_set_mask_enabled(1 << DMA_IRQ_1, true);

0 commit comments

Comments
 (0)