Skip to content

Commit 8021b91

Browse files
[SL-Only]Add Matter+zigbee cmp logic On matter commissioning complete
1 parent aed64e1 commit 8021b91

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

examples/platform/silabs/BaseApplication.cpp

+17
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,13 @@
7474
#include <performance_test_commands.h>
7575
#endif // PERFORMANCE_TEST_ENABLED
7676

77+
// SL-Only
78+
#include "sl_component_catalog.h"
79+
#ifdef SL_CATALOG_ZIGBEE_STACK_COMMON_PRESENT
80+
#include "ZigbeeCallbacks.h"
81+
#include "sl_cmp_config.h"
82+
#endif
83+
7784
/**********************************************************
7885
* Defines and Constants
7986
*********************************************************/
@@ -873,6 +880,7 @@ void BaseApplication::OnPlatformEvent(const ChipDeviceEvent * event, intptr_t)
873880
AppTask::GetLCD().SetScreen(screen);
874881
}
875882
#endif // DISPLAY_ENABLED
883+
876884
if ((event->ThreadConnectivityChange.Result == kConnectivity_Established) ||
877885
(event->InternetConnectivityChange.IPv6 == kConnectivity_Established))
878886
{
@@ -916,6 +924,15 @@ void BaseApplication::OnPlatformEvent(const ChipDeviceEvent * event, intptr_t)
916924
ChipLogError(AppServer, "wfx_power_save failed: 0x%lx", err);
917925
}
918926
#endif /* CHIP_CONFIG_ENABLE_ICD_SERVER && RS911X_WIFI */
927+
// SL-Only
928+
#ifdef SL_CATALOG_ZIGBEE_STACK_COMMON_PRESENT
929+
#if defined(SL_MATTER_ZIGBEE_CMP)
930+
uint8_t channel = otLinkGetChannel(DeviceLayer::ThreadStackMgrImpl().OTInstance());
931+
Zigbee::RequestStart(channel); // leave handle internally
932+
#elif defined(SL_MATTER_ZIGBEE_SEQUENTIAL) // Matter Zigbee sequential
933+
Zigbee::RequestLeave();
934+
#endif // SL_MATTER_ZIGBEE_CMP
935+
#endif // SL_CATALOG_ZIGBEE_STACK_COMMON_PRESENT
919936
}
920937
break;
921938
default:

0 commit comments

Comments
 (0)