Initial kesp32_app_base component

This commit is contained in:
2026-10-04 11:42:27 +09:00
commit e4e4d78b26
25 changed files with 2073 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
#pragma once
#include "esp_err.h"
#include <stdbool.h>
#include <stdint.h>
#include "freertos/FreeRTOS.h"
#include "freertos/event_groups.h"
typedef esp_err_t (*esp32_app_base_product_start_fn_t)(void);
typedef esp_err_t (*esp32_app_base_health_check_fn_t)(void);
typedef struct {
const char *service_prefix;
int reset_gpio;
bool reset_active_low;
uint32_t reset_hold_ms;
esp32_app_base_product_start_fn_t product_start;
esp32_app_base_health_check_fn_t health_check;
const char *ntp_server;
const char *timezone;
uint32_t ntp_initial_wait_seconds;
bool ota_enabled;
const char *ota_url;
uint32_t ota_initial_delay_seconds;
uint32_t ota_check_interval_minutes;
uint32_t ota_retry_interval_minutes;
} esp32_app_base_config_t;
/** Owns NVS, Wi-Fi browser provisioning, NTP, OTA rollback and reset button. */
esp_err_t esp32_app_base_start(const esp32_app_base_config_t *config);
/** Network readiness event group for optional product services. */
EventGroupHandle_t esp32_app_base_network_events(void);
EventBits_t esp32_app_base_network_ready_bit(void);