This commit is contained in:
2026-01-11 09:52:46 +03:00
parent 4b5db1d472
commit 629ab310b6
8 changed files with 805 additions and 9 deletions

View File

@@ -1,7 +1,7 @@
#include "ate0004.h"
static i2c_master_bus_handle_t _i2c_bus_handle = NULL;
static httpd_handle_t _webserver_handle = NULL;
// static httpd_handle_t _webserver_handle = NULL;
static zh_pcf8574_handle_t _button_handle = {0};
static zh_pcf8574_handle_t _led_handle = {0};
@@ -12,11 +12,12 @@ static bool _is_ret_enabled = false;
static bool _is_ext_enabled = false;
static void _zh_wifi_softap_init(void);
static void _zh_webserver_init(void);
static void _zh_gpio_init(void);
static void _zh_pcf8574_init(void);
static void _zh_pcf8574_event_handler(void *arg, esp_event_base_t event_base, int32_t event_id, void *event_data);
extern void _zh_webserver_init(void);
void app_main(void)
{
nvs_flash_init();
@@ -50,12 +51,12 @@ static void _zh_wifi_softap_init(void)
esp_wifi_start();
}
static void _zh_webserver_init(void)
{
httpd_config_t config = HTTPD_DEFAULT_CONFIG();
httpd_start(&_webserver_handle, &config);
zh_ota_server_init(_webserver_handle);
}
// static void _zh_webserver_init(void)
// {
// httpd_config_t config = HTTPD_DEFAULT_CONFIG();
// httpd_start(&_webserver_handle, &config);
// zh_ota_server_init(_webserver_handle);
// }
static void _zh_gpio_init(void)
{