gpio: replace GPIO_INT_LEVEL flag

This will be deprecated, use the generalized mode flag or absence of
GPIO_INT_EDGE.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This commit is contained in:
Peter Bigot 2020-01-29 08:22:44 -06:00 committed by Carles Cufí
commit e63c6cc325
2 changed files with 4 additions and 6 deletions

View file

@ -227,7 +227,7 @@ static int gpio_cc32xx_pin_interrupt_configure(struct device *port,
} else {
int_type = GPIO_FALLING_EDGE;
}
} else { /* GPIO_INT_LEVEL */
} else { /* GPIO_INT_MODE_LEVEL */
if (trig == GPIO_INT_TRIG_HIGH) {
int_type = GPIO_HIGH_LEVEL;
} else {

View file

@ -105,15 +105,13 @@ static int test_callback(int mode)
}
if ((mode & GPIO_INT_EDGE) == GPIO_INT_EDGE) {
if (cb_cnt != 1) {
TC_ERROR("not trigger callback correctly\n");
TC_ERROR("edge not trigger callback correctly\n");
goto err_exit;
}
goto pass_exit;
}
if ((mode & GPIO_INT_EDGE) == GPIO_INT_LEVEL) {
} else {
if (cb_cnt != MAX_INT_CNT) {
TC_ERROR("not trigger callback correctly\n");
TC_ERROR("level not trigger callback correctly\n");
goto err_exit;
}
}