ESP32-Mesh-OTA/main/Main.c

34 lines
582 B
C
Raw Normal View History

2020-12-01 23:21:18 +01:00
#include <string.h>
#include "esp_wifi.h"
#include "esp_system.h"
#include "esp_event.h"
#include "esp_log.h"
#include "esp_mesh.h"
#include "esp_mesh_internal.h"
#include "nvs_flash.h"
#include "driver/gpio.h"
#include "esp_ota_ops.h"
#include "esp_partition.h"
#include "Mesh_OTA.h"
2021-01-16 00:23:02 +01:00
#include "Blinky_LED.h"
2020-12-01 23:21:18 +01:00
2021-01-11 15:22:45 +01:00
static const char *LOG_TAG = "esp_main";
2020-12-01 23:21:18 +01:00
2021-01-11 15:22:45 +01:00
void app_main(void)
2020-12-01 23:21:18 +01:00
{
esp_err_t err = ESP_OK;
2021-01-11 15:22:45 +01:00
ESP_LOGI(LOG_TAG, "hardcoded: 0.0.1");
err = errMeshNetworkInitialize();
2021-01-01 01:25:40 +01:00
ESP_ERROR_CHECK(err);
2020-12-01 23:21:18 +01:00
2021-01-11 15:22:45 +01:00
//start ota
2020-12-01 23:21:18 +01:00
2021-01-11 15:22:45 +01:00
//start app
2021-01-16 00:23:02 +01:00
errBlinkyLEDInitialize();
2020-12-01 23:21:18 +01:00
}
2021-01-02 00:30:13 +01:00