web_config.h 727 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
#ifndef AMPEL_WEB_CONFIG_H_
#define AMPEL_WEB_CONFIG_H_

#if defined(ESP8266)
#  include <ESP8266WebServer.h>
#elif defined(ESP32)
#  include <WebServer.h>
#endif

Eric Duminil's avatar
Eric Duminil committed
10
11
#define STRING_LEN 64

Eric Duminil's avatar
Eric Duminil committed
12
#include "config.h"
13
14
15

#include <IotWebConf.h>
#include <IotWebConfTParameter.h>
16
#include <IotWebConfOptionalGroup.h>
17

Eric Duminil's avatar
Eric Duminil committed
18
#include "util.h"
19
20
//#include "sensor_console.h"

Eric Duminil's avatar
Eric Duminil committed
21
22
23
24
namespace config {
  extern iotwebconf::TextTParameter<STRING_LEN> stringParam;
}

25
26
namespace web_config {
  void initialize();
Eric Duminil's avatar
Eric Duminil committed
27
28
  void setWifiConnectionCallback(void (*function)());
  void setWifiConnectionFailedCallback(void (*function)());
29
  void update();
Eric Duminil's avatar
Eric Duminil committed
30
31
32
33
34
35

#if defined(ESP8266)
  extern ESP8266WebServer http;
#elif defined(ESP32)
  extern WebServer http;
#endif
36
37
}
#endif