From 6595734492676f0848bfe8fd8fb0c8d7147a6294 Mon Sep 17 00:00:00 2001 From: Ken Van Hoeylandt Date: Wed, 29 Jul 2026 21:19:42 +0200 Subject: [PATCH] Dependency cleanup To avoid including GPL code --- Devices/unphone/CMakeLists.txt | 2 +- Devices/unphone/source/drivers/unphone_nav_buttons.cpp | 4 +--- Devices/unphone/source/drivers/unphone_power_switch.cpp | 5 ++--- Devices/unphone/source/init_boot.cpp | 5 ++--- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/Devices/unphone/CMakeLists.txt b/Devices/unphone/CMakeLists.txt index ce93d2491..21b60ea5c 100644 --- a/Devices/unphone/CMakeLists.txt +++ b/Devices/unphone/CMakeLists.txt @@ -3,5 +3,5 @@ file(GLOB_RECURSE SOURCE_FILES source/*.c*) idf_component_register( SRCS ${SOURCE_FILES} INCLUDE_DIRS "source" - REQUIRES Tactility bq24295-module + REQUIRES TactilityKernel TactilityFreeRtos bq24295-module driver ) diff --git a/Devices/unphone/source/drivers/unphone_nav_buttons.cpp b/Devices/unphone/source/drivers/unphone_nav_buttons.cpp index 26162dfa8..a14e4c56a 100644 --- a/Devices/unphone/source/drivers/unphone_nav_buttons.cpp +++ b/Devices/unphone/source/drivers/unphone_nav_buttons.cpp @@ -10,8 +10,6 @@ #include #include -#include -#include #include #include @@ -72,7 +70,7 @@ static int32_t nav_buttons_thread_main(UnphoneNavButtonsInternal* internal) { // The buttons might generate more than 1 click because of how they are built LOG_I(TAG, "Pressed button %d", button_index); if (button_index == BUTTON1_INDEX) { - tt::app::stop(); + // TODO: Stop app implementation } // Debounce all events for a short period of time diff --git a/Devices/unphone/source/drivers/unphone_power_switch.cpp b/Devices/unphone/source/drivers/unphone_power_switch.cpp index e6108aa64..fdfcb26ab 100644 --- a/Devices/unphone/source/drivers/unphone_power_switch.cpp +++ b/Devices/unphone/source/drivers/unphone_power_switch.cpp @@ -3,8 +3,7 @@ #include #include -#include -#include +#include #include #include @@ -67,7 +66,7 @@ error_t unphone_power_switch_is_on(Device* device, bool* on) { error_t unphone_power_switch_enable_wake(Device* device) { auto* internal = static_cast(device_get_driver_data(device)); auto esp_error = esp_sleep_enable_ext0_wakeup(internal->native_pin, 1); - return esp_err_to_error(esp_error); + return esp_error == ESP_OK ? ERROR_NONE : ERROR_RESOURCE; } Driver unphone_power_switch_driver = { diff --git a/Devices/unphone/source/init_boot.cpp b/Devices/unphone/source/init_boot.cpp index f3139abc1..ba185982a 100644 --- a/Devices/unphone/source/init_boot.cpp +++ b/Devices/unphone/source/init_boot.cpp @@ -8,7 +8,6 @@ #include #include -#include #include constexpr auto* TAG = "unPhone"; @@ -97,10 +96,10 @@ static bool power_on() { } bool init_boot() { - LOG_I(TAG, LOG_MESSAGE_POWER_ON_START); + LOG_I(TAG, "Power on start"); if (!power_on()) { - LOG_E(TAG, LOG_MESSAGE_POWER_ON_FAILED); + LOG_E(TAG, "Power on failed"); return false; }