41 lines
1.0 KiB
C
41 lines
1.0 KiB
C
#pragma once
|
|
|
|
#include "esp_system.h"
|
|
#include "esp_log.h"
|
|
|
|
#include "freertos/FreeRTOS.h"
|
|
#include "freertos/task.h"
|
|
#include "freertos/event_groups.h"
|
|
|
|
#include "jannex/initStorage.h"
|
|
#include "jannex/storage.h"
|
|
|
|
////////////////////////////////////////////////////
|
|
#define CONFIG_ESP_WIFI_AP
|
|
#define CONFIG_HTTP_SERVER_ENABLE_DEBUG_MODE
|
|
////////////////////////////////////////////////////
|
|
|
|
#if defined(CONFIG_ESP_WIFI_SSID) || defined(CONFIG_ESP_WIFI_AP)
|
|
|
|
/* The event group allows multiple bits for each event, but we only care about two events:
|
|
* - we are connected to the AP with an IP
|
|
* - we failed to connect after the maximum amount of retries */
|
|
#define NETWORK_CONNECTED_BIT BIT0
|
|
#define NETWORK_FAIL_BIT BIT1
|
|
|
|
/* FreeRTOS event group to signal when we are connected*/
|
|
static EventGroupHandle_t s_wifi_event_group;
|
|
|
|
#define WIFI_ENABLED
|
|
#include "wifi_sta.h"
|
|
#endif
|
|
|
|
#ifdef WIFI_ENABLED
|
|
#define WEB_SERVER_ENABLED
|
|
#include "webserver.h"
|
|
#endif
|
|
|
|
static const char *jannexTAG = "JANNEX";
|
|
|
|
void initJannex();
|
|
void updateJannex(); |