Skip to content

Commit 8d516fd

Browse files
pi-anlcmonr
authored andcommitted
nrf5x: gpiote uninit only needs to be run if input pin is configured for irq (or output)
1 parent cb8bc88 commit 8d516fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

targets/TARGET_NORDIC/TARGET_NRF5/gpio_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ static void gpiote_pin_uninit(uint8_t pin)
112112
if ((m_gpio_cfg[pin].direction == PIN_OUTPUT) && (!m_gpio_cfg[pin].used_as_irq)) {
113113
nrf_drv_gpiote_out_uninit(pin);
114114
}
115-
else {
115+
else if (m_gpio_cfg[pin].used_as_irq) {
116116
nrf_drv_gpiote_in_uninit(pin);
117117
}
118118
}

0 commit comments

Comments
 (0)