diff --git a/app/src/keymap.c b/app/src/keymap.c index c0657e41bc2..a5880f9856e 100644 --- a/app/src/keymap.c +++ b/app/src/keymap.c @@ -97,7 +97,7 @@ static inline int set_layer_state(uint8_t layer, bool state) { // Don't send state changes unless there was an actual change if (old_state != _zmk_keymap_layer_state) { LOG_DBG("layer_changed: layer %d state %d", layer, state); - ZMK_EVENT_RAISE(create_layer_state_changed(layer, state)); + raise_layer_state_changed(layer, state); #if ZMK_BLE_IS_CENTRAL int err = zmk_split_central_send_data(DATA_TAG_KEYMAP_STATE, sizeof(uint32_t), (uint8_t *)&_zmk_keymap_layer_state); diff --git a/app/src/split/bluetooth/central.c b/app/src/split/bluetooth/central.c index 0e580aed1c0..281b81c77f8 100644 --- a/app/src/split/bluetooth/central.c +++ b/app/src/split/bluetooth/central.c @@ -455,10 +455,6 @@ static uint8_t split_central_chrc_discovery_func(struct bt_conn *conn, slot->batt_lvl_read_params.single.offset = 0; bt_gatt_read(conn, &slot->batt_lvl_read_params); #endif /* IS_ENABLED(CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING) */ - } - - bool subscribed = slot->run_behavior_handle && slot->subscribe_params.value_handle; - } else if (bt_uuid_cmp(chrc_uuid, BT_UUID_DECLARE_128(ZMK_SPLIT_BT_CHAR_DATA_XFER_UUID)) == 0) { LOG_DBG("Found data transfer handle"); slot->discover_params.uuid = NULL; @@ -918,7 +914,7 @@ int zmk_split_central_send_data(enum data_tag tag, uint8_t size, uint8_t *data) return split_bt_data_xfer_payload(payload); } -int zmk_split_bt_central_init(const struct device *_arg) { +int zmk_split_bt_central_init(void) { k_work_queue_start(&split_central_split_run_q, split_central_split_run_q_stack, K_THREAD_STACK_SIZEOF(split_central_split_run_q_stack), CONFIG_ZMK_BLE_THREAD_PRIORITY, NULL); diff --git a/app/src/split/bluetooth/service.c b/app/src/split/bluetooth/service.c index 461ee185b94..b162348c634 100644 --- a/app/src/split/bluetooth/service.c +++ b/app/src/split/bluetooth/service.c @@ -103,7 +103,7 @@ static void split_svc_data_xfer_callback(struct k_work *work) { LOG_DBG("Size correct, raising event"); struct zmk_split_data_xfer_event event; memcpy(&event.data_xfer, &data_xfer_payload, sizeof(struct zmk_split_data_xfer_data)); - ZMK_EVENT_RAISE(new_zmk_split_data_xfer_event(event)); + raise_zmk_split_data_xfer_event(event); } static K_WORK_DEFINE(split_svc_data_xfer_work, split_svc_data_xfer_callback);