This commit is contained in:
2024-07-16 21:11:16 -04:00
parent d258a70025
commit b90676fd13
615 changed files with 112854 additions and 542 deletions

View File

@@ -5,45 +5,12 @@
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied.
*/
#pragma once
#include <stdint.h>
#include <stdbool.h>
#include <esp_err.h>
#include <esp_matter.h>
/** Default attribute values used by Rainmaker during initialization */
#define SWITCH_DEVICE_NAME "Matter Switch"
#define DEFAULT_POWER true
typedef void *app_driver_handle_t;
/** Initialize the light driver
*
* This initializes the light driver associated with the selected board.
*
* @return Handle on success.
* @return NULL in case of failure.
*/
app_driver_handle_t app_driver_light_init();
/** Initialize the button driver
*
* This initializes the button driver associated with the selected board.
*
* @param[in] user_data Custom user data that will be used in button toggle callback.
*
* @return Handle on success.
* @return NULL in case of failure.
*/
app_driver_handle_t app_driver_button_init(void *user_data);
/** Set LED Power
*
* @param[in] handle Pointer to switch driver handle.
* @param[in] power LED power state.
*
* @return ESP_OK on success.
* @return error in case of failure.
*/
esp_err_t app_driver_switch_set_power(app_driver_handle_t handle, bool power);
#define DEFAULT_POWER true
extern esp_rmaker_device_t *switch_device;
void app_driver_init(void);
int app_driver_set_state(bool state);
bool app_driver_get_state(void);