fix(core): Address review comments from Joel.

* Fix up some lingering events API tweaks for heap-less event manager.
This commit is contained in:
Peter Johanson
2024-01-13 21:17:35 +00:00
committed by Pete Johanson
parent 33209dee1d
commit 644feeb40d
6 changed files with 26 additions and 19 deletions

View File

@@ -21,15 +21,13 @@ static int behavior_key_press_init(const struct device *dev) { return 0; };
static int on_keymap_binding_pressed(struct zmk_behavior_binding *binding,
struct zmk_behavior_binding_event event) {
LOG_DBG("position %d keycode 0x%02X", event.position, binding->param1);
return raise_zmk_keycode_state_changed(
zmk_keycode_state_changed_from_encoded(binding->param1, true, event.timestamp));
return raise_zmk_keycode_state_changed_from_encoded(binding->param1, true, event.timestamp);
}
static int on_keymap_binding_released(struct zmk_behavior_binding *binding,
struct zmk_behavior_binding_event event) {
LOG_DBG("position %d keycode 0x%02X", event.position, binding->param1);
return raise_zmk_keycode_state_changed(
zmk_keycode_state_changed_from_encoded(binding->param1, false, event.timestamp));
return raise_zmk_keycode_state_changed_from_encoded(binding->param1, false, event.timestamp);
}
static const struct behavior_driver_api behavior_key_press_driver_api = {