Skip to content

Commit

Permalink
Update kscan_gpio_get_extra_flags
Browse files Browse the repository at this point in the history
  • Loading branch information
kurtis-lew committed May 19, 2022
1 parent 7bb3a2f commit 6697abb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/drivers/kscan/kscan_gpio_direct.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,10 @@ static void kscan_direct_irq_callback_handler(const struct device *port, struct
#endif

static gpio_flags_t kscan_gpio_get_extra_flags(const struct gpio_dt_spec *gpio, bool active) {
gpio_flags_t flags = BIT(0) & gpio->dt_flags;
if (!active) {
flags |= flags ? GPIO_PULL_UP : GPIO_PULL_DOWN;
return ((BIT(0) & gpio->dt_flags) ? GPIO_PULL_UP : GPIO_PULL_DOWN);
}
return flags;
return 0;
}

static int kscan_inputs_set_flags(const struct kscan_gpio_list *inputs,
Expand Down

0 comments on commit 6697abb

Please sign in to comment.