From 3fe2acc2d191006fa6309191ee99b2e4e249ed08 Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Mon, 18 Jan 2021 00:35:56 -0500 Subject: 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. --- app/include/zmk/events/position_state_changed.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'app/include/zmk/events/position_state_changed.h') diff --git a/app/include/zmk/events/position_state_changed.h b/app/include/zmk/events/position_state_changed.h index 7541b47..e2f6872 100644 --- a/app/include/zmk/events/position_state_changed.h +++ b/app/include/zmk/events/position_state_changed.h @@ -8,16 +8,10 @@ #include #include - -struct zmk_position_state_changed_data { +struct zmk_position_state_changed { uint32_t position; bool state; int64_t timestamp; }; -struct position_state_changed { - struct zmk_event_header header; - struct zmk_position_state_changed_data data; -}; - -ZMK_EVENT_DECLARE(position_state_changed); \ No newline at end of file +ZMK_EVENT_DECLARE(zmk_position_state_changed); \ No newline at end of file -- cgit v1.2.3