diff options
| author | Pete Johanson <peter@peterjohanson.com> | 2021-01-18 00:35:56 -0500 |
|---|---|---|
| committer | Pete Johanson <peter@peterjohanson.com> | 2021-01-20 07:06:11 -0500 |
| commit | 3fe2acc2d191006fa6309191ee99b2e4e249ed08 (patch) | |
| tree | 4994508fdc58daee4629c671e07e689b6332bd32 /app/include/zmk/events/position_state_changed.h | |
| parent | 003db892adadb7b760f43411d7154fe60bf3556d (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/position_state_changed.h')
| -rw-r--r-- | app/include/zmk/events/position_state_changed.h | 10 |
1 files changed, 2 insertions, 8 deletions
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 <zephyr.h> #include <zmk/event_manager.h> - -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 |
