Skip to content

Commit

Permalink
[Infineon] Added implementation for Identify TriggerEffect (#22297)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvinHsiao authored Sep 2, 2022
1 parent 2752626 commit 3522317
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion examples/lighting-app/infineon/cyw30739/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,39 @@ static wiced_led_config_t chip_lighting_led_config = {
.bright = 50,
};

/**********************************************************
* Identify Callbacks
*********************************************************/

void OnIdentifyTriggerEffect(Identify * identify)
{
switch (identify->mCurrentEffectIdentifier)
{
case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK:
ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK");
break;
case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE:
ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE");
break;
case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY:
ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY");
break;
case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE:
ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE");
break;
default:
ChipLogProgress(Zcl, "No identifier effect");
break;
}
return;
}

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

APPLICATION_START()
Expand Down

0 comments on commit 3522317

Please sign in to comment.