refactor(core): Move to stack allocated events.

* Move to local/stack allocated event API that doesn't require
  dynamic allocation/freeing.
* Disable heap, we no longer use alloc/free unless using LVGL.
* Tons of refactors all over to account for the new event approach.
This commit is contained in:
Peter Johanson
2023-03-23 08:56:02 +00:00
committed by Pete Johanson
parent 50e473276f
commit 33209dee1d
24 changed files with 172 additions and 147 deletions

View File

@@ -87,12 +87,12 @@ static void trigger_sensor_data_for_position(uint32_t sensor_index) {
return;
}
ZMK_EVENT_RAISE(new_zmk_sensor_event(
raise_zmk_sensor_event(
(struct zmk_sensor_event){.sensor_index = item->sensor_index,
.channel_data_size = 1,
.channel_data = {(struct zmk_sensor_channel_data){
.value = value, .channel = item->trigger.chan}},
.timestamp = k_uptime_get()}));
.timestamp = k_uptime_get()});
}
static void run_sensors_data_trigger(struct k_work *work) {