From 8deb4ff4d53231990d5dd7d773dbce8626f4e129 Mon Sep 17 00:00:00 2001 From: Andrii Bilynskyi Date: Tue, 18 Apr 2023 21:35:23 +0300 Subject: [PATCH] [Telink] Fix build system warnings (#26140) --- config/telink/app/zephyr.conf | 8 +++----- config/telink/chip-module/Kconfig | 10 +++++++--- examples/all-clusters-app/telink/prj.conf | 10 ---------- .../all-clusters-minimal-app/telink/prj.conf | 11 +++------- examples/bridge-app/telink/prj.conf | 9 --------- .../pigweed/telink/PigweedLoggerMutex.h | 2 +- examples/contact-sensor-app/telink/prj.conf | 16 +++------------ .../contact-sensor-app/telink/src/AppTask.cpp | 2 +- .../telink/src/ContactSensorManager.cpp | 2 +- examples/light-switch-app/telink/prj.conf | 14 ++----------- examples/lighting-app/telink/prj.conf | 10 ---------- examples/lock-app/telink/prj.conf | 14 ++----------- examples/ota-requestor-app/telink/prj.conf | 10 ---------- .../telink/common/include/AppTaskCommon.h | 2 +- .../telink/pw_sys_io/sys_io_telink.cc | 2 +- .../platform/telink/util/include/LEDWidget.h | 2 +- .../telink/util/src/ButtonManager.cpp | 12 +++++++---- .../platform/telink/util/src/LEDWidget.cpp | 20 +++++++++++++++---- .../platform/telink/util/src/PWMDevice.cpp | 2 +- .../telink/util/src/PigweedLogger.cpp | 2 +- .../platform/telink/util/src/ThreadUtil.cpp | 2 +- examples/pump-app/telink/prj.conf | 14 ++----------- examples/pump-controller-app/telink/prj.conf | 14 ++----------- .../telink/prj.conf | 14 ++----------- examples/thermostat/telink/prj.conf | 14 ++----------- examples/window-app/telink/prj.conf | 16 +++------------ src/platform/telink/BlePlatformConfig.h | 2 +- 27 files changed, 65 insertions(+), 171 deletions(-) diff --git a/config/telink/app/zephyr.conf b/config/telink/app/zephyr.conf index ebf6c3abe5edfc..2a97b363833dcc 100644 --- a/config/telink/app/zephyr.conf +++ b/config/telink/app/zephyr.conf @@ -22,13 +22,15 @@ CONFIG_SERIAL=y CONFIG_LOG=y CONFIG_LOG_MODE_MINIMAL=y CONFIG_PRINTK=y -CONFIG_ASSERT=y +# CONFIG_ASSERT=y CONFIG_CBPRINTF_LIBC_SUBSTS=y # Set the maximum log level (DEBUG) CONFIG_LOG_DEFAULT_LEVEL=4 CONFIG_MATTER_LOG_LEVEL_DBG=y +CONFIG_MCUBOOT_BOOTUTIL_LIB=y CONFIG_MCUBOOT_UTIL_LOG_LEVEL_DBG=y +CONFIG_NET_LOG=y CONFIG_IEEE802154_DRIVER_LOG_LEVEL_DBG=y CONFIG_NVS_LOG_LEVEL_DBG=y CONFIG_OPENTHREAD_LOG_LEVEL_DEBG=y @@ -125,10 +127,6 @@ CONFIG_TELINK_B91_REBOOT_ON_FAULT=y # Shell settings CONFIG_SHELL=n -CONFIG_SHELL_BACKEND_SERIAL_RX_RING_BUFFER_SIZE=255 - -# Legacy -CONFIG_LEGACY_INCLUDE_PATH=y # BLE MAC address CONFIG_B91_BLE_CTRL_MAC_FLASH_ADDR=0x1FE000 diff --git a/config/telink/chip-module/Kconfig b/config/telink/chip-module/Kconfig index 7760b734632648..bce258355feff8 100644 --- a/config/telink/chip-module/Kconfig +++ b/config/telink/chip-module/Kconfig @@ -152,20 +152,20 @@ config CHIP_LOG_SIZE_OPTIMIZATION config CHIP_BUTTON_MANAGER_IRQ_MODE bool "Use GPIO in an IRQ mode instead of polling the GPIO" - default n + default PM help Use GPIO in an IRQ mode to avoid button polling loop and extend the battery lifetime by waking up by GPIO event. GPIO events are working only with GPIO IRQ. This option changes button matrix configuration. config CHIP_ENABLE_APPLICATION_STATUS_LED bool "Enable application status LED" - default y + default !(PM) help Enable application status LED. config CHIP_ENABLE_PM_DURING_BLE bool "Enable PM during BLE operation" - default y + default PM help Enable PM during BLE operation. @@ -175,3 +175,7 @@ config CHIP_OPENTHREAD_TX_POWER default 0 help OpenThread Transmission power in dBm. + +config SHELL_BACKEND_SERIAL_RX_RING_BUFFER_SIZE + int + default 255 if SHELL_BACKEND_SERIAL diff --git a/examples/all-clusters-app/telink/prj.conf b/examples/all-clusters-app/telink/prj.conf index bc8ce45c357204..549cf67ea46cdf 100644 --- a/examples/all-clusters-app/telink/prj.conf +++ b/examples/all-clusters-app/telink/prj.conf @@ -26,9 +26,7 @@ CONFIG_PWM=y # OpenThread configs CONFIG_OPENTHREAD_MTD=y -CONFIG_OPENTHREAD_FTD=n CONFIG_CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT=n -CONFIG_CHIP_SED_IDLE_INTERVAL=200 CONFIG_CHIP_THREAD_SSED=n # Default OpenThread network settings @@ -63,13 +61,5 @@ CONFIG_CHIP_FACTORY_DATA=n CONFIG_CHIP_FACTORY_DATA_BUILD=n CONFIG_CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE=n -# Enable Button IRQ mode. The poling mode is used by default. -CONFIG_CHIP_BUTTON_MANAGER_IRQ_MODE=n - -# Disable Status LED. -CONFIG_CHIP_ENABLE_APPLICATION_STATUS_LED=y - # Enable Power Management CONFIG_PM=n -CONFIG_PM_DEVICE=n -CONFIG_CHIP_ENABLE_PM_DURING_BLE=n diff --git a/examples/all-clusters-minimal-app/telink/prj.conf b/examples/all-clusters-minimal-app/telink/prj.conf index 7877bed5353dd4..90d531fa2b1087 100644 --- a/examples/all-clusters-minimal-app/telink/prj.conf +++ b/examples/all-clusters-minimal-app/telink/prj.conf @@ -23,7 +23,8 @@ CONFIG_GPIO=y # OpenThread configs CONFIG_OPENTHREAD_MTD=y -CONFIG_OPENTHREAD_FTD=n +CONFIG_CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT=n +CONFIG_CHIP_THREAD_SSED=n # Default OpenThread network settings CONFIG_OPENTHREAD_PANID=4660 @@ -52,14 +53,8 @@ CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART=y # CHIP shell CONFIG_CHIP_LIB_SHELL=n -# Disable factory data support. +# Disable factory data support. CONFIG_CHIP_FACTORY_DATA=n CONFIG_CHIP_FACTORY_DATA_BUILD=n CONFIG_CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE=n CONFIG_CHIP_CERTIFICATION_DECLARATION_STORAGE=n - -# Enable Button IRQ mode. The poling mode is used by default. -CONFIG_CHIP_BUTTON_MANAGER_IRQ_MODE=n - -# Disable Status LED. -CONFIG_CHIP_ENABLE_APPLICATION_STATUS_LED=y diff --git a/examples/bridge-app/telink/prj.conf b/examples/bridge-app/telink/prj.conf index 2d69564ad49b85..777ae516050bee 100644 --- a/examples/bridge-app/telink/prj.conf +++ b/examples/bridge-app/telink/prj.conf @@ -26,9 +26,7 @@ CONFIG_PWM=y # OpenThread configs CONFIG_OPENTHREAD_MTD=n -CONFIG_OPENTHREAD_FTD=y CONFIG_CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT=n -CONFIG_CHIP_SED_IDLE_INTERVAL=200 CONFIG_CHIP_THREAD_SSED=n # Default OpenThread network settings @@ -64,15 +62,8 @@ CONFIG_CHIP_FACTORY_DATA_BUILD=n CONFIG_CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE=n CONFIG_CHIP_CERTIFICATION_DECLARATION_STORAGE=n -# Enable Button IRQ mode. The poling mode is used by default. -CONFIG_CHIP_BUTTON_MANAGER_IRQ_MODE=n - -# Disable Status LED. -CONFIG_CHIP_ENABLE_APPLICATION_STATUS_LED=y - # Enable Power Management CONFIG_PM=n -CONFIG_PM_DEVICE=n # Custom RF power values CONFIG_B91_BLE_CTRL_RF_POWER_P9P11DBM=y diff --git a/examples/common/pigweed/telink/PigweedLoggerMutex.h b/examples/common/pigweed/telink/PigweedLoggerMutex.h index 9a9b7e57d5dfea..1f00287a1581d9 100644 --- a/examples/common/pigweed/telink/PigweedLoggerMutex.h +++ b/examples/common/pigweed/telink/PigweedLoggerMutex.h @@ -20,7 +20,7 @@ #include "PigweedLogger.h" #include "pigweed/RpcService.h" -#include +#include namespace chip { namespace rpc { diff --git a/examples/contact-sensor-app/telink/prj.conf b/examples/contact-sensor-app/telink/prj.conf index 7b643ece5322c4..63794047c764a2 100755 --- a/examples/contact-sensor-app/telink/prj.conf +++ b/examples/contact-sensor-app/telink/prj.conf @@ -26,10 +26,8 @@ CONFIG_PWM=y # OpenThread configs CONFIG_OPENTHREAD_MTD=y -CONFIG_OPENTHREAD_FTD=n -CONFIG_CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT=n -CONFIG_CHIP_SED_IDLE_INTERVAL=200 -CONFIG_CHIP_THREAD_SSED=n +CONFIG_CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT=y +CONFIG_CHIP_THREAD_SSED=n # Default OpenThread network settings CONFIG_OPENTHREAD_PANID=4660 @@ -63,13 +61,5 @@ CONFIG_CHIP_FACTORY_DATA=n CONFIG_CHIP_FACTORY_DATA_BUILD=n CONFIG_CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE=n -# Enable Button IRQ mode. The poling mode is used by default. -CONFIG_CHIP_BUTTON_MANAGER_IRQ_MODE=n - -# Disable Status LED. -CONFIG_CHIP_ENABLE_APPLICATION_STATUS_LED=y - # Enable Power Management -CONFIG_PM=n -CONFIG_PM_DEVICE=n -CONFIG_CHIP_ENABLE_PM_DURING_BLE=n +CONFIG_PM=y diff --git a/examples/contact-sensor-app/telink/src/AppTask.cpp b/examples/contact-sensor-app/telink/src/AppTask.cpp index ab1c8aaef7c5af..3486995097d668 100644 --- a/examples/contact-sensor-app/telink/src/AppTask.cpp +++ b/examples/contact-sensor-app/telink/src/AppTask.cpp @@ -20,8 +20,8 @@ #include +#include #include -#include LOG_MODULE_DECLARE(app, CONFIG_CHIP_APP_LOG_LEVEL); diff --git a/examples/contact-sensor-app/telink/src/ContactSensorManager.cpp b/examples/contact-sensor-app/telink/src/ContactSensorManager.cpp index c0a7612084d000..a5822df5f8515e 100644 --- a/examples/contact-sensor-app/telink/src/ContactSensorManager.cpp +++ b/examples/contact-sensor-app/telink/src/ContactSensorManager.cpp @@ -24,8 +24,8 @@ #include #include +#include #include -#include LOG_MODULE_DECLARE(app, CONFIG_CHIP_APP_LOG_LEVEL); diff --git a/examples/light-switch-app/telink/prj.conf b/examples/light-switch-app/telink/prj.conf index 9b8262eca31d06..baba7213300e00 100755 --- a/examples/light-switch-app/telink/prj.conf +++ b/examples/light-switch-app/telink/prj.conf @@ -26,9 +26,7 @@ CONFIG_PWM=y # OpenThread configs CONFIG_OPENTHREAD_MTD=y -CONFIG_OPENTHREAD_FTD=n -CONFIG_CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT=n -CONFIG_CHIP_SED_IDLE_INTERVAL=200 +CONFIG_CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT=y CONFIG_CHIP_THREAD_SSED=n # Default OpenThread network settings @@ -64,13 +62,5 @@ CONFIG_CHIP_FACTORY_DATA_BUILD=n CONFIG_CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE=n CONFIG_CHIP_CERTIFICATION_DECLARATION_STORAGE=n -# Enable Button IRQ mode. The poling mode is used by default. -CONFIG_CHIP_BUTTON_MANAGER_IRQ_MODE=n - -# Disable Status LED. -CONFIG_CHIP_ENABLE_APPLICATION_STATUS_LED=y - # Enable Power Management -CONFIG_PM=n -CONFIG_PM_DEVICE=n -CONFIG_CHIP_ENABLE_PM_DURING_BLE=n +CONFIG_PM=y diff --git a/examples/lighting-app/telink/prj.conf b/examples/lighting-app/telink/prj.conf index 8cf739a92b55ef..90b24645fc5002 100644 --- a/examples/lighting-app/telink/prj.conf +++ b/examples/lighting-app/telink/prj.conf @@ -26,9 +26,7 @@ CONFIG_PWM=y # OpenThread configs CONFIG_OPENTHREAD_MTD=n -CONFIG_OPENTHREAD_FTD=y CONFIG_CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT=n -CONFIG_CHIP_SED_IDLE_INTERVAL=200 CONFIG_CHIP_THREAD_SSED=n # Default OpenThread network settings @@ -64,16 +62,8 @@ CONFIG_CHIP_FACTORY_DATA_BUILD=n CONFIG_CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE=n CONFIG_CHIP_CERTIFICATION_DECLARATION_STORAGE=n -# Enable Button IRQ mode. The poling mode is used by default. -CONFIG_CHIP_BUTTON_MANAGER_IRQ_MODE=n - -# Disable Status LED. -CONFIG_CHIP_ENABLE_APPLICATION_STATUS_LED=y - # Enable Power Management CONFIG_PM=n -CONFIG_PM_DEVICE=n -CONFIG_CHIP_ENABLE_PM_DURING_BLE=n # Custom RF power values CONFIG_B91_BLE_CTRL_RF_POWER_P9P11DBM=y diff --git a/examples/lock-app/telink/prj.conf b/examples/lock-app/telink/prj.conf index e57b152edb82f8..5de8f1a8f352c1 100755 --- a/examples/lock-app/telink/prj.conf +++ b/examples/lock-app/telink/prj.conf @@ -26,9 +26,7 @@ CONFIG_PWM=y # OpenThread configs CONFIG_OPENTHREAD_MTD=y -CONFIG_OPENTHREAD_FTD=n -CONFIG_CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT=n -CONFIG_CHIP_SED_IDLE_INTERVAL=200 +CONFIG_CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT=y CONFIG_CHIP_THREAD_SSED=n # Default OpenThread network settings @@ -63,13 +61,5 @@ CONFIG_CHIP_FACTORY_DATA=n CONFIG_CHIP_FACTORY_DATA_BUILD=n CONFIG_CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE=n -# Enable Button IRQ mode. The poling mode is used by default. -CONFIG_CHIP_BUTTON_MANAGER_IRQ_MODE=n - -# Disable Status LED. -CONFIG_CHIP_ENABLE_APPLICATION_STATUS_LED=y - # Enable Power Management -CONFIG_PM=n -CONFIG_PM_DEVICE=n -CONFIG_CHIP_ENABLE_PM_DURING_BLE=n +CONFIG_PM=y diff --git a/examples/ota-requestor-app/telink/prj.conf b/examples/ota-requestor-app/telink/prj.conf index 79299b61d3ebc6..c117dd823f3e85 100755 --- a/examples/ota-requestor-app/telink/prj.conf +++ b/examples/ota-requestor-app/telink/prj.conf @@ -26,9 +26,7 @@ CONFIG_PWM=y # OpenThread configs CONFIG_OPENTHREAD_MTD=y -CONFIG_OPENTHREAD_FTD=n CONFIG_CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT=n -CONFIG_CHIP_SED_IDLE_INTERVAL=200 CONFIG_CHIP_THREAD_SSED=n # Default OpenThread network settings @@ -63,13 +61,5 @@ CONFIG_CHIP_CERTIFICATION_DECLARATION_STORAGE=n # CHIP shell CONFIG_CHIP_LIB_SHELL=n -# Enable Button IRQ mode. The poling mode is used by default. -CONFIG_CHIP_BUTTON_MANAGER_IRQ_MODE=n - -# Disable Status LED. -CONFIG_CHIP_ENABLE_APPLICATION_STATUS_LED=y - # Enable Power Management CONFIG_PM=n -CONFIG_PM_DEVICE=n -CONFIG_CHIP_ENABLE_PM_DURING_BLE=n diff --git a/examples/platform/telink/common/include/AppTaskCommon.h b/examples/platform/telink/common/include/AppTaskCommon.h index 772e2255170890..01e02087687e08 100644 --- a/examples/platform/telink/common/include/AppTaskCommon.h +++ b/examples/platform/telink/common/include/AppTaskCommon.h @@ -30,8 +30,8 @@ #endif #include +#include #include -#include #include diff --git a/examples/platform/telink/pw_sys_io/sys_io_telink.cc b/examples/platform/telink/pw_sys_io/sys_io_telink.cc index 37af653075fdc6..ff40aeadd6e583 100644 --- a/examples/platform/telink/pw_sys_io/sys_io_telink.cc +++ b/examples/platform/telink/pw_sys_io/sys_io_telink.cc @@ -20,7 +20,7 @@ #include "pw_sys_io/sys_io.h" #include "zephyr/console/console.h" #include -#include +#include #ifdef CONFIG_USB #include diff --git a/examples/platform/telink/util/include/LEDWidget.h b/examples/platform/telink/util/include/LEDWidget.h index b1e25d4f91a703..de15216a1a8174 100644 --- a/examples/platform/telink/util/include/LEDWidget.h +++ b/examples/platform/telink/util/include/LEDWidget.h @@ -19,7 +19,7 @@ #include #include -#include +#include class LEDWidget { diff --git a/examples/platform/telink/util/src/ButtonManager.cpp b/examples/platform/telink/util/src/ButtonManager.cpp index 4c964ec1b60de4..bdfa0b812a1ad4 100644 --- a/examples/platform/telink/util/src/ButtonManager.cpp +++ b/examples/platform/telink/util/src/ButtonManager.cpp @@ -16,13 +16,11 @@ * limitations under the License. */ -#include #include #include #include #include #include -#include LOG_MODULE_REGISTER(ButtonManager); @@ -37,7 +35,10 @@ void button_pressed(const struct device * dev, struct gpio_callback * cb, uint32 void Button::Configure(const struct device * port, gpio_pin_t outPin, gpio_pin_t inPin, void (*callback)(void)) { - __ASSERT(device_is_ready(port), "%s is not ready\n", port->name); + if (!device_is_ready(port)) + { + LOG_ERR("%s is not ready\n", port->name); + } mPort = port; mOutPin = outPin; @@ -207,7 +208,10 @@ void Button::PollIRQ() void Button::Configure(const struct device * port, gpio_pin_t inPin, void (*callback)(void)) { - __ASSERT(device_is_ready(port), "%s is not ready\n", port->name); + if (!device_is_ready(port)) + { + LOG_ERR("%s is not ready\n", port->name); + } mPort = port; mInPin = inPin; diff --git a/examples/platform/telink/util/src/LEDWidget.cpp b/examples/platform/telink/util/src/LEDWidget.cpp index cefb8bbc1cb2a0..3e63c5e9e9d429 100644 --- a/examples/platform/telink/util/src/LEDWidget.cpp +++ b/examples/platform/telink/util/src/LEDWidget.cpp @@ -18,7 +18,10 @@ #include "LEDWidget.h" -#include +#include +#include + +LOG_MODULE_REGISTER(LEDWidget); const struct device * LEDWidget::mPort = NULL; static LEDWidget::LEDWidgetStateUpdateHandler sStateUpdateCallback; @@ -26,7 +29,10 @@ static LEDWidget::LEDWidgetStateUpdateHandler sStateUpdateCallback; void LEDWidget::InitGpio(const device * port) { mPort = port; - __ASSERT(device_is_ready(mPort), "%s is not ready\n", mPort->name); + if (!device_is_ready(mPort)) + { + LOG_ERR("%s is not ready\n", mPort->name); + } } void LEDWidget::SetStateUpdateCallback(LEDWidgetStateUpdateHandler stateUpdateCb) @@ -43,7 +49,10 @@ void LEDWidget::Init(gpio_pin_t gpioNum) mState = false; int ret = gpio_pin_configure(mPort, mGPIONum, GPIO_OUTPUT_ACTIVE); - __ASSERT(ret >= 0, "GPIO pin %d configure - fail. Status%d\n", mGPIONum, ret); + if (ret < 0) + { + LOG_ERR("GPIO pin %d configure - fail. Status%d\n", mGPIONum, ret); + } k_timer_init(&mLedTimer, &LEDWidget::LedStateTimerHandler, nullptr); k_timer_user_data_set(&mLedTimer, this); @@ -91,7 +100,10 @@ void LEDWidget::DoSet(bool state) { mState = state; int ret = gpio_pin_set(mPort, mGPIONum, state); - __ASSERT(ret >= 0, "GPIO pin %d set -fail. Status: %d\n", mGPIONum, ret); + if (ret < 0) + { + LOG_ERR("GPIO pin %d set -fail. Status: %d\n", mGPIONum, ret); + } } void LEDWidget::UpdateState() diff --git a/examples/platform/telink/util/src/PWMDevice.cpp b/examples/platform/telink/util/src/PWMDevice.cpp index c5e5e6a2374dc5..3bdc8509cb0afa 100644 --- a/examples/platform/telink/util/src/PWMDevice.cpp +++ b/examples/platform/telink/util/src/PWMDevice.cpp @@ -22,8 +22,8 @@ #include #include +#include #include -#include LOG_MODULE_DECLARE(app); diff --git a/examples/platform/telink/util/src/PigweedLogger.cpp b/examples/platform/telink/util/src/PigweedLogger.cpp index 82b2d9f11fd9e2..b1562ae7ee02fd 100644 --- a/examples/platform/telink/util/src/PigweedLogger.cpp +++ b/examples/platform/telink/util/src/PigweedLogger.cpp @@ -24,11 +24,11 @@ * needs to use HDLC/UART for another purpose like the RPC server. */ +#include #include #include #include #include -#include #include #include diff --git a/examples/platform/telink/util/src/ThreadUtil.cpp b/examples/platform/telink/util/src/ThreadUtil.cpp index dad09fe3e945eb..b8c13d54a11edd 100644 --- a/examples/platform/telink/util/src/ThreadUtil.cpp +++ b/examples/platform/telink/util/src/ThreadUtil.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #include diff --git a/examples/pump-app/telink/prj.conf b/examples/pump-app/telink/prj.conf index 6bd026d01cc298..de5cf119a6a831 100755 --- a/examples/pump-app/telink/prj.conf +++ b/examples/pump-app/telink/prj.conf @@ -26,9 +26,7 @@ CONFIG_PWM=y # OpenThread configs CONFIG_OPENTHREAD_MTD=y -CONFIG_OPENTHREAD_FTD=n -CONFIG_CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT=n -CONFIG_CHIP_SED_IDLE_INTERVAL=200 +CONFIG_CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT=y CONFIG_CHIP_THREAD_SSED=n # Default OpenThread network settings @@ -63,13 +61,5 @@ CONFIG_CHIP_FACTORY_DATA=n CONFIG_CHIP_FACTORY_DATA_BUILD=n CONFIG_CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE=n -# Enable Button IRQ mode. The poling mode is used by default. -CONFIG_CHIP_BUTTON_MANAGER_IRQ_MODE=n - -# Disable Status LED. -CONFIG_CHIP_ENABLE_APPLICATION_STATUS_LED=y - # Enable Power Management -CONFIG_PM=n -CONFIG_PM_DEVICE=n -CONFIG_CHIP_ENABLE_PM_DURING_BLE=n +CONFIG_PM=y diff --git a/examples/pump-controller-app/telink/prj.conf b/examples/pump-controller-app/telink/prj.conf index 07b9cd80e6bee4..66074d03470303 100755 --- a/examples/pump-controller-app/telink/prj.conf +++ b/examples/pump-controller-app/telink/prj.conf @@ -26,9 +26,7 @@ CONFIG_PWM=y # OpenThread configs CONFIG_OPENTHREAD_MTD=y -CONFIG_OPENTHREAD_FTD=n -CONFIG_CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT=n -CONFIG_CHIP_SED_IDLE_INTERVAL=200 +CONFIG_CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT=y CONFIG_CHIP_THREAD_SSED=n # Default OpenThread network settings @@ -63,13 +61,5 @@ CONFIG_CHIP_FACTORY_DATA=n CONFIG_CHIP_FACTORY_DATA_BUILD=n CONFIG_CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE=n -# Enable Button IRQ mode. The poling mode is used by default. -CONFIG_CHIP_BUTTON_MANAGER_IRQ_MODE=n - -# Disable Status LED. -CONFIG_CHIP_ENABLE_APPLICATION_STATUS_LED=y - # Enable Power Management -CONFIG_PM=n -CONFIG_PM_DEVICE=n -CONFIG_CHIP_ENABLE_PM_DURING_BLE=n +CONFIG_PM=y diff --git a/examples/temperature-measurement-app/telink/prj.conf b/examples/temperature-measurement-app/telink/prj.conf index 3c35726ec586cf..3f1a6e5bbc4e0d 100644 --- a/examples/temperature-measurement-app/telink/prj.conf +++ b/examples/temperature-measurement-app/telink/prj.conf @@ -26,9 +26,7 @@ CONFIG_PWM=y # OpenThread configs CONFIG_OPENTHREAD_MTD=y -CONFIG_OPENTHREAD_FTD=n -CONFIG_CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT=n -CONFIG_CHIP_SED_IDLE_INTERVAL=200 +CONFIG_CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT=y CONFIG_CHIP_THREAD_SSED=n # Default OpenThread network settings @@ -64,16 +62,8 @@ CONFIG_CHIP_FACTORY_DATA_BUILD=n CONFIG_CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE=n CONFIG_CHIP_CERTIFICATION_DECLARATION_STORAGE=n -# Enable Button IRQ mode. The poling mode is used by default. -CONFIG_CHIP_BUTTON_MANAGER_IRQ_MODE=n - -# Disable Status LED. -CONFIG_CHIP_ENABLE_APPLICATION_STATUS_LED=y - # Enable Power Management -CONFIG_PM=n -CONFIG_PM_DEVICE=n -CONFIG_CHIP_ENABLE_PM_DURING_BLE=n +CONFIG_PM=y # Custom RF power values CONFIG_B91_BLE_CTRL_RF_POWER_P9P11DBM=y diff --git a/examples/thermostat/telink/prj.conf b/examples/thermostat/telink/prj.conf index f2994ffd67ed78..827b3e7cbd32ff 100755 --- a/examples/thermostat/telink/prj.conf +++ b/examples/thermostat/telink/prj.conf @@ -26,9 +26,7 @@ CONFIG_PWM=y # OpenThread configs CONFIG_OPENTHREAD_MTD=y -CONFIG_OPENTHREAD_FTD=n -CONFIG_CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT=n -CONFIG_CHIP_SED_IDLE_INTERVAL=200 +CONFIG_CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT=y CONFIG_CHIP_THREAD_SSED=n # Default OpenThread network settings @@ -64,13 +62,5 @@ CONFIG_CHIP_FACTORY_DATA_BUILD=n CONFIG_CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE=n CONFIG_CHIP_CERTIFICATION_DECLARATION_STORAGE=n -# Enable Button IRQ mode. The poling mode is used by default. -CONFIG_CHIP_BUTTON_MANAGER_IRQ_MODE=n - -# Disable Status LED. -CONFIG_CHIP_ENABLE_APPLICATION_STATUS_LED=y - # Enable Power Management -CONFIG_PM=n -CONFIG_PM_DEVICE=n -CONFIG_CHIP_ENABLE_PM_DURING_BLE=n +CONFIG_PM=y diff --git a/examples/window-app/telink/prj.conf b/examples/window-app/telink/prj.conf index 634afcecb31112..b6e89b2a8938ae 100644 --- a/examples/window-app/telink/prj.conf +++ b/examples/window-app/telink/prj.conf @@ -25,10 +25,8 @@ CONFIG_GPIO=y CONFIG_PWM=y # OpenThread configs -CONFIG_OPENTHREAD_MTD=n -CONFIG_OPENTHREAD_FTD=y -CONFIG_CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT=n -CONFIG_CHIP_SED_IDLE_INTERVAL=200 +CONFIG_OPENTHREAD_MTD=y +CONFIG_CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT=y CONFIG_CHIP_THREAD_SSED=n # Default OpenThread network settings @@ -63,16 +61,8 @@ CONFIG_CHIP_FACTORY_DATA=n CONFIG_CHIP_FACTORY_DATA_BUILD=n CONFIG_CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE=n -# Enable Button IRQ mode. The poling mode is used by default. -CONFIG_CHIP_BUTTON_MANAGER_IRQ_MODE=n - -# Disable Status LED. -CONFIG_CHIP_ENABLE_APPLICATION_STATUS_LED=y - # Enable Power Management -CONFIG_PM=n -CONFIG_PM_DEVICE=n -CONFIG_CHIP_ENABLE_PM_DURING_BLE=n +CONFIG_PM=y # Custom RF power values CONFIG_B91_BLE_CTRL_RF_POWER_P9P11DBM=y diff --git a/src/platform/telink/BlePlatformConfig.h b/src/platform/telink/BlePlatformConfig.h index 8667470deffb68..08b553a5f01c45 100644 --- a/src/platform/telink/BlePlatformConfig.h +++ b/src/platform/telink/BlePlatformConfig.h @@ -24,7 +24,7 @@ #pragma once -#include +#include // ==================== Platform Adaptations ====================