Files
esp-matter/examples/door_lock/main/app_driver.cpp
T

38 lines
1007 B
C++

/*
This example code is in the Public Domain (or CC0 licensed, at your option.)
Unless required by applicable law or agreed to in writing, this
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied.
*/
#include <esp_log.h>
#include <stdlib.h>
#include <string.h>
#include <esp_matter.h>
#include "bsp/esp-bsp.h"
#include <app_priv.h>
static const char *TAG = "app_driver";
using namespace chip::app::Clusters;
using namespace esp_matter;
esp_err_t app_driver_attribute_update(app_driver_handle_t driver_handle, uint16_t endpoint_id, uint32_t cluster_id,
uint32_t attribute_id, esp_matter_attr_val_t *val)
{
esp_err_t err = ESP_OK;
return err;
}
app_driver_handle_t app_driver_button_init()
{
/* Initialize button */
button_handle_t btns[BSP_BUTTON_NUM];
ESP_ERROR_CHECK(bsp_iot_button_create(btns, NULL, BSP_BUTTON_NUM));
return (app_driver_handle_t)btns[0];
}