Skip to content

Commit

Permalink
Unify OTA for silabs platform (#26131)
Browse files Browse the repository at this point in the history
  • Loading branch information
jepenven-silabs authored and pull[bot] committed Nov 23, 2023
1 parent a304d43 commit 2295872
Show file tree
Hide file tree
Showing 14 changed files with 11 additions and 219 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <app/clusters/ota-requestor/DefaultOTARequestor.h>
#include <app/clusters/ota-requestor/DefaultOTARequestorDriver.h>
#include <app/clusters/ota-requestor/DefaultOTARequestorStorage.h>
#include <platform/silabs/efr32/OTAImageProcessorImpl.h>
#include <platform/silabs/OTAImageProcessorImpl.h>

class OTAConfig
{
Expand Down
2 changes: 1 addition & 1 deletion examples/platform/silabs/SiWx917/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ config("siwx917-common-config") {
}

if (chip_enable_ota_requestor) {
defines += [ "EFR32_OTA_ENABLED" ]
defines += [ "SILABS_OTA_ENABLED" ]
}

if (enable_heap_monitoring) {
Expand Down
2 changes: 1 addition & 1 deletion examples/platform/silabs/SiWx917/matter_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ using namespace ::chip::DeviceLayer;

#include "SilabsDeviceDataProvider.h"

#if EFR32_OTA_ENABLED
#if SILABS_OTA_ENABLED
void SilabsMatterConfig::InitOTARequestorHandler(System::Layer * systemLayer, void * appState)
{
#if 0 // TODO : OTA is not planned now for CCP
Expand Down
4 changes: 2 additions & 2 deletions examples/platform/silabs/efr32/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ config("efr32-common-config") {
}

if (chip_enable_ota_requestor) {
defines += [ "EFR32_OTA_ENABLED" ]
defines += [ "SILABS_OTA_ENABLED" ]
}

if (enable_heap_monitoring) {
Expand Down Expand Up @@ -302,7 +302,7 @@ source_set("efr32-common") {
}

if (chip_enable_ota_requestor) {
sources += [ "OTAConfig.cpp" ]
sources += [ "${silabs_common_plat_dir}/OTAConfig.cpp" ]
}

if (!disable_lcd) {
Expand Down
94 changes: 0 additions & 94 deletions examples/platform/silabs/efr32/OTAConfig.cpp

This file was deleted.

34 changes: 0 additions & 34 deletions examples/platform/silabs/efr32/OTAConfig.h

This file was deleted.

4 changes: 2 additions & 2 deletions examples/platform/silabs/efr32/matter_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ CHIP_ERROR SilabsMatterConfig::InitOpenThread(void)
}
#endif // CHIP_ENABLE_OPENTHREAD

#if EFR32_OTA_ENABLED
#if SILABS_OTA_ENABLED
void SilabsMatterConfig::InitOTARequestorHandler(System::Layer * systemLayer, void * appState)
{
OTAConfig::Init();
Expand All @@ -125,7 +125,7 @@ void SilabsMatterConfig::ConnectivityEventCallback(const ChipDeviceEvent * event
((event->Type == DeviceEventType::kInternetConnectivityChange) &&
(event->InternetConnectivityChange.IPv6 == kConnectivity_Established)))
{
#if EFR32_OTA_ENABLED
#if SILABS_OTA_ENABLED
SILABS_LOG("Scheduling OTA Requestor initialization")
chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds32(OTAConfig::kInitOTARequestorDelaySec),
InitOTARequestorHandler, nullptr);
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/platform/silabs/SiWx917/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ static_library("SiWx917") {
if (chip_enable_ota_requestor) {
sources += [
#"OTAImageProcessorImpl.cpp",
#"OTAImageProcessorImpl.h",
#"${silabs_platform_dir}/OTAImageProcessorImpl.h",
]
}

Expand Down
2 changes: 1 addition & 1 deletion src/platform/silabs/SiWx917/OTAImageProcessorImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
* limitations under the License.
*/

#include "OTAImageProcessorImpl.h"
#include <app/clusters/ota-requestor/OTADownloader.h>
#include <app/clusters/ota-requestor/OTARequestorInterface.h>
#include <platform/silabs/OTAImageProcessorImpl.h>

extern "C" {
#include "btl_interface.h"
Expand Down
2 changes: 1 addition & 1 deletion src/platform/silabs/efr32/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ static_library("efr32") {

if (chip_enable_ota_requestor) {
sources += [
"${silabs_platform_dir}/OTAImageProcessorImpl.h",
"OTAImageProcessorImpl.cpp",
"OTAImageProcessorImpl.h",
]
}

Expand Down
2 changes: 1 addition & 1 deletion src/platform/silabs/efr32/OTAImageProcessorImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
* limitations under the License.
*/

#include "OTAImageProcessorImpl.h"
#include <app/clusters/ota-requestor/OTADownloader.h>
#include <app/clusters/ota-requestor/OTARequestorInterface.h>
#include <platform/silabs/OTAImageProcessorImpl.h>

extern "C" {
#include "btl_interface.h"
Expand Down
80 changes: 0 additions & 80 deletions src/platform/silabs/efr32/OTAImageProcessorImpl.h

This file was deleted.

0 comments on commit 2295872

Please sign in to comment.