Skip to content

Commit

Permalink
[SL-ONLY]Add Matter+zigbee cmp logic On matter commissioning complete (
Browse files Browse the repository at this point in the history
  • Loading branch information
jmartinez-silabs authored Nov 1, 2024
1 parent e997be0 commit 95b3d14
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions examples/platform/silabs/BaseApplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@
#include <performance_test_commands.h>
#endif // PERFORMANCE_TEST_ENABLED

// SL-Only
#include "sl_component_catalog.h"
#ifdef SL_CATALOG_ZIGBEE_STACK_COMMON_PRESENT
#include "ZigbeeCallbacks.h"
#include "sl_cmp_config.h"
#endif

/**********************************************************
* Defines and Constants
*********************************************************/
Expand Down Expand Up @@ -873,6 +880,7 @@ void BaseApplication::OnPlatformEvent(const ChipDeviceEvent * event, intptr_t)
AppTask::GetLCD().SetScreen(screen);
}
#endif // DISPLAY_ENABLED

if ((event->ThreadConnectivityChange.Result == kConnectivity_Established) ||
(event->InternetConnectivityChange.IPv6 == kConnectivity_Established))
{
Expand Down Expand Up @@ -916,6 +924,15 @@ void BaseApplication::OnPlatformEvent(const ChipDeviceEvent * event, intptr_t)
ChipLogError(AppServer, "wfx_power_save failed: 0x%lx", err);
}
#endif /* CHIP_CONFIG_ENABLE_ICD_SERVER && RS911X_WIFI */
// SL-Only
#ifdef SL_CATALOG_ZIGBEE_STACK_COMMON_PRESENT
#if defined(SL_MATTER_ZIGBEE_CMP)
uint8_t channel = otLinkGetChannel(DeviceLayer::ThreadStackMgrImpl().OTInstance());
Zigbee::RequestStart(channel); // leave handle internally
#elif defined(SL_MATTER_ZIGBEE_SEQUENTIAL) // Matter Zigbee sequential
Zigbee::RequestLeave();
#endif // SL_MATTER_ZIGBEE_CMP
#endif // SL_CATALOG_ZIGBEE_STACK_COMMON_PRESENT
}
break;
default:
Expand Down

0 comments on commit 95b3d14

Please sign in to comment.