refactor(core): Extra position state change data struct.

* Separate header and data struct for the event.
* Remove duplicate struct in split code.
This commit is contained in:
Pete Johanson
2021-01-17 16:36:01 -05:00
parent 95acbd8859
commit 003db892ad
6 changed files with 31 additions and 34 deletions

View File

@@ -9,11 +9,15 @@
#include <zephyr.h>
#include <zmk/event_manager.h>
struct position_state_changed {
struct zmk_event_header header;
struct zmk_position_state_changed_data {
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);