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

[Infineon] Support Identify cluster in lock-app for CYW30739 #21475

Merged
Merged
Show file tree
Hide file tree
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
11 changes: 11 additions & 0 deletions examples/lock-app/cyw30739/src/ZclCallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,17 @@ void MatterPostAttributeChangeCallback(const app::ConcreteAttributePath & attrib
return;
}
break;
case Identify::Id:
if (attributePath.mAttributeId == Identify::Attributes::IdentifyTime::Id)
{
uint16_t identifyTime;
if (EMBER_ZCL_STATUS_SUCCESS == Identify::Attributes::IdentifyTime::Get(attributePath.mEndpointId, &identifyTime))
{
ChipLogProgress(Zcl, "IdentifyTime %u", identifyTime);
return;
}
}
break;
default:
printf("Unhandled cluster ID: 0x%04lx\n", attributePath.mClusterId);
return;
Expand Down
8 changes: 8 additions & 0 deletions examples/lock-app/cyw30739/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <OTAConfig.h>
#endif
#include <app/clusters/door-lock-server/door-lock-server.h>
#include <app/clusters/identify-server/identify-server.h>
#include <app/server/Server.h>
#include <credentials/examples/DeviceAttestationCredsExample.h>
#include <inet/EndPointStateOpenThread.h>
Expand Down Expand Up @@ -80,6 +81,13 @@ static wiced_led_config_t chip_lighting_led_config[2] = {
},
};

static Identify gIdentify = {
chip::EndpointId{ 1 },
[](Identify *) { ChipLogProgress(Zcl, "onIdentifyStart"); },
[](Identify *) { ChipLogProgress(Zcl, "onIdentifyStop"); },
EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED,
};

APPLICATION_START()
{
CHIP_ERROR err;
Expand Down