web_config.h 575 Bytes
Newer Older
1
2
3
#ifndef AMPEL_WEB_CONFIG_H_
#define AMPEL_WEB_CONFIG_H_

Eric Duminil's avatar
Eric Duminil committed
4
5
#define STRING_LEN 64

6
7
8
9
10
11
12
13
#if defined(ESP8266)
#  include <ESP8266WebServer.h>
#elif defined(ESP32)
#  include <WebServer.h>
#endif

#include <IotWebConfTParameter.h>

Eric Duminil's avatar
Eric Duminil committed
14
namespace config {
Eric Duminil's avatar
Eric Duminil committed
15
  extern uint16_t *csv_interval; // [s]
Eric Duminil's avatar
Eric Duminil committed
16
17
}

18
19
namespace web_config {
  void initialize();
Eric Duminil's avatar
Eric Duminil committed
20
21
  void setWifiConnectionCallback(void (*function)());
  void setWifiConnectionFailedCallback(void (*function)());
22
  void update();
Eric Duminil's avatar
Eric Duminil committed
23
24
25
26
27
28

#if defined(ESP8266)
  extern ESP8266WebServer http;
#elif defined(ESP32)
  extern WebServer http;
#endif
29
30
}
#endif