30 lines
540 B
C++
30 lines
540 B
C++
#include "system_init.h"
|
|
#include "wifi_manager.h"
|
|
#include "time_sync.h"
|
|
#include "sdkconfig.h"
|
|
|
|
#include "esp_log.h"
|
|
#include "esp_event.h"
|
|
#include "esp_netif.h"
|
|
#include "ws.h"
|
|
#include "gpio_init.h"
|
|
|
|
static const char* TAG = "system";
|
|
|
|
void system_init()
|
|
{
|
|
ESP_LOGI("SYSTEM", "Initializing system...");
|
|
|
|
init_gpio();
|
|
|
|
init_wifi(CONFIG_WIFI_SSID, CONFIG_WIFI_PASS); // Запуск WiFI
|
|
|
|
init_time(); // Установка времени
|
|
|
|
ws_go();
|
|
}
|
|
|
|
void system_finalize()
|
|
{
|
|
ESP_LOGI(TAG, "Finalizing...");
|
|
} |