add some code

This commit is contained in:
2025-09-05 13:25:11 +08:00
parent 9ff0a99e7a
commit 3cf1229a85
8911 changed files with 2535396 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
/*
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include <stdbool.h>
#include <stdint.h>
#include "esp_err.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct button_driver_t button_driver_t; /*!< Type of button object */
struct button_driver_t {
/*!< (optional) Need Support Power Save */
bool enable_power_save;
/*!< (necessary) Get key level */
uint8_t (*get_key_level)(button_driver_t *button_driver);
/*!< (optional) Enter Power Save cb */
esp_err_t (*enter_power_save)(button_driver_t *button_driver);
/*!< (optional) Del the hardware driver and cleanup */
esp_err_t (*del)(button_driver_t *button_driver);
};
#ifdef __cplusplus
}
#endif