Browse Source

Update kscan_gpio_get_extra_flags

xmkb
Kurtis Lew 3 years ago committed by Pete Johanson
parent
commit
0bde987ae2
  1. 5
      app/drivers/kscan/kscan_gpio_direct.c

5
app/drivers/kscan/kscan_gpio_direct.c

@ -126,11 +126,10 @@ static void kscan_direct_irq_callback_handler(const struct device *port, struct
#endif #endif
static gpio_flags_t kscan_gpio_get_extra_flags(const struct gpio_dt_spec *gpio, bool active) { 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) { 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, static int kscan_inputs_set_flags(const struct kscan_gpio_list *inputs,

Loading…
Cancel
Save