forked from kofal.net/zmk
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:
@@ -51,9 +51,8 @@ void zmk_kscan_process_msgq(struct k_work *item) {
|
||||
LOG_DBG("Row: %d, col: %d, position: %d, pressed: %s\n", ev.row, ev.column, position,
|
||||
(pressed ? "true" : "false"));
|
||||
pos_ev = new_position_state_changed();
|
||||
pos_ev->state = pressed;
|
||||
pos_ev->position = position;
|
||||
pos_ev->timestamp = k_uptime_get();
|
||||
pos_ev->data = (struct zmk_position_state_changed_data){
|
||||
.state = pressed, .position = position, .timestamp = k_uptime_get()};
|
||||
ZMK_EVENT_RAISE(pos_ev);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user