From f737d087b5bbbd369b6602ea7430738c18acf649 Mon Sep 17 00:00:00 2001 From: snoyer Date: Sun, 5 Nov 2023 11:27:27 +0400 Subject: [PATCH] cleanup --- app/dts/behaviors/base_layer.dtsi | 14 ++++++------ app/src/profiles.c | 38 ------------------------------- 2 files changed, 7 insertions(+), 45 deletions(-) delete mode 100644 app/src/profiles.c diff --git a/app/dts/behaviors/base_layer.dtsi b/app/dts/behaviors/base_layer.dtsi index 510829f2..f9e60729 100644 --- a/app/dts/behaviors/base_layer.dtsi +++ b/app/dts/behaviors/base_layer.dtsi @@ -5,11 +5,11 @@ */ / { - behaviors { - /omit-if-no-ref/ base: behavior_base_layer { - compatible = "zmk,behavior-base-layer"; - label = "BASE_LAYER"; - #binding-cells = <1>; - }; - }; + behaviors { + /omit-if-no-ref/ base: behavior_base_layer { + compatible = "zmk,behavior-base-layer"; + label = "BASE_LAYER"; + #binding-cells = <1>; + }; + }; }; diff --git a/app/src/profiles.c b/app/src/profiles.c deleted file mode 100644 index 00cf2b57..00000000 --- a/app/src/profiles.c +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2022 The ZMK Contributors - * - * SPDX-License-Identifier: MIT - */ - -#include -#include -#include - -#include -LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); - -zmk_profile_index_t zmk_profile_index(enum zmk_endpoint endpoint, uint8_t profile) { - switch (endpoint) { - case ZMK_ENDPOINT_USB: - return 0; - case ZMK_ENDPOINT_BLE: - return ZMK_USB_PROFILE_COUNT + profile; - } - - CODE_UNREACHABLE; -} - -zmk_profile_index_t zmk_current_profile_index() { - const enum zmk_endpoint endpoint = zmk_endpoints_selected(); - uint8_t profile = 0; - -#if IS_ENABLED(CONFIG_ZMK_BLE) - if (endpoint == ZMK_ENDPOINT_BLE) { - profile = zmk_ble_active_profile_index(); - } -#endif - - const zmk_profile_index_t index = zmk_profile_index(endpoint, profile); - LOG_DBG("endpoint=%d, profile=%d => profile_index=%d", endpoint, profile, index); - return index; -}