ESP32-Mesh-OTA/main/main.c

39 lines
535 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"
2021-01-02 00:30:13 +01:00
#include "mesh_ota.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
2020-12-01 23:21:18 +01:00
}
2021-01-02 00:30:13 +01:00