pio_set_irqn_source_mask_enabled() sets wrong irq (#655)
if irq_index == 0, irq_index evaluates to false; which uses pio_set_irq1_source_mask_enabled() ; and vice versa
This commit is contained in:
parent
699838d153
commit
a8fa19a74d
@ -790,9 +790,9 @@ static inline void pio_set_irqn_source_enabled(PIO pio, uint irq_index, enum pio
|
||||
static inline void pio_set_irqn_source_mask_enabled(PIO pio, uint irq_index, uint32_t source_mask, bool enabled) {
|
||||
invalid_params_if(PIO, irq_index > 1);
|
||||
if (irq_index) {
|
||||
pio_set_irq0_source_mask_enabled(pio, source_mask, enabled);
|
||||
} else {
|
||||
pio_set_irq1_source_mask_enabled(pio, source_mask, enabled);
|
||||
} else {
|
||||
pio_set_irq0_source_mask_enabled(pio, source_mask, enabled);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user