From 11090420adcc6286e4d44a2bea8b58b422015fc0 Mon Sep 17 00:00:00 2001 From: Alex Tsitsiura Date: Wed, 14 Dec 2022 20:05:37 +0200 Subject: [PATCH] [Telink] flash usage optimization (#24078) * [Telink] Updated configuration to optimise flash usage * [Telink] Added CONFIG_OPENTHREAD_MANUAL_START setting * [Telink] Set default log level 3 & optimized log messages * [Telink] Added CONFIG_SERIAL field to enable/disable logging * [Telink] Fix typo Co-authored-by: Serhii Salamakha --- config/telink/app/zephyr.conf | 22 +++----- .../all-clusters-app/telink/src/AppTask.cpp | 28 +++++------ examples/all-clusters-app/telink/src/main.cpp | 15 +++--- .../telink/src/AppTask.cpp | 23 ++++----- .../telink/src/main.cpp | 15 +++--- .../light-switch-app/telink/src/AppTask.cpp | 28 +++++------ examples/light-switch-app/telink/src/main.cpp | 15 +++--- examples/lighting-app/telink/src/AppTask.cpp | 50 +++++++++---------- examples/lighting-app/telink/src/main.cpp | 15 +++--- .../ota-requestor-app/telink/src/AppTask.cpp | 26 +++++----- .../ota-requestor-app/telink/src/main.cpp | 15 +++--- .../telink/util/src/ButtonManager.cpp | 6 +-- examples/thermostat/telink/src/AppTask.cpp | 32 ++++++------ examples/thermostat/telink/src/main.cpp | 15 +++--- src/platform/telink/BLEManagerImpl.cpp | 17 +++---- 15 files changed, 143 insertions(+), 179 deletions(-) diff --git a/config/telink/app/zephyr.conf b/config/telink/app/zephyr.conf index 3721da9a8fa052..0bb8ffeca65103 100644 --- a/config/telink/app/zephyr.conf +++ b/config/telink/app/zephyr.conf @@ -17,15 +17,16 @@ CONFIG_CHIP=y CONFIG_STD_CPP14=y -# Logging +# Logging (set CONFIG_SERIAL to 'y' to enable logging and 'n' to disable logging) +CONFIG_SERIAL=y CONFIG_LOG=y CONFIG_LOG_MODE_MINIMAL=y CONFIG_PRINTK=y CONFIG_ASSERT=y CONFIG_CBPRINTF_LIBC_SUBSTS=y -# Setting the INFO log level -CONFIG_LOG_DEFAULT_LEVEL=2 +# Setting the INFO log level (uncomment INFO log level configs and comment DEBUG log level configs) +CONFIG_LOG_DEFAULT_LEVEL=3 CONFIG_MATTER_LOG_LEVEL_INF=y CONFIG_MCUBOOT_UTIL_LOG_LEVEL_INF=y CONFIG_IEEE802154_DRIVER_LOG_LEVEL_INF=y @@ -33,7 +34,7 @@ CONFIG_NVS_LOG_LEVEL_INF=y CONFIG_OPENTHREAD_LOG_LEVEL_INFO=y CONFIG_OPENTHREAD_L2_LOG_LEVEL_INF=y -# Setting the DEBUG log level (Uncomment for set the log level) +# Setting the DEBUG log level (uncomment DEBUG log level configs) # CONFIG_LOG_DEFAULT_LEVEL=4 # CONFIG_MATTER_LOG_LEVEL_DBG=y # CONFIG_MCUBOOT_UTIL_LOG_LEVEL_DBG=y @@ -60,6 +61,7 @@ CONFIG_NET_CONFIG_PEER_IPV4_ADDR="" # Application stack size CONFIG_MAIN_STACK_SIZE=4096 CONFIG_INIT_STACKS=y +CONFIG_IDLE_STACK_SIZE=512 # Disable certain parts of Zephyr IPv6 stack CONFIG_NET_IPV6_NBR_CACHE=n @@ -96,18 +98,8 @@ CONFIG_NET_CONFIG_PEER_IPV6_ADDR="fdde:ad00:beef::2" # OpenThread configs CONFIG_OPENTHREAD_SLAAC=y -CONFIG_OPENTHREAD_DHCP6_CLIENT=y -CONFIG_OPENTHREAD_SNTP_CLIENT=y -CONFIG_OPENTHREAD_DNS_CLIENT=y -CONFIG_OPENTHREAD_MTD_NETDIAG=y -CONFIG_OPENTHREAD_ENABLE_SERVICE=y +CONFIG_OPENTHREAD_RADIO_WORKQUEUE_STACK_SIZE=608 CONFIG_OPENTHREAD_MANUAL_START=y -CONFIG_OPENTHREAD_THREAD_STACK_SIZE=6144 - -# Enable Thread 1.2 features -CONFIG_OPENTHREAD_THREAD_VERSION_1_2=y -CONFIG_OPENTHREAD_DUA=y -CONFIG_OPENTHREAD_MLR=y # mbedTLS tweaks CONFIG_MBEDTLS_TEST=y diff --git a/examples/all-clusters-app/telink/src/AppTask.cpp b/examples/all-clusters-app/telink/src/AppTask.cpp index f00236e08ff707..f5b8cac574c23a 100644 --- a/examples/all-clusters-app/telink/src/AppTask.cpp +++ b/examples/all-clusters-app/telink/src/AppTask.cpp @@ -114,8 +114,7 @@ CHIP_ERROR AppTask::Init() { CHIP_ERROR ret; - LOG_INF("Current Software Version: %u, %s", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION, - CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); + LOG_INF("SW Version: %u, %s", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION, CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); // Initialize status LED LEDWidget::InitGpio(SYSTEM_STATE_LED_PORT); @@ -151,7 +150,7 @@ CHIP_ERROR AppTask::Init() ret = InitBindingHandlers(); if (ret != CHIP_NO_ERROR) { - LOG_ERR("InitBindingHandlers() failed"); + LOG_ERR("InitBindingHandlers fail"); return ret; } @@ -165,7 +164,7 @@ CHIP_ERROR AppTask::Init() ret = ConnectivityMgr().SetBLEDeviceName("TelinkApp"); if (ret != CHIP_NO_ERROR) { - LOG_ERR("Fail to set BLE device name"); + LOG_ERR("SetBLEDeviceName fail"); return ret; } @@ -178,7 +177,7 @@ CHIP_ERROR AppTask::StartApp() if (err != CHIP_NO_ERROR) { - LOG_ERR("AppTask.Init() failed"); + LOG_ERR("AppTask Init fail"); return err; } @@ -210,7 +209,7 @@ void AppTask::FactoryResetButtonEventHandler(void) void AppTask::FactoryResetHandler(AppEvent * aEvent) { - LOG_INF("Factory Reset triggered."); + LOG_INF("FactoryResetHandler"); chip::Server::GetInstance().ScheduleFactoryReset(); } @@ -226,18 +225,17 @@ void AppTask::StartThreadButtonEventHandler(void) void AppTask::StartThreadHandler(AppEvent * aEvent) { - + LOG_INF("StartThreadHandler"); if (!chip::DeviceLayer::ConnectivityMgr().IsThreadProvisioned()) { // Switch context from BLE to Thread BLEManagerImpl sInstance; sInstance.SwitchToIeee802154(); StartDefaultThreadNetwork(); - LOG_INF("Device is not commissioned to a Thread network. Starting with the default configuration."); } else { - LOG_INF("Device is commissioned to a Thread network."); + LOG_INF("Device already commissioned"); } } @@ -253,24 +251,24 @@ void AppTask::StartBleAdvButtonEventHandler(void) void AppTask::StartBleAdvHandler(AppEvent * aEvent) { - LOG_INF("BLE advertising start button pressed"); + LOG_INF("StartBleAdvHandler"); // Don't allow on starting Matter service BLE advertising after Thread provisioning. if (ConnectivityMgr().IsThreadProvisioned()) { - LOG_INF("Matter service BLE advertising not started - device is commissioned to a Thread network."); + LOG_INF("Device already commissioned"); return; } if (ConnectivityMgr().IsBLEAdvertisingEnabled()) { - LOG_INF("BLE advertising is already enabled"); + LOG_INF("BLE adv already enabled"); return; } if (chip::Server::GetInstance().GetCommissioningWindowManager().OpenBasicCommissioningWindow() != CHIP_NO_ERROR) { - LOG_ERR("OpenBasicCommissioningWindow() failed"); + LOG_ERR("OpenBasicCommissioningWindow fail"); } } @@ -326,7 +324,7 @@ void AppTask::PostEvent(AppEvent * aEvent) return; if (k_msgq_put(&sAppEventQueue, aEvent, K_NO_WAIT) != 0) { - LOG_INF("Failed to post event to app task event queue"); + LOG_INF("PostEvent fail"); } } @@ -340,7 +338,7 @@ void AppTask::DispatchEvent(AppEvent * aEvent) } else { - LOG_INF("Event received with no handler. Dropping event."); + LOG_INF("Dropping event without handler"); } } diff --git a/examples/all-clusters-app/telink/src/main.cpp b/examples/all-clusters-app/telink/src/main.cpp index 48adaee45a5115..dd1480f6677e45 100644 --- a/examples/all-clusters-app/telink/src/main.cpp +++ b/examples/all-clusters-app/telink/src/main.cpp @@ -36,31 +36,28 @@ int main(void) err = chip::Platform::MemoryInit(); if (err != CHIP_NO_ERROR) { - LOG_ERR("Platform::MemoryInit() failed"); + LOG_ERR("MemoryInit fail"); goto exit; } - LOG_INF("Init CHIP stack"); err = PlatformMgr().InitChipStack(); if (err != CHIP_NO_ERROR) { - LOG_ERR("PlatformMgr().InitChipStack() failed"); + LOG_ERR("InitChipStack fail"); goto exit; } - LOG_INF("Starting CHIP task"); err = PlatformMgr().StartEventLoopTask(); if (err != CHIP_NO_ERROR) { - LOG_ERR("PlatformMgr().StartEventLoopTask() failed"); + LOG_ERR("StartEventLoopTask fail"); goto exit; } - LOG_INF("Init Thread stack"); err = ThreadStackMgr().InitThreadStack(); if (err != CHIP_NO_ERROR) { - LOG_ERR("ThreadStackMgr().InitThreadStack() failed"); + LOG_ERR("InitThreadStack fail"); goto exit; } @@ -71,13 +68,13 @@ int main(void) #endif if (err != CHIP_NO_ERROR) { - LOG_ERR("ConnectivityMgr().SetThreadDeviceType() failed"); + LOG_ERR("SetThreadDeviceType fail"); goto exit; } err = GetAppTask().StartApp(); exit: - LOG_ERR("Exited with code %" CHIP_ERROR_FORMAT, err.Format()); + LOG_ERR("Exit err %" CHIP_ERROR_FORMAT, err.Format()); return (err == CHIP_NO_ERROR) ? EXIT_SUCCESS : EXIT_FAILURE; } diff --git a/examples/all-clusters-minimal-app/telink/src/AppTask.cpp b/examples/all-clusters-minimal-app/telink/src/AppTask.cpp index e6c684c5ff85b1..8ecf29eda06939 100644 --- a/examples/all-clusters-minimal-app/telink/src/AppTask.cpp +++ b/examples/all-clusters-minimal-app/telink/src/AppTask.cpp @@ -77,8 +77,7 @@ CHIP_ERROR AppTask::Init() { CHIP_ERROR ret; - LOG_INF("Current Software Version: %u, %s", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION, - CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); + LOG_INF("SW Version: %u, %s", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION, CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); // Initialize status LED LEDWidget::InitGpio(SYSTEM_STATE_LED_PORT); @@ -111,7 +110,7 @@ CHIP_ERROR AppTask::Init() ret = InitBindingHandlers(); if (ret != CHIP_NO_ERROR) { - LOG_ERR("InitBindingHandlers() failed"); + LOG_ERR("InitBindingHandlers fail"); return ret; } @@ -125,7 +124,7 @@ CHIP_ERROR AppTask::Init() ret = ConnectivityMgr().SetBLEDeviceName("TelinkMinApp"); if (ret != CHIP_NO_ERROR) { - LOG_ERR("Fail to set BLE device name"); + LOG_ERR("SetBLEDeviceName fail"); return ret; } @@ -138,7 +137,7 @@ CHIP_ERROR AppTask::StartApp() if (err != CHIP_NO_ERROR) { - LOG_ERR("AppTask.Init() failed"); + LOG_ERR("AppTask Init fail"); return err; } @@ -170,7 +169,7 @@ void AppTask::FactoryResetButtonEventHandler(void) void AppTask::FactoryResetHandler(AppEvent * aEvent) { - LOG_INF("Factory Reset triggered."); + LOG_INF("FactoryResetHandler"); chip::Server::GetInstance().ScheduleFactoryReset(); } @@ -186,24 +185,24 @@ void AppTask::StartBleAdvButtonEventHandler(void) void AppTask::StartBleAdvHandler(AppEvent * aEvent) { - LOG_INF("BLE advertising start button pressed"); + LOG_INF("StartBleAdvHandler"); // Don't allow on starting Matter service BLE advertising after Thread provisioning. if (ConnectivityMgr().IsThreadProvisioned()) { - LOG_INF("Matter service BLE advertising not started - device is commissioned to a Thread network."); + LOG_INF("Device already commissioned"); return; } if (ConnectivityMgr().IsBLEAdvertisingEnabled()) { - LOG_INF("BLE advertising is already enabled"); + LOG_INF("BLE adv already enabled"); return; } if (chip::Server::GetInstance().GetCommissioningWindowManager().OpenBasicCommissioningWindow() != CHIP_NO_ERROR) { - LOG_ERR("OpenBasicCommissioningWindow() failed"); + LOG_ERR("OpenBasicCommissioningWindow fail"); } } @@ -259,7 +258,7 @@ void AppTask::PostEvent(AppEvent * aEvent) return; if (k_msgq_put(&sAppEventQueue, aEvent, K_NO_WAIT) != 0) { - LOG_INF("Failed to post event to app task event queue"); + LOG_INF("PostEvent fail"); } } @@ -273,7 +272,7 @@ void AppTask::DispatchEvent(AppEvent * aEvent) } else { - LOG_INF("Event received with no handler. Dropping event."); + LOG_INF("Dropping event without handler"); } } diff --git a/examples/all-clusters-minimal-app/telink/src/main.cpp b/examples/all-clusters-minimal-app/telink/src/main.cpp index 48adaee45a5115..dd1480f6677e45 100644 --- a/examples/all-clusters-minimal-app/telink/src/main.cpp +++ b/examples/all-clusters-minimal-app/telink/src/main.cpp @@ -36,31 +36,28 @@ int main(void) err = chip::Platform::MemoryInit(); if (err != CHIP_NO_ERROR) { - LOG_ERR("Platform::MemoryInit() failed"); + LOG_ERR("MemoryInit fail"); goto exit; } - LOG_INF("Init CHIP stack"); err = PlatformMgr().InitChipStack(); if (err != CHIP_NO_ERROR) { - LOG_ERR("PlatformMgr().InitChipStack() failed"); + LOG_ERR("InitChipStack fail"); goto exit; } - LOG_INF("Starting CHIP task"); err = PlatformMgr().StartEventLoopTask(); if (err != CHIP_NO_ERROR) { - LOG_ERR("PlatformMgr().StartEventLoopTask() failed"); + LOG_ERR("StartEventLoopTask fail"); goto exit; } - LOG_INF("Init Thread stack"); err = ThreadStackMgr().InitThreadStack(); if (err != CHIP_NO_ERROR) { - LOG_ERR("ThreadStackMgr().InitThreadStack() failed"); + LOG_ERR("InitThreadStack fail"); goto exit; } @@ -71,13 +68,13 @@ int main(void) #endif if (err != CHIP_NO_ERROR) { - LOG_ERR("ConnectivityMgr().SetThreadDeviceType() failed"); + LOG_ERR("SetThreadDeviceType fail"); goto exit; } err = GetAppTask().StartApp(); exit: - LOG_ERR("Exited with code %" CHIP_ERROR_FORMAT, err.Format()); + LOG_ERR("Exit err %" CHIP_ERROR_FORMAT, err.Format()); return (err == CHIP_NO_ERROR) ? EXIT_SUCCESS : EXIT_FAILURE; } diff --git a/examples/light-switch-app/telink/src/AppTask.cpp b/examples/light-switch-app/telink/src/AppTask.cpp index 2bbd510217b7c3..c5a77caae8f701 100644 --- a/examples/light-switch-app/telink/src/AppTask.cpp +++ b/examples/light-switch-app/telink/src/AppTask.cpp @@ -119,8 +119,7 @@ CHIP_ERROR AppTask::Init() { CHIP_ERROR err; - LOG_INF("Current Software Version: %u, %s", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION, - CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); + LOG_INF("SW Version: %u, %s", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION, CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); // Initialize status LED LEDWidget::InitGpio(SYSTEM_STATE_LED_PORT); @@ -166,7 +165,7 @@ CHIP_ERROR AppTask::Init() err = InitBindingHandler(); if (err != CHIP_NO_ERROR) { - LOG_ERR("InitBindingHandler() failed"); + LOG_ERR("InitBindingHandler fail"); return err; } @@ -180,7 +179,7 @@ CHIP_ERROR AppTask::Init() err = ConnectivityMgr().SetBLEDeviceName("TelinkSwitch"); if (err != CHIP_NO_ERROR) { - LOG_ERR("Fail to set BLE device name"); + LOG_ERR("SetBLEDeviceName fail"); } return err; @@ -192,7 +191,7 @@ CHIP_ERROR AppTask::StartApp() if (err != CHIP_NO_ERROR) { - LOG_ERR("AppTask.Init() failed"); + LOG_ERR("AppTask Init fail"); return err; } @@ -246,7 +245,7 @@ void AppTask::FactoryResetButtonEventHandler(void) void AppTask::FactoryResetHandler(AppEvent * aEvent) { - LOG_INF("Factory Reset triggered."); + LOG_INF("FactoryResetHandler"); chip::Server::GetInstance().ScheduleFactoryReset(); } @@ -262,18 +261,17 @@ void AppTask::StartThreadButtonEventHandler(void) void AppTask::StartThreadHandler(AppEvent * aEvent) { - + LOG_INF("StartThreadHandler"); if (!chip::DeviceLayer::ConnectivityMgr().IsThreadProvisioned()) { // Switch context from BLE to Thread Internal::BLEManagerImpl sInstance; sInstance.SwitchToIeee802154(); StartDefaultThreadNetwork(); - LOG_INF("Device is not commissioned to a Thread network. Starting with the default configuration."); } else { - LOG_INF("Device is commissioned to a Thread network."); + LOG_INF("Device already commissioned"); } } @@ -289,24 +287,24 @@ void AppTask::StartBleAdvButtonEventHandler(void) void AppTask::StartBleAdvHandler(AppEvent * aEvent) { - LOG_INF("BLE advertising start button pressed"); + LOG_INF("StartBleAdvHandler"); // Don't allow on starting Matter service BLE advertising after Thread provisioning. if (ConnectivityMgr().IsThreadProvisioned()) { - LOG_INF("Matter service BLE advertising not started - device is commissioned to a Thread network."); + LOG_INF("Device already commissioned"); return; } if (ConnectivityMgr().IsBLEAdvertisingEnabled()) { - LOG_INF("BLE advertising is already enabled"); + LOG_INF("BLE adv already enabled"); return; } if (chip::Server::GetInstance().GetCommissioningWindowManager().OpenBasicCommissioningWindow() != CHIP_NO_ERROR) { - LOG_ERR("OpenBasicCommissioningWindow() failed"); + LOG_ERR("OpenBasicCommissioningWindow fail"); } } @@ -370,7 +368,7 @@ void AppTask::PostEvent(AppEvent * aEvent) { if (k_msgq_put(&sAppEventQueue, aEvent, K_NO_WAIT) != 0) { - LOG_INF("Failed to post event to app task event queue"); + LOG_INF("PostEvent fail"); } } @@ -382,7 +380,7 @@ void AppTask::DispatchEvent(AppEvent * aEvent) } else { - LOG_INF("Event received with no handler. Dropping event."); + LOG_INF("Dropping event without handler"); } } diff --git a/examples/light-switch-app/telink/src/main.cpp b/examples/light-switch-app/telink/src/main.cpp index 6fdd0367cbe006..e71632de12fddb 100755 --- a/examples/light-switch-app/telink/src/main.cpp +++ b/examples/light-switch-app/telink/src/main.cpp @@ -36,31 +36,28 @@ int main(void) err = chip::Platform::MemoryInit(); if (err != CHIP_NO_ERROR) { - LOG_ERR("Platform::MemoryInit() failed"); + LOG_ERR("MemoryInit fail"); goto exit; } - LOG_INF("Init CHIP stack"); err = PlatformMgr().InitChipStack(); if (err != CHIP_NO_ERROR) { - LOG_ERR("PlatformMgr().InitChipStack() failed"); + LOG_ERR("InitChipStack fail"); goto exit; } - LOG_INF("Starting CHIP task"); err = PlatformMgr().StartEventLoopTask(); if (err != CHIP_NO_ERROR) { - LOG_ERR("PlatformMgr().StartEventLoopTask() failed"); + LOG_ERR("StartEventLoopTask fail"); goto exit; } - LOG_INF("Init Thread stack"); err = ThreadStackMgr().InitThreadStack(); if (err != CHIP_NO_ERROR) { - LOG_ERR("ThreadStackMgr().InitThreadStack() failed"); + LOG_ERR("InitThreadStack fail"); goto exit; } @@ -73,13 +70,13 @@ int main(void) #endif if (err != CHIP_NO_ERROR) { - LOG_ERR("ConnectivityMgr().SetThreadDeviceType() failed"); + LOG_ERR("SetThreadDeviceType fail"); goto exit; } err = GetAppTask().StartApp(); exit: - LOG_ERR("Exited with code %" CHIP_ERROR_FORMAT, err.Format()); + LOG_ERR("Exit err %" CHIP_ERROR_FORMAT, err.Format()); return (err == CHIP_NO_ERROR) ? EXIT_SUCCESS : EXIT_FAILURE; } diff --git a/examples/lighting-app/telink/src/AppTask.cpp b/examples/lighting-app/telink/src/AppTask.cpp index a90dc1f89a3156..2a311a2a052413 100644 --- a/examples/lighting-app/telink/src/AppTask.cpp +++ b/examples/lighting-app/telink/src/AppTask.cpp @@ -120,8 +120,7 @@ AppTask AppTask::sAppTask; CHIP_ERROR AppTask::Init() { - LOG_INF("Current Software Version: %u, %s", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION, - CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); + LOG_INF("SW Version: %u, %s", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION, CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); // Initialize status LED LEDWidget::InitGpio(SYSTEM_STATE_LED_PORT); @@ -141,7 +140,7 @@ CHIP_ERROR AppTask::Init() CHIP_ERROR err = LightingMgr().Init(LIGHTING_PWM_DEVICE, LIGHTING_PWM_CHANNEL, minLightLevel, maxLightLevel, maxLightLevel); if (err != CHIP_NO_ERROR) { - LOG_ERR("Failed to int lighting manager"); + LOG_ERR("LightingMgr Init fail"); return err; } LightingMgr().SetCallbacks(ActionInitiated, ActionCompleted); @@ -157,7 +156,7 @@ CHIP_ERROR AppTask::Init() err = mFactoryDataProvider.GetEnableKey(enableKey); if (err != CHIP_NO_ERROR) { - LOG_ERR("mFactoryDataProvider.GetEnableKey() failed. Could not delegate a test event trigger"); + LOG_ERR("GetEnableKey fail"); memset(sTestEventTriggerEnableKey, 0, sizeof(sTestEventTriggerEnableKey)); } #else @@ -188,7 +187,7 @@ CHIP_ERROR AppTask::Init() err = ConnectivityMgr().SetBLEDeviceName("TelinkLight"); if (err != CHIP_NO_ERROR) { - LOG_ERR("Fail to set BLE device name"); + LOG_ERR("SetBLEDeviceName fail"); } return err; @@ -200,7 +199,7 @@ CHIP_ERROR AppTask::StartApp() if (err != CHIP_NO_ERROR) { - LOG_ERR("AppTask.Init() failed"); + LOG_ERR("AppTask Init fail"); return err; } @@ -247,7 +246,9 @@ void AppTask::LightingActionEventHandler(AppEvent * aEvent) } if (action != LightingManager::INVALID_ACTION && !LightingMgr().InitiateAction(action, actor, 0, NULL)) - LOG_INF("Action is already in progress or active."); + { + LOG_INF("Action is in progress or active"); + } } void AppTask::FactoryResetButtonEventHandler(void) @@ -262,7 +263,7 @@ void AppTask::FactoryResetButtonEventHandler(void) void AppTask::FactoryResetHandler(AppEvent * aEvent) { - LOG_INF("Factory Reset triggered."); + LOG_INF("FactoryResetHandler"); chip::Server::GetInstance().ScheduleFactoryReset(); } @@ -278,18 +279,17 @@ void AppTask::StartThreadButtonEventHandler(void) void AppTask::StartThreadHandler(AppEvent * aEvent) { - + LOG_INF("StartThreadHandler"); if (!chip::DeviceLayer::ConnectivityMgr().IsThreadProvisioned()) { // Switch context from BLE to Thread Internal::BLEManagerImpl sInstance; sInstance.SwitchToIeee802154(); StartDefaultThreadNetwork(); - LOG_INF("Device is not commissioned to a Thread network. Starting with the default configuration."); } else { - LOG_INF("Device is commissioned to a Thread network."); + LOG_INF("Device already commissioned"); } } @@ -305,24 +305,24 @@ void AppTask::StartBleAdvButtonEventHandler(void) void AppTask::StartBleAdvHandler(AppEvent * aEvent) { - LOG_INF("BLE advertising start button pressed"); + LOG_INF("StartBleAdvHandler"); // Don't allow on starting Matter service BLE advertising after Thread provisioning. if (ConnectivityMgr().IsThreadProvisioned()) { - LOG_INF("Matter service BLE advertising not started - device is commissioned to a Thread network."); + LOG_INF("Device already commissioned"); return; } if (ConnectivityMgr().IsBLEAdvertisingEnabled()) { - LOG_INF("BLE advertising is already enabled"); + LOG_INF("BLE adv already enabled"); return; } if (chip::Server::GetInstance().GetCommissioningWindowManager().OpenBasicCommissioningWindow() != CHIP_NO_ERROR) { - LOG_ERR("OpenBasicCommissioningWindow() failed"); + LOG_ERR("OpenBasicCommissioningWindow fail"); } } @@ -376,15 +376,15 @@ void AppTask::ActionInitiated(LightingManager::Action_t aAction, int32_t aActor) { if (aAction == LightingManager::ON_ACTION) { - LOG_INF("Turn On Action has been initiated"); + LOG_INF("ON_ACTION initiated"); } else if (aAction == LightingManager::OFF_ACTION) { - LOG_INF("Turn Off Action has been initiated"); + LOG_INF("OFF_ACTION initiated"); } else if (aAction == LightingManager::LEVEL_ACTION) { - LOG_INF("Level Action has been initiated"); + LOG_INF("LEVEL_ACTION initiated"); } } @@ -392,15 +392,15 @@ void AppTask::ActionCompleted(LightingManager::Action_t aAction, int32_t aActor) { if (aAction == LightingManager::ON_ACTION) { - LOG_INF("Turn On Action has been completed"); + LOG_INF("ON_ACTION completed"); } else if (aAction == LightingManager::OFF_ACTION) { - LOG_INF("Turn Off Action has been completed"); + LOG_INF("OFF_ACTION completed"); } else if (aAction == LightingManager::LEVEL_ACTION) { - LOG_INF("Level Action has been completed"); + LOG_INF("LEVEL_ACTION completed"); } if (aActor == AppEvent::kEventType_Button) @@ -422,7 +422,7 @@ void AppTask::PostEvent(AppEvent * aEvent) { if (k_msgq_put(&sAppEventQueue, aEvent, K_NO_WAIT) != 0) { - LOG_INF("Failed to post event to app task event queue"); + LOG_INF("PostEvent fail"); } } @@ -434,7 +434,7 @@ void AppTask::DispatchEvent(AppEvent * aEvent) } else { - LOG_INF("Event received with no handler. Dropping event."); + LOG_INF("Dropping event without handler"); } } @@ -445,14 +445,14 @@ void AppTask::UpdateClusterState() if (status != EMBER_ZCL_STATUS_SUCCESS) { - LOG_ERR("Updating on/off cluster failed: %x", status); + LOG_ERR("Update OnOff fail: %x", status); } status = Clusters::LevelControl::Attributes::CurrentLevel::Set(1, LightingMgr().GetLevel()); if (status != EMBER_ZCL_STATUS_SUCCESS) { - LOG_ERR("Updating level cluster failed: %x", status); + LOG_ERR("Update CurrentLevel fail: %x", status); } } diff --git a/examples/lighting-app/telink/src/main.cpp b/examples/lighting-app/telink/src/main.cpp index 55e75804eec945..2e30e3cc52b6f9 100644 --- a/examples/lighting-app/telink/src/main.cpp +++ b/examples/lighting-app/telink/src/main.cpp @@ -44,31 +44,28 @@ int main(void) err = chip::Platform::MemoryInit(); if (err != CHIP_NO_ERROR) { - LOG_ERR("Platform::MemoryInit() failed"); + LOG_ERR("MemoryInit fail"); goto exit; } - LOG_INF("Init CHIP stack"); err = PlatformMgr().InitChipStack(); if (err != CHIP_NO_ERROR) { - LOG_ERR("PlatformMgr().InitChipStack() failed"); + LOG_ERR("InitChipStack fail"); goto exit; } - LOG_INF("Starting CHIP task"); err = PlatformMgr().StartEventLoopTask(); if (err != CHIP_NO_ERROR) { - LOG_ERR("PlatformMgr().StartEventLoopTask() failed"); + LOG_ERR("StartEventLoopTask fail"); goto exit; } - LOG_INF("Init Thread stack"); err = ThreadStackMgr().InitThreadStack(); if (err != CHIP_NO_ERROR) { - LOG_ERR("ThreadStackMgr().InitThreadStack() failed"); + LOG_ERR("InitThreadStack fail"); goto exit; } @@ -79,13 +76,13 @@ int main(void) #endif if (err != CHIP_NO_ERROR) { - LOG_ERR("ConnectivityMgr().SetThreadDeviceType() failed"); + LOG_ERR("SetThreadDeviceType fail"); goto exit; } err = GetAppTask().StartApp(); exit: - LOG_ERR("Exited with code %" CHIP_ERROR_FORMAT, err.Format()); + LOG_ERR("Exit err %" CHIP_ERROR_FORMAT, err.Format()); return (err == CHIP_NO_ERROR) ? EXIT_SUCCESS : EXIT_FAILURE; } diff --git a/examples/ota-requestor-app/telink/src/AppTask.cpp b/examples/ota-requestor-app/telink/src/AppTask.cpp index 9c8bb471a4317b..8343e3ddc38f65 100644 --- a/examples/ota-requestor-app/telink/src/AppTask.cpp +++ b/examples/ota-requestor-app/telink/src/AppTask.cpp @@ -122,8 +122,7 @@ CHIP_ERROR AppTask::Init() { CHIP_ERROR ret; - LOG_INF("Current Software Version: %u, %s", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION, - CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); + LOG_INF("SW Version: %u, %s", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION, CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); // Initialize status LED LEDWidget::InitGpio(SYSTEM_STATE_LED_PORT); @@ -164,7 +163,7 @@ CHIP_ERROR AppTask::Init() ret = ConnectivityMgr().SetBLEDeviceName("TelinkOTAReq"); if (ret != CHIP_NO_ERROR) { - LOG_ERR("Fail to set BLE device name"); + LOG_ERR("SetBLEDeviceName fail"); return ret; } @@ -177,7 +176,7 @@ CHIP_ERROR AppTask::StartApp() if (err != CHIP_NO_ERROR) { - LOG_ERR("AppTask.Init() failed"); + LOG_ERR("AppTask Init fail"); return err; } @@ -209,7 +208,7 @@ void AppTask::FactoryResetButtonEventHandler(void) void AppTask::FactoryResetHandler(AppEvent * aEvent) { - LOG_INF("Factory Reset triggered."); + LOG_INF("FactoryResetHandler"); chip::Server::GetInstance().ScheduleFactoryReset(); } @@ -225,18 +224,17 @@ void AppTask::StartThreadButtonEventHandler(void) void AppTask::StartThreadHandler(AppEvent * aEvent) { - + LOG_INF("StartThreadHandler"); if (!chip::DeviceLayer::ConnectivityMgr().IsThreadProvisioned()) { // Switch context from BLE to Thread BLEManagerImpl sInstance; sInstance.SwitchToIeee802154(); StartDefaultThreadNetwork(); - LOG_INF("Device is not commissioned to a Thread network. Starting with the default configuration."); } else { - LOG_INF("Device is commissioned to a Thread network."); + LOG_INF("Device already commissioned"); } } @@ -252,24 +250,24 @@ void AppTask::StartBleAdvButtonEventHandler(void) void AppTask::StartBleAdvHandler(AppEvent * aEvent) { - LOG_INF("BLE advertising start button pressed"); + LOG_INF("StartBleAdvHandler"); // Don't allow on starting Matter service BLE advertising after Thread provisioning. if (ConnectivityMgr().IsThreadProvisioned()) { - LOG_INF("Matter service BLE advertising not started - device is commissioned to a Thread network."); + LOG_INF("Device already commissioned"); return; } if (ConnectivityMgr().IsBLEAdvertisingEnabled()) { - LOG_INF("BLE advertising is already enabled"); + LOG_INF("BLE adv already enabled"); return; } if (chip::Server::GetInstance().GetCommissioningWindowManager().OpenBasicCommissioningWindow() != CHIP_NO_ERROR) { - LOG_ERR("OpenBasicCommissioningWindow() failed"); + LOG_ERR("OpenBasicCommissioningWindow fail"); } } @@ -327,7 +325,7 @@ void AppTask::PostEvent(AppEvent * aEvent) { if (k_msgq_put(&sAppEventQueue, aEvent, K_NO_WAIT) != 0) { - LOG_INF("Failed to post event to app task event queue"); + LOG_INF("PostEvent fail"); } } @@ -339,7 +337,7 @@ void AppTask::DispatchEvent(AppEvent * aEvent) } else { - LOG_INF("Event received with no handler. Dropping event."); + LOG_INF("Dropping event without handler"); } } diff --git a/examples/ota-requestor-app/telink/src/main.cpp b/examples/ota-requestor-app/telink/src/main.cpp index 48adaee45a5115..dd1480f6677e45 100644 --- a/examples/ota-requestor-app/telink/src/main.cpp +++ b/examples/ota-requestor-app/telink/src/main.cpp @@ -36,31 +36,28 @@ int main(void) err = chip::Platform::MemoryInit(); if (err != CHIP_NO_ERROR) { - LOG_ERR("Platform::MemoryInit() failed"); + LOG_ERR("MemoryInit fail"); goto exit; } - LOG_INF("Init CHIP stack"); err = PlatformMgr().InitChipStack(); if (err != CHIP_NO_ERROR) { - LOG_ERR("PlatformMgr().InitChipStack() failed"); + LOG_ERR("InitChipStack fail"); goto exit; } - LOG_INF("Starting CHIP task"); err = PlatformMgr().StartEventLoopTask(); if (err != CHIP_NO_ERROR) { - LOG_ERR("PlatformMgr().StartEventLoopTask() failed"); + LOG_ERR("StartEventLoopTask fail"); goto exit; } - LOG_INF("Init Thread stack"); err = ThreadStackMgr().InitThreadStack(); if (err != CHIP_NO_ERROR) { - LOG_ERR("ThreadStackMgr().InitThreadStack() failed"); + LOG_ERR("InitThreadStack fail"); goto exit; } @@ -71,13 +68,13 @@ int main(void) #endif if (err != CHIP_NO_ERROR) { - LOG_ERR("ConnectivityMgr().SetThreadDeviceType() failed"); + LOG_ERR("SetThreadDeviceType fail"); goto exit; } err = GetAppTask().StartApp(); exit: - LOG_ERR("Exited with code %" CHIP_ERROR_FORMAT, err.Format()); + LOG_ERR("Exit err %" CHIP_ERROR_FORMAT, err.Format()); return (err == CHIP_NO_ERROR) ? EXIT_SUCCESS : EXIT_FAILURE; } diff --git a/examples/platform/telink/util/src/ButtonManager.cpp b/examples/platform/telink/util/src/ButtonManager.cpp index 6a5d6055f53702..9afc6ed0f2493d 100644 --- a/examples/platform/telink/util/src/ButtonManager.cpp +++ b/examples/platform/telink/util/src/ButtonManager.cpp @@ -46,14 +46,14 @@ int Button::Init(void) ret = gpio_pin_configure(mPort, mOutPin, GPIO_OUTPUT_ACTIVE); if (ret < 0) { - LOG_ERR("Configure out pin - fail. Status %d", ret); + LOG_ERR("Config out pin err: %d", ret); return ret; } ret = gpio_pin_configure(mPort, mInPin, GPIO_INPUT | GPIO_PULL_DOWN); if (ret < 0) { - LOG_ERR("Configure in pin - fail. Status %d", ret); + LOG_ERR("Config in pin err: %d", ret); return ret; } @@ -68,7 +68,7 @@ int Button::Deinit(void) ret = gpio_pin_configure(mPort, mOutPin, GPIO_INPUT | GPIO_PULL_DOWN); if (ret < 0) { - LOG_ERR("Reconfigure out pin - fail. Status %d", ret); + LOG_ERR("Reconfig out pin err: %d", ret); return ret; } diff --git a/examples/thermostat/telink/src/AppTask.cpp b/examples/thermostat/telink/src/AppTask.cpp index df25ef8cfb4c19..e56092d65262a1 100644 --- a/examples/thermostat/telink/src/AppTask.cpp +++ b/examples/thermostat/telink/src/AppTask.cpp @@ -117,8 +117,7 @@ CHIP_ERROR AppTask::Init() { CHIP_ERROR err; - LOG_INF("Current Software Version: %u, %s", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION, - CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); + LOG_INF("SW Version: %u, %s", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION, CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); // Initialize status LED LEDWidget::InitGpio(SYSTEM_STATE_LED_PORT); @@ -139,7 +138,7 @@ CHIP_ERROR AppTask::Init() err = mFactoryDataProvider.GetEnableKey(enableKey); if (err != CHIP_NO_ERROR) { - LOG_ERR("mFactoryDataProvider.GetEnableKey() failed. Could not delegate a test event trigger"); + LOG_ERR("GetEnableKey fail"); memset(sTestEventTriggerEnableKey, 0, sizeof(sTestEventTriggerEnableKey)); } #else @@ -170,20 +169,20 @@ CHIP_ERROR AppTask::Init() err = SensorMgr().Init(); if (err != CHIP_NO_ERROR) { - LOG_ERR("SensorMgr::Init() failed"); + LOG_ERR("SensorMgr Init fail"); return err; } err = TempMgr().Init(); if (err != CHIP_NO_ERROR) { - LOG_ERR("TempMgr::Init() failed"); + LOG_ERR("TempMgr Init fail"); return err; } err = ConnectivityMgr().SetBLEDeviceName("TelinkThermo"); if (err != CHIP_NO_ERROR) { - LOG_ERR("Fail to set BLE device name"); + LOG_ERR("SetBLEDeviceName fail"); } return err; @@ -195,7 +194,7 @@ CHIP_ERROR AppTask::StartApp() if (err != CHIP_NO_ERROR) { - LOG_ERR("AppTask.Init() failed"); + LOG_ERR("AppTask Init fail"); return err; } @@ -233,7 +232,7 @@ void AppTask::FactoryResetButtonEventHandler(void) void AppTask::FactoryResetHandler(AppEvent * aEvent) { - LOG_INF("Factory Reset triggered."); + LOG_INF("FactoryResetHandler"); chip::Server::GetInstance().ScheduleFactoryReset(); } @@ -249,18 +248,17 @@ void AppTask::StartThreadButtonEventHandler(void) void AppTask::StartThreadHandler(AppEvent * aEvent) { - + LOG_INF("StartThreadHandler"); if (!chip::DeviceLayer::ConnectivityMgr().IsThreadProvisioned()) { // Switch context from BLE to Thread Internal::BLEManagerImpl sInstance; sInstance.SwitchToIeee802154(); StartDefaultThreadNetwork(); - LOG_INF("Device is not commissioned to a Thread network. Starting with the default configuration."); } else { - LOG_INF("Device is commissioned to a Thread network."); + LOG_INF("Device already commissioned"); } } @@ -276,24 +274,24 @@ void AppTask::StartBleAdvButtonEventHandler(void) void AppTask::StartBleAdvHandler(AppEvent * aEvent) { - LOG_INF("BLE advertising start button pressed"); + LOG_INF("StartBleAdvHandler"); // Don't allow on starting Matter service BLE advertising after Thread provisioning. if (ConnectivityMgr().IsThreadProvisioned()) { - LOG_INF("Matter service BLE advertising not started - device is commissioned to a Thread network."); + LOG_INF("Device already commissioned"); return; } if (ConnectivityMgr().IsBLEAdvertisingEnabled()) { - LOG_INF("BLE advertising is already enabled"); + LOG_INF("BLE adv already enabled"); return; } if (chip::Server::GetInstance().GetCommissioningWindowManager().OpenBasicCommissioningWindow() != CHIP_NO_ERROR) { - LOG_ERR("OpenBasicCommissioningWindow() failed"); + LOG_ERR("OpenBasicCommissioningWindow fail"); } } @@ -347,7 +345,7 @@ void AppTask::PostEvent(AppEvent * aEvent) { if (k_msgq_put(&sAppEventQueue, aEvent, K_NO_WAIT) != 0) { - LOG_INF("Failed to post event to app task event queue"); + LOG_INF("PostEvent fail"); } } @@ -359,7 +357,7 @@ void AppTask::DispatchEvent(AppEvent * aEvent) } else { - LOG_INF("Event received with no handler. Dropping event."); + LOG_INF("Dropping event without handler"); } } diff --git a/examples/thermostat/telink/src/main.cpp b/examples/thermostat/telink/src/main.cpp index 6fdd0367cbe006..e71632de12fddb 100755 --- a/examples/thermostat/telink/src/main.cpp +++ b/examples/thermostat/telink/src/main.cpp @@ -36,31 +36,28 @@ int main(void) err = chip::Platform::MemoryInit(); if (err != CHIP_NO_ERROR) { - LOG_ERR("Platform::MemoryInit() failed"); + LOG_ERR("MemoryInit fail"); goto exit; } - LOG_INF("Init CHIP stack"); err = PlatformMgr().InitChipStack(); if (err != CHIP_NO_ERROR) { - LOG_ERR("PlatformMgr().InitChipStack() failed"); + LOG_ERR("InitChipStack fail"); goto exit; } - LOG_INF("Starting CHIP task"); err = PlatformMgr().StartEventLoopTask(); if (err != CHIP_NO_ERROR) { - LOG_ERR("PlatformMgr().StartEventLoopTask() failed"); + LOG_ERR("StartEventLoopTask fail"); goto exit; } - LOG_INF("Init Thread stack"); err = ThreadStackMgr().InitThreadStack(); if (err != CHIP_NO_ERROR) { - LOG_ERR("ThreadStackMgr().InitThreadStack() failed"); + LOG_ERR("InitThreadStack fail"); goto exit; } @@ -73,13 +70,13 @@ int main(void) #endif if (err != CHIP_NO_ERROR) { - LOG_ERR("ConnectivityMgr().SetThreadDeviceType() failed"); + LOG_ERR("SetThreadDeviceType fail"); goto exit; } err = GetAppTask().StartApp(); exit: - LOG_ERR("Exited with code %" CHIP_ERROR_FORMAT, err.Format()); + LOG_ERR("Exit err %" CHIP_ERROR_FORMAT, err.Format()); return (err == CHIP_NO_ERROR) ? EXIT_SUCCESS : EXIT_FAILURE; } diff --git a/src/platform/telink/BLEManagerImpl.cpp b/src/platform/telink/BLEManagerImpl.cpp index d22a2a8ddbec08..f11d3c087678b6 100644 --- a/src/platform/telink/BLEManagerImpl.cpp +++ b/src/platform/telink/BLEManagerImpl.cpp @@ -254,7 +254,7 @@ CHIP_ERROR BLEManagerImpl::StartAdvertising(void) if (ConnectivityMgr().IsThreadProvisioned()) { - ChipLogProgress(DeviceLayer, "Thread provisioned. Start advertisement not possible"); + ChipLogProgress(DeviceLayer, "Thread provisioned, can't StartAdvertising"); return CHIP_ERROR_INCORRECT_STATE; } @@ -266,7 +266,7 @@ CHIP_ERROR BLEManagerImpl::StartAdvertising(void) /* Block IEEE802154 */ /* @todo: move to RadioSwitch module*/ const struct device * radio_dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_ieee802154)); - __ASSERT(radio_dev != NULL, "Fail to get radio device"); + __ASSERT(radio_dev != NULL, "Get radio_dev fail"); b91_deinit(radio_dev); /* Init BLE stack */ @@ -351,7 +351,7 @@ CHIP_ERROR BLEManagerImpl::StopAdvertising(void) { if (ConnectivityMgr().IsThreadProvisioned()) { - ChipLogProgress(DeviceLayer, "Thread provisioned. Advertisement already stopped at this stage"); + ChipLogProgress(DeviceLayer, "Thread provisioned, StopAdvertising done"); return CHIP_ERROR_INCORRECT_STATE; } @@ -891,7 +891,7 @@ void BLEManagerImpl::BLEConnDisconnect(System::Layer * layer, void * param) int error = bt_conn_disconnect(BLEMgrImpl().mconId, BT_HCI_ERR_LOCALHOST_TERM_CONN); if (error) { - ChipLogError(DeviceLayer, "Failed to close BLE connection, error: %d", error); + ChipLogError(DeviceLayer, "Close BLEConn err: %d", error); } } @@ -919,8 +919,7 @@ CHIP_ERROR BLEManagerImpl::HandleThreadStateChange(const ChipDeviceEvent * event attachEvent.ThreadConnectivityChange.Result = kConnectivity_Established; error = PlatformMgr().PostEvent(&attachEvent); - VerifyOrExit(error == CHIP_NO_ERROR, - ChipLogError(DeviceLayer, "Failed to post Thread connectivity change: %" CHIP_ERROR_FORMAT, error.Format())); + VerifyOrExit(error == CHIP_NO_ERROR, ChipLogError(DeviceLayer, "PostEvent err: %" CHIP_ERROR_FORMAT, error.Format())); ChipLogDetail(DeviceLayer, "Thread Connectivity Ready"); ThreadConnectivityReady = true; @@ -946,7 +945,7 @@ void BLEManagerImpl::SwitchToIeee802154(void) { int result = 0; - ChipLogProgress(DeviceLayer, "BLEManagerImpl::Switch to IEEE802154"); + ChipLogProgress(DeviceLayer, "SwitchToIeee802154"); /* Stop BLE */ StopAdvertising(); @@ -957,11 +956,11 @@ void BLEManagerImpl::SwitchToIeee802154(void) BLERadioInitialized = false; const struct device * radio_dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_ieee802154)); - __ASSERT(radio_dev != NULL, "Fail to get radio device"); + __ASSERT(radio_dev != NULL, "Get radio_dev fail"); /* Init IEEE802154 */ result = b91_init(radio_dev); - __ASSERT(result == 0, "Fail to init IEEE802154 radio. Error: %d", result); + __ASSERT(result == 0, "Init IEEE802154 err: %d", result); } } // namespace Internal