drivers: gpio: nrf: fix pin number used in getting GPIOTE channel
Incorrect GPIOTE channel was being freed because the pin number being used is not the absolute pin but the pin within the port. Signed-off-by: Wael Barakat <waelsbarakat@gmail.com>
This commit is contained in:
parent
9498310c53
commit
4b3fe99b83
1 changed files with 1 additions and 1 deletions
|
@ -125,7 +125,7 @@ static int gpio_nrfx_pin_configure(const struct device *port, gpio_pin_t pin,
|
|||
.trigger = NRFX_GPIOTE_TRIGGER_NONE
|
||||
};
|
||||
|
||||
err = nrfx_gpiote_channel_get(pin, &ch);
|
||||
err = nrfx_gpiote_channel_get(abs_pin, &ch);
|
||||
free_ch = (err == NRFX_SUCCESS);
|
||||
|
||||
/* Remove previously configured trigger when pin is reconfigured. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue