test: drivers: gpio: gpio_basic_api: disable interrupt at end of test

When switching from rising edge to falling edge of test:
test_gpio_deprecated(),
because exti callback is already configured (from rising edge test),
the pin configuration abort for EBUSY reason.
It is necessary to disable interrupt,
so that next test will start with clean configuration.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
This commit is contained in:
Alexandre Bourdiol 2020-05-15 15:30:00 +02:00 committed by Carles Cufí
parent a40e8b510d
commit 2f8167fc08

View File

@ -137,10 +137,12 @@ static int test_callback(gpio_flags_t int_flags)
pass_exit:
gpio_remove_callback(dev, &drv_data->gpio_cb);
gpio_pin_configure(dev, PIN_IN, GPIO_INT_DISABLE);
return TC_PASS;
err_exit:
gpio_remove_callback(dev, &drv_data->gpio_cb);
gpio_pin_configure(dev, PIN_IN, GPIO_INT_DISABLE);
return TC_FAIL;
}