diff options
author | Nick <nick.win999@gmail.com> | 2020-09-19 19:15:05 -0500 |
---|---|---|
committer | Nick <nick.win999@gmail.com> | 2020-09-19 19:15:05 -0500 |
commit | da0fb965f6b6a67154e20a3fddda48f5bc392d77 (patch) | |
tree | f7f9aa9a45b39bb4d943eb7d2ba6e71d516ab40c /app/drivers/zephyr/ec11.h | |
parent | 844f2c76749cbc5ff611d8e69819af82b698089a (diff) | |
parent | c0806d27f1d048db335ecc854eab61b59e23ea7a (diff) |
Merge remote-tracking branch 'upstream/main' into bluetooth/battery-reporting
Diffstat (limited to 'app/drivers/zephyr/ec11.h')
-rw-r--r-- | app/drivers/zephyr/ec11.h | 51 |
1 files changed, 25 insertions, 26 deletions
diff --git a/app/drivers/zephyr/ec11.h b/app/drivers/zephyr/ec11.h index 823d92d..e62e733 100644 --- a/app/drivers/zephyr/ec11.h +++ b/app/drivers/zephyr/ec11.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Peter Johanson + * Copyright (c) 2020 The ZMK Contributors * * SPDX-License-Identifier: MIT */ @@ -11,39 +11,39 @@ #include <sys/util.h> struct ec11_config { - const char *a_label; - const u8_t a_pin; - const u8_t a_flags; + const char *a_label; + const u8_t a_pin; + const u8_t a_flags; - const char *b_label; - const u8_t b_pin; - const u8_t b_flags; + const char *b_label; + const u8_t b_pin; + const u8_t b_flags; - const u8_t resolution; + const u8_t resolution; }; struct ec11_data { - struct device *a; - struct device *b; - u8_t ab_state; - s8_t pulses; - s8_t ticks; - s8_t delta; + struct device *a; + struct device *b; + u8_t ab_state; + s8_t pulses; + s8_t ticks; + s8_t delta; #ifdef CONFIG_EC11_TRIGGER - struct gpio_callback a_gpio_cb; - struct gpio_callback b_gpio_cb; - struct device *dev; + struct gpio_callback a_gpio_cb; + struct gpio_callback b_gpio_cb; + struct device *dev; - sensor_trigger_handler_t handler; - const struct sensor_trigger *trigger; + sensor_trigger_handler_t handler; + const struct sensor_trigger *trigger; #if defined(CONFIG_EC11_TRIGGER_OWN_THREAD) - K_THREAD_STACK_MEMBER(thread_stack, CONFIG_EC11_THREAD_STACK_SIZE); - struct k_sem gpio_sem; - struct k_thread thread; + K_THREAD_STACK_MEMBER(thread_stack, CONFIG_EC11_THREAD_STACK_SIZE); + struct k_sem gpio_sem; + struct k_thread thread; #elif defined(CONFIG_EC11_TRIGGER_GLOBAL_THREAD) - struct k_work work; + struct k_work work; #endif #endif /* CONFIG_EC11_TRIGGER */ @@ -51,9 +51,8 @@ struct ec11_data { #ifdef CONFIG_EC11_TRIGGER -int ec11_trigger_set(struct device *dev, - const struct sensor_trigger *trig, - sensor_trigger_handler_t handler); +int ec11_trigger_set(struct device *dev, const struct sensor_trigger *trig, + sensor_trigger_handler_t handler); int ec11_init_interrupt(struct device *dev); #endif |