Added callback for handling identify button action as declared in identify cluster.
This commit is contained in:
parent
d5a548a110
commit
20d6c893bf
1 changed files with 7 additions and 0 deletions
|
|
@ -111,6 +111,11 @@ ZBOSS_DECLARE_DEVICE_CTX_1_EP(
|
||||||
app_template_ctx,
|
app_template_ctx,
|
||||||
app_template_ep);
|
app_template_ep);
|
||||||
|
|
||||||
|
void identify_cb(zb_bufid_t bufid) {
|
||||||
|
LOG_DBG("Remote identify command called");
|
||||||
|
prst_led_flash(15);
|
||||||
|
}
|
||||||
|
|
||||||
void zboss_signal_handler(zb_bufid_t bufid) {
|
void zboss_signal_handler(zb_bufid_t bufid) {
|
||||||
// See zigbee_default_signal_handler() for all available signals.
|
// See zigbee_default_signal_handler() for all available signals.
|
||||||
zb_zdo_app_signal_type_t sig = zb_get_app_signal(bufid, /*sg_p=*/NULL);
|
zb_zdo_app_signal_type_t sig = zb_get_app_signal(bufid, /*sg_p=*/NULL);
|
||||||
|
|
@ -209,6 +214,8 @@ int main(void) {
|
||||||
RET_IF_ERR(prst_led_flash(2));
|
RET_IF_ERR(prst_led_flash(2));
|
||||||
k_msleep(100);
|
k_msleep(100);
|
||||||
|
|
||||||
|
ZB_AF_SET_IDENTIFY_NOTIFICATION_HANDLER(PRST_ZIGBEE_ENDPOINT, identify_cb);
|
||||||
|
|
||||||
zigbee_enable();
|
zigbee_enable();
|
||||||
zigbee_configure_sleepy_behavior(/*enable=*/true);
|
zigbee_configure_sleepy_behavior(/*enable=*/true);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue