From 58a3f1fe8c42517da5d6699087d91c99106c1acb Mon Sep 17 00:00:00 2001 From: Praveen Babu Chandran Date: Fri, 16 Sep 2022 11:51:48 -0700 Subject: [PATCH 1/2] [Infineon] KeyValue Storage write fix for Door Lock credentials --- examples/lock-app/infineon/psoc6/src/AppTask.cpp | 3 +++ src/platform/Infineon/PSOC6/P6Config.cpp | 2 +- third_party/infineon/psoc6/psoc6_sdk/libs/btstack | 2 +- third_party/infineon/psoc6/psoc6_sdk/libs/wifi-host-driver | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/examples/lock-app/infineon/psoc6/src/AppTask.cpp b/examples/lock-app/infineon/psoc6/src/AppTask.cpp index 75a62037caad22..b0dbc3e26d6a3e 100644 --- a/examples/lock-app/infineon/psoc6/src/AppTask.cpp +++ b/examples/lock-app/infineon/psoc6/src/AppTask.cpp @@ -331,6 +331,9 @@ void AppTask::AppTaskMain(void * pvParameter) P6_LOG("App Task started"); + // Users and credentials should be checked once from flash on boot + LockMgr().ReadConfigValues(); + while (true) { BaseType_t eventReceived = xQueueReceive(sAppEventQueue, &event, portMAX_DELAY); diff --git a/src/platform/Infineon/PSOC6/P6Config.cpp b/src/platform/Infineon/PSOC6/P6Config.cpp index 2a4b48df11bf3e..2ef8a5ed038476 100644 --- a/src/platform/Infineon/PSOC6/P6Config.cpp +++ b/src/platform/Infineon/PSOC6/P6Config.cpp @@ -198,7 +198,7 @@ CHIP_ERROR P6Config::WriteConfigValueBin(Key key, const uint8_t * data, size_t d { char key_str[MTB_KVSTORE_MAX_KEY_SIZE] = { 0 }; key.to_str(key_str, MTB_KVSTORE_MAX_KEY_SIZE); - return PersistedStorage::KeyValueStoreMgr().Put(key_str, static_cast(&data), dataLen); + return PersistedStorage::KeyValueStoreMgr().Put(key_str, data, dataLen); } CHIP_ERROR P6Config::ClearConfigValue(Key key) diff --git a/third_party/infineon/psoc6/psoc6_sdk/libs/btstack b/third_party/infineon/psoc6/psoc6_sdk/libs/btstack index 34e7ee4b7de542..205412d987da3f 160000 --- a/third_party/infineon/psoc6/psoc6_sdk/libs/btstack +++ b/third_party/infineon/psoc6/psoc6_sdk/libs/btstack @@ -1 +1 @@ -Subproject commit 34e7ee4b7de542a9f8f779389eccc2a3886c3dbf +Subproject commit 205412d987da3f397201580ac2f98918d1bb0d57 diff --git a/third_party/infineon/psoc6/psoc6_sdk/libs/wifi-host-driver b/third_party/infineon/psoc6/psoc6_sdk/libs/wifi-host-driver index d2a12226145f63..40a7ec2273a950 160000 --- a/third_party/infineon/psoc6/psoc6_sdk/libs/wifi-host-driver +++ b/third_party/infineon/psoc6/psoc6_sdk/libs/wifi-host-driver @@ -1 +1 @@ -Subproject commit d2a12226145f63d870ef789ee88a1d9a28edcee0 +Subproject commit 40a7ec2273a950fbf89353d3eac98c5c1c2fd8cd From 107d7cadd05d398d1b286e3115958ae0ce10f211 Mon Sep 17 00:00:00 2001 From: Praveen Babu Chandran Date: Tue, 20 Sep 2022 11:18:43 -0700 Subject: [PATCH 2/2] [Infineon] Add Infineon build badge to README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 0d0a517dc39aa5..d4447b731a1f00 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ [![Examples - nRF Connect SDK](https://github.com/project-chip/connectedhomeip/workflows/Build%20example%20-%20nRF%20Connect%20SDK/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/examples-nrfconnect.yaml) [![Examples - QPG](https://github.com/project-chip/connectedhomeip/workflows/Build%20example%20-%20QPG/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/examples-qpg.yaml) [![Examples - TI CC26X2X7](https://github.com/project-chip/connectedhomeip/workflows/Build%20example%20-%20TI%20CC26X2X7/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/examples-cc13x2x7_26x2x7.yaml) +[![Build example - Infineon](https://github.com/project-chip/connectedhomeip/actions/workflows/examples-infineon.yaml/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/examples-infineon.yaml) [![Android](https://github.com/project-chip/connectedhomeip/workflows/Android/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/android.yaml)