Skip to content

Commit cb3f8a5

Browse files
author
Cruz Monrreal
authored
Merge pull request #7022 from marcuschangarm/fix-gpio
Fix array overflow in gpio configuration code for NRF5x
2 parents 1b168b6 + 86f6054 commit cb3f8a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

targets/TARGET_NORDIC/TARGET_NRF5x/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)