Skip to content

Commit 2164352

Browse files
committed
cpu/nrf5x: fix erroneous mask with INTENSET reg
fixes #20736
1 parent b6696e0 commit 2164352

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cpu/nrf5x_common/periph/gpio.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ int gpio_init_int(gpio_t pin, gpio_mode_t mode, gpio_flank_t flank,
203203
#endif
204204
(flank << GPIOTE_CONFIG_POLARITY_Pos));
205205
/* enable external interrupt */
206-
NRF_GPIOTE->INTENSET |= (GPIOTE_INTENSET_IN0_Msk << _pin_index);
206+
NRF_GPIOTE->INTENSET = (GPIOTE_INTENSET_IN0_Msk << _pin_index);
207207

208208
return 0;
209209
}
@@ -213,7 +213,7 @@ void gpio_irq_enable(gpio_t pin)
213213
for (unsigned int i = 0; i < _gpiote_next_index; i++) {
214214
if (_exti_pins[i] == pin) {
215215
NRF_GPIOTE->CONFIG[i] |= GPIOTE_CONFIG_MODE_Event;
216-
NRF_GPIOTE->INTENSET |= (GPIOTE_INTENSET_IN0_Msk << i);
216+
NRF_GPIOTE->INTENSET = (GPIOTE_INTENSET_IN0_Msk << i);
217217
break;
218218
}
219219
}

0 commit comments

Comments
 (0)