summaryrefslogtreecommitdiff
path: root/app/drivers/zephyr/ec11.h
diff options
context:
space:
mode:
authorinnovaker <66737976+innovaker@users.noreply.github.com>2020-11-19 17:20:43 +0000
committerPete Johanson <peter@peterjohanson.com>2020-12-03 21:06:01 -0500
commit8d9ae1fdf379020d4743b4f85f465e88b148ac29 (patch)
tree07cb741277cc5a85a66c280f258d551690c120e7 /app/drivers/zephyr/ec11.h
parent177b28f01de88ece582604c0ef0abaaaefe2f624 (diff)
refactor: Align drivers with Zephyr file system conventions
PR: #400
Diffstat (limited to 'app/drivers/zephyr/ec11.h')
-rw-r--r--app/drivers/zephyr/ec11.h58
1 files changed, 0 insertions, 58 deletions
diff --git a/app/drivers/zephyr/ec11.h b/app/drivers/zephyr/ec11.h
deleted file mode 100644
index e62e733..0000000
--- a/app/drivers/zephyr/ec11.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2020 The ZMK Contributors
- *
- * SPDX-License-Identifier: MIT
- */
-
-#pragma once
-
-#include <device.h>
-#include <drivers/gpio.h>
-#include <sys/util.h>
-
-struct ec11_config {
- 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 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;
-
-#ifdef CONFIG_EC11_TRIGGER
- 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;
-
-#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;
-#elif defined(CONFIG_EC11_TRIGGER_GLOBAL_THREAD)
- struct k_work work;
-#endif
-
-#endif /* CONFIG_EC11_TRIGGER */
-};
-
-#ifdef CONFIG_EC11_TRIGGER
-
-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