summaryrefslogtreecommitdiff
path: root/app/include/zmk/events/sensor_event.h
diff options
context:
space:
mode:
authorPete Johanson <peter@peterjohanson.com>2021-01-18 00:35:56 -0500
committerPete Johanson <peter@peterjohanson.com>2021-01-20 07:06:11 -0500
commit3fe2acc2d191006fa6309191ee99b2e4e249ed08 (patch)
tree4994508fdc58daee4629c671e07e689b6332bd32 /app/include/zmk/events/sensor_event.h
parent003db892adadb7b760f43411d7154fe60bf3556d (diff)
refactor(core): Extra event payloads to own types, refactor API.
* Make it easier to use *just* event payloads by defining the data, and then having event manager macros generate "wrapper structs" * Improve is_*/cast_* APIs to hide details of full event struct. * Create `zmk_event_t` typedef to pass to event handlers. * Bring event names inline w/ consistent `zmk_` prefix.
Diffstat (limited to 'app/include/zmk/events/sensor_event.h')
-rw-r--r--app/include/zmk/events/sensor_event.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/app/include/zmk/events/sensor_event.h b/app/include/zmk/events/sensor_event.h
index 14fb2d3..f579bc3 100644
--- a/app/include/zmk/events/sensor_event.h
+++ b/app/include/zmk/events/sensor_event.h
@@ -9,12 +9,10 @@
#include <zephyr.h>
#include <zmk/event_manager.h>
#include <device.h>
-
-struct sensor_event {
- struct zmk_event_header header;
+struct zmk_sensor_event {
uint8_t sensor_number;
const struct device *sensor;
int64_t timestamp;
};
-ZMK_EVENT_DECLARE(sensor_event); \ No newline at end of file
+ZMK_EVENT_DECLARE(zmk_sensor_event); \ No newline at end of file