Skip to content

Commit

Permalink
[Infineon] Support Identify cluster in lock-app for CYW30739 (#21475)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvinHsiao authored and pull[bot] committed Jul 21, 2023
1 parent 70a396b commit 7895636
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
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

0 comments on commit 7895636

Please sign in to comment.