Skip to content

Commit

Permalink
Merge branch 'master' into more_persistence_provider_refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
andy31415 committed Nov 18, 2024
2 parents 66861cf + 10a518b commit 22e9875
Show file tree
Hide file tree
Showing 104 changed files with 15,271 additions and 1,087 deletions.
10 changes: 8 additions & 2 deletions config/esp32/components/chip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,10 @@ if (CONFIG_ENABLE_ESP_INSIGHTS_TRACE)
target_include_directories(${COMPONENT_LIB} INTERFACE "${CHIP_ROOT}/src/tracing/esp32_trace/include")
endif()

if (CONFIG_CHIP_DEVICE_ENABLE_DYNAMIC_SERVER)
chip_gn_arg_append("chip_build_controller_dynamic_server" "true")
endif()

set(args_gn_input "${CMAKE_CURRENT_BINARY_DIR}/args.gn.in")
file(GENERATE OUTPUT "${args_gn_input}" CONTENT "${chip_gn_args}")

Expand Down Expand Up @@ -508,9 +512,11 @@ endif()
idf_component_get_property(lwip_lib lwip COMPONENT_LIB)
list(APPEND chip_libraries $<TARGET_FILE:${lwip_lib}>)

if ("${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}" VERSION_GREATER_EQUAL "5.3" OR CONFIG_ESP32_WIFI_ENABLED)
idf_component_get_property(esp_wifi_lib esp_wifi COMPONENT_LIB)
list(APPEND chip_libraries $<TARGET_FILE:${esp_wifi_lib}>)
endif()

idf_component_get_property(esp_wifi_lib esp_wifi COMPONENT_LIB)
list(APPEND chip_libraries $<TARGET_FILE:${esp_wifi_lib}>)
if (CONFIG_ESP32_WIFI_ENABLED)
idf_component_get_property(esp_wifi_dir esp_wifi COMPONENT_DIR)
if (CONFIG_IDF_TARGET_ESP32C2)
Expand Down
7 changes: 7 additions & 0 deletions config/esp32/components/chip/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,13 @@ menu "CHIP Core"
help
Specifies the maximum number of group key sets supported per fabric.

config CHIP_DEVICE_ENABLE_DYNAMIC_SERVER
bool "Enable dynamic server"
default n
help
Enable dynamic server to handle a different interaction model dispatch.
Can be implied when users do not want to use the same server clusters.

endmenu # "General Options"

menu "Networking Options"
Expand Down
5 changes: 3 additions & 2 deletions config/telink/app/bootloader.conf
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ CONFIG_BOOT_SWAP_USING_SCRATCH=n
CONFIG_BOOT_VALIDATE_SLOT0=y

# Maximum number of image sectors supported by the bootloader.
CONFIG_BOOT_MAX_IMG_SECTORS=4096
# Maximum signed image size: 512 * 4096 = 2M Bytes
CONFIG_BOOT_MAX_IMG_SECTORS=512

# Sets log level for modules which don't specify it explicitly.
# When set to 0 it means log will not be activated for those modules.
Expand All @@ -40,4 +41,4 @@ CONFIG_BOOT_MAX_IMG_SECTORS=4096
# - 2 WARNING, default to write LOG_LEVEL_WRN
# - 3 INFO, default to write LOG_LEVEL_INFO
# - 4 DEBUG, default to write LOG_LEVEL_DBG
CONFIG_LOG_DEFAULT_LEVEL=1
CONFIG_LOG_DEFAULT_LEVEL=3
1 change: 1 addition & 0 deletions config/telink/chip-module/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ config CHIP_ENABLE_POWER_ON_FACTORY_RESET

config CHIP_TASK_STACK_SIZE
int
default 4864 if PM
default 8192

config CHIP_USE_MARS_SENSOR
Expand Down
25 changes: 19 additions & 6 deletions config/telink/chip-module/Kconfig.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ config IDLE_STACK_SIZE
default 512 if PM

config ISR_STACK_SIZE
default 502 if PM
default 576 if PM

config SYSTEM_WORKQUEUE_STACK_SIZE
default 616 if PM
Expand Down Expand Up @@ -154,7 +154,7 @@ config BT_DEVICE_NAME_GATT_WRITABLE
default n

config B9X_BLE_CTRL_THREAD_STACK_SIZE
default 576
default 648

config B9X_BLE_CTRL_MASTER_MAX_NUM
default 0
Expand Down Expand Up @@ -261,10 +261,10 @@ config CHIP_ENABLE_ICD_SUPPORT
default y if CHIP_THREAD_DEVICE_ROLE_SLEEPY_END_DEVICE

config OPENTHREAD_THREAD_STACK_SIZE
default 2178 if PM
default 2400 if PM

config OPENTHREAD_RADIO_WORKQUEUE_STACK_SIZE
default 361 if PM
default 432 if PM
default 608

config OPENTHREAD_SLAAC
Expand Down Expand Up @@ -366,6 +366,9 @@ config CHIP_WIFI_CONNECTION_RECOVERY_JITTER
a random jitter interval is added to it to avoid periodicity. The random jitter is selected
within range [-JITTER; +JITTER].

config NET_MGMT_EVENT_STACK_SIZE
default 1128

endif # CHIP_WIFI

config CHIP_ENABLE_PAIRING_AUTOSTART
Expand Down Expand Up @@ -448,7 +451,17 @@ config PWM_SHELL
config OPENTHREAD_SHELL
default n

config CHIP_TASK_STACK_SIZE
default 4864 if PM
# Thread analyzer
config THREAD_ANALYZER
default n
select THREAD_ANALYZER_AUTO

config THREAD_ANALYZER_AUTO_INTERVAL
default 5
depends on THREAD_ANALYZER_AUTO

config THREAD_ANALYZER_LOG_LEVEL
default 3 # info
depends on THREAD_ANALYZER

endif
3 changes: 3 additions & 0 deletions examples/all-clusters-app/nrfconnect/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,6 @@ CONFIG_CHIP_QSPI_NOR=n

# Enable the Read Client for binding purposes
CONFIG_CHIP_ENABLE_READ_CLIENT=y

# Increase the settings partition
CONFIG_PM_PARTITION_SIZE_SETTINGS_STORAGE=0x8000
4 changes: 2 additions & 2 deletions examples/all-clusters-app/nxp/rt/rt1060/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rt106
build-time which will enable the device to join the Wi-Fi AP at startup):

```
user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rt1060$ gn gen --args="chip_enable_wifi=true iwx12_transceiver=true evkname=\"evkcmimxrt1060\" chip_config_network_layer_ble=false tcp_download=true wifi_ssid=\"your_wifi_ssid\" wifi_password=\"your_wifi_password\"" out/debug
user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rt1060$ export ssid_name=<nwk_ssid> && export ssid_password=<nwk_password> && gn gen --args="chip_enable_wifi=true iwx12_transceiver=true evkname=\"evkcmimxrt1060\" chip_config_network_layer_ble=false wifi_auto_connect_at_boot=true wifi_auto_connect_at_boot_ssid=\"${ssid_name}\" wifi_auto_connect_at_boot_password=\"${ssid_password}\"" out/debug
user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rt1060$ ninja -C out/debug
```

Expand Down Expand Up @@ -400,7 +400,7 @@ user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rt106
- Build Matter with Border Router configuration with onnetwork commissioning:

```
user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rt1060$ gn gen --args="chip_enable_wifi=true w8801_transceiver=true nxp_enable_matter_cli=true chip_config_network_layer_ble=false wifi_auto_connect_at_boot=true wifi_auto_connect_at_boot_ssid=\"your_wifi_ssid\" wifi_auto_connect_at_boot_password=\"your_wifi_password\" chip_enable_openthread=true k32w0_transceiver=true k32w0_transceiver_bin_path=\"/path/to/ot-rcp/ot-rcp-ble-hci-bb-k32w061.elf.bin.h\"" out/debug
user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rt1060$ export ssid_name=<nwk_ssid> && export ssid_password=<nwk_password> && gn gen --args="chip_enable_wifi=true w8801_transceiver=true nxp_enable_matter_cli=true chip_config_network_layer_ble=false wifi_auto_connect_at_boot=true wifi_auto_connect_at_boot_ssid=\"${ssid_name}\" wifi_auto_connect_at_boot_password=\"${ssid_password}\" chip_enable_openthread=true k32w0_transceiver=true k32w0_transceiver_bin_path=\"/path/to/ot-rcp/ot-rcp-ble-hci-bb-k32w061.elf.bin.h\"" out/debug
user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rt1060$ ninja -C out/debug
```

Expand Down
3 changes: 3 additions & 0 deletions examples/all-clusters-minimal-app/nrfconnect/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,6 @@ CONFIG_CHIP_QSPI_NOR=n
# Enable Factory Data feature
CONFIG_CHIP_FACTORY_DATA=y
CONFIG_CHIP_FACTORY_DATA_BUILD=y

# Increase the settings partition
CONFIG_PM_PARTITION_SIZE_SETTINGS_STORAGE=0x8000
35 changes: 6 additions & 29 deletions examples/chef/common/chef-fan-control-manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,6 @@ FanControl::FanModeEnum ChefFanControlManager::SpeedToFanMode(uint8_t speed)

void ChefFanControlManager::SetPercentCurrent(uint8_t aNewPercentCurrent)
{
if (aNewPercentCurrent == mPercentCurrent)
{
return;
}

ChipLogDetail(NotSpecified, "ChefFanControlManager::SetPercentCurrent: %d", aNewPercentCurrent);
mPercentCurrent = aNewPercentCurrent;
Status status = FanControl::Attributes::PercentCurrent::Set(mEndpoint, mPercentCurrent);
Expand All @@ -224,12 +219,6 @@ void ChefFanControlManager::SetPercentCurrent(uint8_t aNewPercentCurrent)

void ChefFanControlManager::SetSpeedCurrent(uint8_t aNewSpeedCurrent)
{
if (aNewSpeedCurrent == mSpeedCurrent)
{
return;
}

ChipLogDetail(NotSpecified, "ChefFanControlManager::SetSpeedCurrent: %d", aNewSpeedCurrent);
mSpeedCurrent = aNewSpeedCurrent;
Status status = FanControl::Attributes::SpeedCurrent::Set(mEndpoint, aNewSpeedCurrent);
if (status != Status::Success)
Expand All @@ -245,11 +234,8 @@ void ChefFanControlManager::FanModeWriteCallback(FanControl::FanModeEnum aNewFan
switch (aNewFanMode)
{
case FanControl::FanModeEnum::kOff: {
if (mSpeedCurrent != 0)
{
DataModel::Nullable<uint8_t> speedSetting(0);
SetSpeedSetting(speedSetting);
}
DataModel::Nullable<uint8_t> speedSetting(0);
SetSpeedSetting(speedSetting);
break;
}
case FanControl::FanModeEnum::kLow: {
Expand Down Expand Up @@ -291,20 +277,11 @@ void ChefFanControlManager::FanModeWriteCallback(FanControl::FanModeEnum aNewFan

void ChefFanControlManager::SetSpeedSetting(DataModel::Nullable<uint8_t> aNewSpeedSetting)
{
if (aNewSpeedSetting.IsNull())
{
ChipLogError(NotSpecified, "ChefFanControlManager::SetSpeedSetting: null value is invalid");
return;
}

if (aNewSpeedSetting.Value() != mSpeedCurrent)
Status status = FanControl::Attributes::SpeedSetting::Set(mEndpoint, aNewSpeedSetting);
if (status != Status::Success)
{
Status status = FanControl::Attributes::SpeedSetting::Set(mEndpoint, aNewSpeedSetting);
if (status != Status::Success)
{
ChipLogError(NotSpecified, "ChefFanControlManager::SetSpeedSetting: failed to set SpeedSetting attribute: %d",
to_underlying(status));
}
ChipLogError(NotSpecified, "ChefFanControlManager::SetSpeedSetting: failed to set SpeedSetting attribute: %d",
to_underlying(status));
}
}

Expand Down
Loading

0 comments on commit 22e9875

Please sign in to comment.