Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SL-TEMP]Add Matter+zigbee cmp logic On matter commissioning complete #66

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
jmartinez-silabs marked this conversation as resolved.
Show resolved Hide resolved
#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
Loading