Skip to content

Commit

Permalink
Pull request project-chip#318: Added necessary changes to comply with…
Browse files Browse the repository at this point in the history
… SLC/GSDK integration (project-chip#23478)

Merge in WMN_TOOLS/matter from cherry-pick/bda7a8ca5f5 to silabs_1.0

Squashed commit of the following:

commit 54c7011a451260a5241199a2dec6b8913d23b963
Author: CuRahman <111998767+CuRahman@users.noreply.github.com>
Date:   Tue Nov 8 15:59:56 2022 -0500

    Added necessary changes to comply with SLC/GSDK integration (project-chip#23478)
  • Loading branch information
jmartinez-silabs authored and rerasool committed Nov 23, 2022
1 parent c04f700 commit 9b4a439
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
3 changes: 3 additions & 0 deletions examples/platform/efr32/LEDWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
*/

#include "LEDWidget.h"

extern "C" {
#include "sl_simple_led_instances.h"
}

#include <platform/CHIPDeviceLayer.h>

Expand Down
9 changes: 8 additions & 1 deletion examples/platform/efr32/OTAConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,15 @@

#include "OTAConfig.h"

#include "platform/bootloader/api/application_properties.h"
#include "application_properties.h"
#include <app/server/Server.h>

#if defined(SL_COMPONENT_CATALOG_PRESENT)
#include "sl_component_catalog.h"
#endif

// Only include app properties if the Gecko SDK component that does it automatically isn't present
#if !defined(SL_CATALOG_GECKO_BOOTLOADER_INTERFACE_PRESENT)
// Header used for building the image GBL file
#define APP_PROPERTIES_VERSION 1
#define APP_PROPERTIES_ID \
Expand Down Expand Up @@ -65,6 +71,7 @@ __attribute__((used)) ApplicationProperties_t sl_app_properties = {
/// Pointer to Long Token Data Section
.longTokenSectionAddress = NULL,
};
#endif // SL_CATALOG_GECKO_BOOTLOADER_INTERFACE_PRESENT

// Global OTA objects
chip::DefaultOTARequestor gRequestorCore;
Expand Down
4 changes: 4 additions & 0 deletions examples/platform/efr32/matter_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,12 @@ CHIP_ERROR EFR32MatterConfig::InitOpenThread(void)
}
#endif // CHIP_ENABLE_OPENTHREAD

#if EFR32_OTA_ENABLED
void EFR32MatterConfig::InitOTARequestorHandler(System::Layer * systemLayer, void * appState)
{
OTAConfig::Init();
}
#endif

void EFR32MatterConfig::ConnectivityEventCallback(const ChipDeviceEvent * event, intptr_t arg)
{
Expand All @@ -118,9 +120,11 @@ void EFR32MatterConfig::ConnectivityEventCallback(const ChipDeviceEvent * event,
((event->Type == DeviceEventType::kInternetConnectivityChange) &&
(event->InternetConnectivityChange.IPv6 == kConnectivity_Established)))
{
#if EFR32_OTA_ENABLED
EFR32_LOG("Scheduling OTA Requestor initialization")
chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds32(OTAConfig::kInitOTARequestorDelaySec),
InitOTARequestorHandler, nullptr);
#endif
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/platform/EFR32/OTAImageProcessorImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
#include <app/clusters/ota-requestor/OTARequestorInterface.h>

extern "C" {
#include "platform/bootloader/api/btl_interface.h"
#include "platform/emlib/inc/em_bus.h" // For CORE_CRITICAL_SECTION
#include "btl_interface.h"
#include "em_bus.h" // For CORE_CRITICAL_SECTION
}

#include "EFR32Config.h"
Expand Down

0 comments on commit 9b4a439

Please sign in to comment.