Merge pull request #116 from oleo65/zigbee-identify-callback

Added zigbee identify callback
This commit is contained in:
rbaron 2023-03-27 19:36:59 +02:00 committed by GitHub
commit 2c052cd376
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -111,6 +111,11 @@ ZBOSS_DECLARE_DEVICE_CTX_1_EP(
app_template_ctx,
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) {
// See zigbee_default_signal_handler() for all available signals.
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));
k_msleep(100);
ZB_AF_SET_IDENTIFY_NOTIFICATION_HANDLER(PRST_ZIGBEE_ENDPOINT, identify_cb);
zigbee_enable();
zigbee_configure_sleepy_behavior(/*enable=*/true);