Skip to content

Commit

Permalink
removed unnecessary define, added missing bracket
Browse files Browse the repository at this point in the history
  • Loading branch information
Hussein Elsherbini authored and Hussein Elsherbini committed Feb 10, 2023
1 parent 756dc11 commit 50cc59b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/platform/silabs/SilabsConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -506,9 +506,10 @@ exit:;
bool SILABSConfig::ValidConfigKey(Key key)
{
// Returns true if the key is in the Matter nvm3 reserved key range.
// or if the key is in the User Domain key range
// Additional check validates that the user consciously defined the expected key range
if (((key >= kMatterNvm3KeyLoLimit) && (key <= kMatterNvm3KeyHiLimit) && (key >= kMinConfigKey_MatterFactory) &&
(key <= kMaxConfigKey_MatterKvs)) || ((key >= kUserNvm3KeyDomainLoLimit) && (key <= kUserNvm3KeyDomainHiLimit))
(key <= kMaxConfigKey_MatterKvs)) || ((key >= kUserNvm3KeyDomainLoLimit) && (key <= kUserNvm3KeyDomainHiLimit)))
{
return true;
}
Expand Down
5 changes: 2 additions & 3 deletions src/platform/silabs/SilabsConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,8 @@ namespace Internal {
// '08' = Matter nvm3 region
// '72' = the sub region group base offset (Factory, Config, Counter or KVS)
// '01' = the id offset inside the group.
constexpr uint32_t kUserNvm3KeyDomainLoLimit = 0x000000U;
constexpr uint32_t kUserNvm3KeyDomainHiLimit = 0x00FFFFU;
constexpr uint32_t kUserNvm3KeyDomain = 0x000000U;
constexpr uint32_t kUserNvm3KeyDomainLoLimit = 0x000000U; // User Domain NVM3 Key Range lower limit
constexpr uint32_t kUserNvm3KeyDomainHiLimit = 0x00FFFFU; // User Domain NVM3 Key Range Maximum limit
constexpr uint32_t kMatterNvm3KeyDomain = 0x080000U;
constexpr uint32_t kMatterNvm3KeyLoLimit = 0x087200U; // Do not modify without Silabs GSDK team approval
constexpr uint32_t kMatterNvm3KeyHiLimit = 0x087FFFU; // Do not modify without Silabs GSDK team approval
Expand Down

0 comments on commit 50cc59b

Please sign in to comment.