Skip to content

Commit

Permalink
Merge branch 'master' into update_mode_select_xml_to_rflect_fall_23_spec
Browse files Browse the repository at this point in the history
  • Loading branch information
hicklin authored Jun 5, 2023
2 parents 226b099 + 8ba86ec commit 8ea4a15
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 4 deletions.
12 changes: 8 additions & 4 deletions config/esp32/components/chip/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,15 @@ menu "CHIP Core"
int "Set threshold in ms"
default 700
help
Time threshold for warning that dispatched took too long. You can
set this default set to 0 to to disable event dispatching time
measurement and suppress the logs "Long dispatch time:...".
Time threshold for warning that dispatched took too long. You can
set this default set to 0 to to disable event dispatching time
measurement and suppress the logs "Long dispatch time:...".

# TODO: add log level selection
config CHIP_LOG_FILTERING
bool "CHIP log level filtering APIs"
default n
help
Option to enable/disable CHIP log level filtering APIs.

endmenu # "General Options"

Expand Down
7 changes: 7 additions & 0 deletions config/nrfconnect/chip-module/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,13 @@ config CHIP_FACTORY_DATA_VERSION
this value in the factory data provider implementation to verify that the
factory data saved in the flash memory has the expected version.

config CHIP_FACTORY_DATA_ROTATING_DEVICE_UID_MAX_LEN
int "Maximum length of rotating device ID unique ID in bytes"
default 16
depends on CHIP_FACTORY_DATA
help
Maximum acceptable length of rotating device ID unique ID in bytes.

if CHIP_FACTORY_DATA_BUILD

# Factory data definitions
Expand Down
4 changes: 4 additions & 0 deletions src/platform/ESP32/CHIPPlatformConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@
// The ESP NVS implementation limits key names to 15 characters.
#define CHIP_CONFIG_PERSISTED_STORAGE_MAX_KEY_LENGTH 15

#ifndef CONFIG_CHIP_LOG_FILTERING
#define CHIP_LOG_FILTERING 0
#else
#define CHIP_LOG_FILTERING CONFIG_CHIP_LOG_FILTERING
#endif

#define CHIP_CONFIG_ABORT() abort()

Expand Down
12 changes: 12 additions & 0 deletions src/platform/nrfconnect/CHIPDevicePlatformConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,3 +249,15 @@
#ifdef CONFIG_CHIP_EXTENDED_DISCOVERY
#define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY 1
#endif // CONFIG_CHIP_EXTENDED_DISCOVERY

#ifndef CHIP_DEVICE_CONFIG_ROTATING_DEVICE_ID_UNIQUE_ID_LENGTH
#if CONFIG_CHIP_FACTORY_DATA
// UID will be copied from the externally programmed factory data, so we don't know the actual length and we need to assume some max
// boundary.
#define CHIP_DEVICE_CONFIG_ROTATING_DEVICE_ID_UNIQUE_ID_LENGTH CONFIG_CHIP_FACTORY_DATA_ROTATING_DEVICE_UID_MAX_LEN
#else
// UID will be copied from hex encoded Kconfig option, so we may calculate its length in bytes by subtracting null terminator and
// dividing size by 2.
#define CHIP_DEVICE_CONFIG_ROTATING_DEVICE_ID_UNIQUE_ID_LENGTH ((sizeof(CONFIG_CHIP_DEVICE_ROTATING_DEVICE_UID) - 1) / 2)
#endif // CONFIG_CHIP_FACTORY_DATA
#endif // CHIP_DEVICE_CONFIG_ROTATING_DEVICE_ID_UNIQUE_ID_LENGTH
2 changes: 2 additions & 0 deletions src/platform/nrfconnect/FactoryDataProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,8 @@ CHIP_ERROR FactoryDataProvider<FlashFactoryData>::GetRotatingDeviceIdUniqueId(Mu

memcpy(uniqueIdSpan.data(), mFactoryData.rd_uid.data, mFactoryData.rd_uid.len);

uniqueIdSpan.reduce_size(mFactoryData.rd_uid.len);

return CHIP_NO_ERROR;
}

Expand Down

0 comments on commit 8ea4a15

Please sign in to comment.