Browse Source

working

master
agr 4 years ago
parent
commit
0a6e52aa5a
7 changed files with 162 additions and 1448 deletions
  1. +2
    -2
      .settings/org.eclipse.cdt.core.prefs
  2. +0
    -1320
      EEPROMAnything.h
  3. +6
    -6
      System.cpp
  4. +5
    -5
      System.h
  5. +8
    -8
      WebServer.h
  6. +115
    -107
      Web_Net_Setup.ino
  7. +26
    -0
      struct.h

+ 2
- 2
.settings/org.eclipse.cdt.core.prefs View File

@@ -478,7 +478,7 @@ environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.COM_PORT/
environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.COM_PORT/value=COM4
environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.ECLIPSE_LOCATION/delimiter=;
environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.ECLIPSE_LOCATION/operation=replace
environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.ECLIPSE_LOCATION/value=${eclipse_home}
environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.ECLIPSE_LOCATION/value=C\:\\Sloeber\\
environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.EXTRA.ALL/delimiter=;
environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.EXTRA.ALL/operation=replace
environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.EXTRA.ALL/value=
@@ -523,7 +523,7 @@ environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.SELECTED.
environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.SELECTED.PLATFORM/value=${eclipse_home}/arduinoPlugin/packages/arduino/hardware/avr/1.8.2
environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.SIZE.SWITCH/delimiter=;
environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.SIZE.SWITCH/operation=replace
environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.SIZE.SWITCH/value=${A.RECIPE.SIZE.PATTERN}
environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.SIZE.SWITCH/value=${A.ALT_SIZE_COMMAND}
environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.UPLOAD/delimiter=;
environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.UPLOAD/operation=replace
environment/project/io.sloeber.core.toolChain.release.613547860/JANTJE.UPLOAD/value=Default


+ 0
- 1320
EEPROMAnything.h
File diff suppressed because it is too large
View File


+ 6
- 6
System.cpp View File

@@ -9,19 +9,19 @@ char* System::uptime()
long hours=0;
long mins=0;
long secs=0;
secs = millis()/1000; //convect milliseconds to seconds
mins=secs/60; //convert seconds to minutes
hours=mins/60; //convert minutes to hours
days=hours/24; //convert hours to days
secs=secs-(mins*60); //subtract the coverted seconds to minutes in order to display 59 secs max
secs=secs-(mins*60); //subtract the coverted seconds to minutes in order to display 59 secs max
mins=mins-(hours*60); //subtract the coverted minutes to hours in order to display 59 minutes max
hours=hours-(days*24); //subtract the coverted hours to days in order to display 23 hours max

if (days > 0) {
ltoa(days,buffer,10);
strcpy(retval,buffer);
}
}
else {
strcpy(retval,"0");
}
@@ -44,15 +44,15 @@ char* System::uptime()
}

int System::ramFree () {
extern int __heap_start, *__brkval;
extern int __heap_start, *__brkval;
int v;
int a = (int) &v - (__brkval == 0 ? (int) &__heap_start : (int) __brkval);
int a = (int) &v - (__brkval == 0 ? (int) &__heap_start : (int) __brkval);
return a;
}

int System::ramSize() {
int v;
int a = (int) &v;
int a = (int) &v;
return a;
}



+ 5
- 5
System.h View File

@@ -18,19 +18,19 @@ public:
* @return char *: pointer!
*/
char * uptime();
/**
* Returns the free RAM
* @return int: free RAM
*/
*/
int ramFree();
/**
* Returns the size of the RAM
* @return int: RAM size
*/
*/
int ramSize();
private:
char retval[25];
};


+ 8
- 8
WebServer.h View File

@@ -311,10 +311,10 @@ public:
uint8_t available();

// Flush the send buffer
void flushBuf();
void flushBuf();

// Close the current connection and flush ethernet buffers
void reset();
void reset();
private:
EthernetServer m_server;
EthernetClient m_client;
@@ -481,7 +481,7 @@ void WebServer::printf(const __FlashStringHelper *format, ... )
vsnprintf_P(buf, sizeof(buf), (const char *)format, ap); // progmem for AVR
#else
vsnprintf(buf, sizeof(buf), (const char *)format, ap); // for the rest of the world
#endif
#endif
va_end(ap);
print(buf);
}
@@ -658,7 +658,7 @@ void WebServer::httpFail()
printP(webServerHeader);
#endif

P(failMsg2) =
P(failMsg2) =
"Content-Type: text/html" CRLF
CRLF
WEBDUINO_FAIL_MESSAGE;
@@ -703,7 +703,7 @@ void WebServer::httpUnauthorized()
printP(webServerHeader);
#endif

P(unauthMsg2) =
P(unauthMsg2) =
"Content-Type: text/html" CRLF
"WWW-Authenticate: Basic realm=\"" WEBDUINO_AUTH_REALM "\"" CRLF
CRLF
@@ -721,7 +721,7 @@ void WebServer::httpServerError()
printP(webServerHeader);
#endif

P(servErrMsg2) =
P(servErrMsg2) =
"Content-Type: text/html" CRLF
CRLF
WEBDUINO_SERVER_ERROR_MESSAGE;
@@ -738,7 +738,7 @@ void WebServer::httpNoContent()
printP(webServerHeader);
#endif

P(noContentMsg2) =
P(noContentMsg2) =
CRLF
CRLF;

@@ -755,7 +755,7 @@ void WebServer::httpSuccess(const char *contentType,
printP(webServerHeader);
#endif

P(successMsg2) =
P(successMsg2) =
"Access-Control-Allow-Origin: *" CRLF
"Content-Type: ";



configWebserver.ino → Web_Net_Setup.ino View File

@@ -1,4 +1,4 @@
/* Web_Net_Setup.pde - example for a webinterface to set the network configuration
/* Web_Net_Setup.pde - example for a webinterface to set the network configuration
Author: Matthias Maderer
Date: 07.03.2013
Version: 1.0.1
@@ -13,7 +13,7 @@ For more informations about EEPROMAnything.h look at http://playground.arduino.c
/*
* With this example its possible to configure the network configuration of the
* Arduino Ethernet Shield with a webinterface. Imagine like your router setup.
*
*
* It's possible to configure the following network settings:
* - MAC address
* - IP address
@@ -29,11 +29,11 @@ For more informations about EEPROMAnything.h look at http://playground.arduino.c
* - Display DHCP renew timestamp
* - Display Arduino uptime
* - Display used RAM
*
*
* You can configure default settings. This settings are used wenn no configuration is present.
* Look at the function set_EEPROM_Default().
*
* It is possible to connect a RESET button. If the button is pressed and the Arduino is turned on
* It is possible to connect a RESET button. If the button is pressed and the Arduino is turned on
* the default values would be restored too.
* See #define RESET_PIN.
*
@@ -41,9 +41,9 @@ For more informations about EEPROMAnything.h look at http://playground.arduino.c
* All settings are stored in EEPROM. This means they are permanent.
* Please look at http://arduino.cc/en/Reference/EEPROM for a short description.
*
*
*
* To setup your arduino upload this sketch.
*
*
* If you don't change the sourcecode the default IP address is http://192.168.0.111/
* Don't forget to change the IP of your network adapter to a suitable address (e.g. to IP 192.168.0.1, NETMASK 255.255.255.0)!
*
@@ -64,7 +64,7 @@ For more informations about EEPROMAnything.h look at http://playground.arduino.c


#define WEBDUINO_FAVICON_DATA "" // no favicon
//#define DEBUG //uncomment for serial debug output
#define DEBUG //uncomment for serial debug output
#define USE_SYSTEM_LIBRARY //comment out if you want to save some space (about 1 Byte). You wouldn't see uptime and free RAM if it's commented out.
#define SERIAL_BAUD 9600

@@ -73,65 +73,73 @@ For more informations about EEPROMAnything.h look at http://playground.arduino.c
#include "avr/pgmspace.h" // new include
#include "Ethernet.h"
#include "WebServer.h"
#include <EEPROM.h>


/* #############################################################################################################################################################
* Code for the EEPROM related things
*
*
*/
#include <EEPROM.h>
#include "EEPROMAnything.h"
//#include <EEPROM.h>
//#include "EEPROMAnything.h"

#define RESET_PIN 40 //Connect a button to this PIN. If the button is hold, an the device is turned on the default ethernet settings are restored.

/* structure which is stored in the eeprom.
/* structure which is stored in the eeprom.
* Look at "EEPROMAnything.h" for the functions storing and reading the struct
*/
struct config_t
#include "struct.h"

int EEPROM_readAnything(int ee, config_t& value)
{
byte config_set;
byte use_dhcp;
byte dhcp_refresh_minutes;
byte mac[6];
byte ip[4];
byte gateway[4];
byte subnet[4];
byte dns_server[4];
unsigned int webserverPort;
} eeprom_config;
byte* p = (byte*)(void*)&value;
unsigned int i;
for (i = 0; i < sizeof(value); i++)
*p++ = EEPROM.read(ee++);
return i;
}

/**
int EEPROM_writeAnything(int ee, const config_t& value)
{
const byte* p = (const byte*)(const void*)&value;
unsigned int i;
for (i = 0; i < sizeof(value); i++)
EEPROM.write(ee++, *p++);
return i;
}

/**
* set_EEPROM_Default() function
*
* The default settings.
* The default settings.
* This settings are used when no config is present or the reset button is pressed.
*/
void set_EEPROM_Default() {
eeprom_config.config_set=1; // dont change! It's used to check if the config is already set

eeprom_config.use_dhcp=0; // use DHCP per default
eeprom_config.dhcp_refresh_minutes=60; // refresh the DHCP every 60 minutes
// set the default MAC address. In this case its DE:AD:BE:EF:FE:ED
eeprom_config.mac[0]=0xDE;
eeprom_config.mac[0]=0xDE;
eeprom_config.mac[1]=0xAD;
eeprom_config.mac[2]=0xBE;
eeprom_config.mac[3]=0xEF;
eeprom_config.mac[4]=0xFE;
eeprom_config.mac[5]=0xED;
// set the default IP address for the arduino. In this case its 192.168.0.111
eeprom_config.ip[0]=192;
eeprom_config.ip[1]=168;
eeprom_config.ip[2]=0;
eeprom_config.ip[3]=111;
eeprom_config.ip[2]=1;
eeprom_config.ip[3]=97;
// set the default GATEWAY. In this case its 192.168.0.254
eeprom_config.gateway[0]=192;
eeprom_config.gateway[1]=168;
eeprom_config.gateway[2]=0;
eeprom_config.gateway[3]=254;
eeprom_config.gateway[2]=1;
eeprom_config.gateway[3]=1;
// set the default SUBNET. In this case its 255.255.255.0
eeprom_config.subnet[0]=255;
eeprom_config.subnet[1]=255;
@@ -141,15 +149,15 @@ void set_EEPROM_Default() {
// set the default DNS SERVER. In this case its 192.168.0.254
eeprom_config.dns_server[0]=192;
eeprom_config.dns_server[1]=168;
eeprom_config.dns_server[2]=0;
eeprom_config.dns_server[3]=254;
eeprom_config.dns_server[2]=1;
eeprom_config.dns_server[3]=1;

// set the default Webserver Port. In this case its Port 80
eeprom_config.webserverPort=80;
#ifdef DEBUG
Serial.println("Config reset");
#endif
#endif
}


@@ -165,18 +173,18 @@ void set_EEPROM_Default() {
void read_EEPROM_Settings() {
pinMode(RESET_PIN, INPUT);
digitalWrite(RESET_PIN, HIGH);
// read the current config
EEPROM_readAnything(0, eeprom_config);
// check if config is present or if reset button is pressed
if (eeprom_config.config_set != 1 || digitalRead(RESET_PIN) == LOW) {
// set default values
set_EEPROM_Default();
// write the config to eeprom
EEPROM_writeAnything(0, eeprom_config);
}
}
}

/**
@@ -195,7 +203,7 @@ void print_EEPROM_Settings() {
}
}
Serial.println();
Serial.print("Subnet: ");
for(int i = 0; i<4; i++) {
Serial.print(eeprom_config.subnet[i]);
@@ -204,7 +212,7 @@ void print_EEPROM_Settings() {
}
}
Serial.println();
Serial.print("Gateway: ");
for(int i = 0; i<4; i++) {
Serial.print(eeprom_config.gateway[i]);
@@ -222,7 +230,7 @@ void print_EEPROM_Settings() {
}
}
Serial.println();
Serial.print("MAC: ");
for (int a=0;a<6;a++) {
Serial.print(eeprom_config.mac[a],HEX);
@@ -231,17 +239,17 @@ void print_EEPROM_Settings() {
}
}
Serial.println();
Serial.print("Webserver Port: ");
Serial.println(eeprom_config.webserverPort);
Serial.print("USE DHCP: ");
Serial.println(eeprom_config.use_dhcp);
Serial.print(" DHCP renew every ");
Serial.print(eeprom_config.dhcp_refresh_minutes);
Serial.println(" minutes");
Serial.print("Config Set: ");
Serial.println(eeprom_config.config_set);

@@ -260,7 +268,7 @@ byte dhcp_state;
/**
* renewDHCP() function
* Renew the DHCP relase in a given interval.
*
*
* Overview:
* - Check if interval = 0 and set it to 1
* - Check if renew interval is reached and renew the lease
@@ -269,7 +277,7 @@ void renewDHCP(int interval) {
unsigned long interval_millis = interval * 60000;

if (interval == 0 ) {
interval = 1;
interval = 1;
}
if (eeprom_config.use_dhcp==1) {
if((millis() - last_dhcp_renew) > interval_millis) {
@@ -288,22 +296,22 @@ void renewDHCP(int interval) {
* - First of all read the EEPROM settings
* - Display a link to the ethernet setup
* - Check if DHCP should be used, if not create instaces of IPAddress for ip, gateway, subnet and dns_server
* - Invoke Ethernet.begin with all parameters if no dhcp is active (Ethernet.begin(mac, ip, dns_server, gateway, subnet);).
* - Invoke Ethernet.begin with all parameters if no dhcp is active (Ethernet.begin(mac, ip, dns_server, gateway, subnet);).
* - If DHCP is used invoke only with mac (Ethernet.begin(mac);) and display the ip on the serial console.
*/
void setupNetwork() {
read_EEPROM_Settings();
#ifdef DEBUG
print_EEPROM_Settings();
#endif

// byte mac[] = { eeprom_config.mac[0], eeprom_config.mac[1], eeprom_config.mac[2], eeprom_config.mac[3], eeprom_config.mac[4], eeprom_config.mac[5] };
// byte mac[] = { eeprom_config.mac[0], eeprom_config.mac[1], eeprom_config.mac[2], eeprom_config.mac[3], eeprom_config.mac[4], eeprom_config.mac[5] };
if (eeprom_config.use_dhcp != 1) {
IPAddress ip(eeprom_config.ip[0], eeprom_config.ip[1], eeprom_config.ip[2], eeprom_config.ip[3]);
IPAddress gateway (eeprom_config.gateway[0],eeprom_config.gateway[1],eeprom_config.gateway[2],eeprom_config.gateway[3]);
IPAddress subnet (eeprom_config.subnet[0], eeprom_config.subnet[1], eeprom_config.subnet[2], eeprom_config.subnet[3]);
IPAddress ip(eeprom_config.ip[0], eeprom_config.ip[1], eeprom_config.ip[2], eeprom_config.ip[3]);
IPAddress gateway (eeprom_config.gateway[0],eeprom_config.gateway[1],eeprom_config.gateway[2],eeprom_config.gateway[3]);
IPAddress subnet (eeprom_config.subnet[0], eeprom_config.subnet[1], eeprom_config.subnet[2], eeprom_config.subnet[3]);
IPAddress dns_server (eeprom_config.dns_server[0], eeprom_config.dns_server[1], eeprom_config.dns_server[2], eeprom_config.dns_server[3]);
Ethernet.begin(eeprom_config.mac, ip, dns_server, gateway, subnet);
} else {
@@ -398,13 +406,13 @@ void indexHTML(WebServer &server, WebServer::ConnectionType type, char *url_tail
For a HEAD request, we just stop after outputting headers. */
if (type == WebServer::HEAD)
return;
server.printP(Page_start);
server.printP(Index);
server.printP(Page_end);
}

/**
@@ -450,55 +458,55 @@ void setupNetHTML(WebServer &server, WebServer::ConnectionType type, char *url_t
#ifdef DEBUG
Serial.print(name);
server.print(name);
Serial.print(" - ");
Serial.print(" - ");
server.print(" - ");
Serial.println(value);
server.print(value);
server.print("<br>");
#endif
param_number = atoi(name);
// read MAC address
if (param_number >=0 && param_number <=5) {
eeprom_config.mac[param_number]=strtol(value,NULL,16);
}
// read IP address
if (param_number >=6 && param_number <=9) {
eeprom_config.ip[param_number-6]=atoi(value);
}
// read SUBNET
if (param_number >=10 && param_number <=13) {
eeprom_config.subnet[param_number-10]=atoi(value);
}
// read GATEWAY
if (param_number >=14 && param_number <=17) {
eeprom_config.gateway[param_number-14]=atoi(value);
}
// read DNS-SERVER
if (param_number >=18 && param_number <=21) {
eeprom_config.dns_server[param_number-18]=atoi(value);
}
// read WEBServer port
if (param_number == 22) {
eeprom_config.webserverPort=atoi(value);
}
// read DHCP ON/OFF
if (param_number == 23) {
eeprom_config.use_dhcp=atoi(value);
}
// read DHCP renew interval
if (param_number == 24) {
eeprom_config.dhcp_refresh_minutes=atoi(value);
}
}
}
}
EEPROM_writeAnything(0, eeprom_config);
@@ -506,13 +514,13 @@ void setupNetHTML(WebServer &server, WebServer::ConnectionType type, char *url_t

//print the form
server.printP(Form_eth_start);
if(params_present==true) {
server.printP(Config_set);
}
server.printP(table_start);
// print the current MAC
server.printP(table_tr_start);
server.printP(table_td_start);
@@ -524,7 +532,7 @@ void setupNetHTML(WebServer &server, WebServer::ConnectionType type, char *url_t
server.print(a);
server.printP(Form_input_value);
server.print(eeprom_config.mac[a],HEX);
server.printP(Form_input_size2);
server.printP(Form_input_size2);
server.printP(Form_input_end);
}
server.printP(table_td_end);
@@ -535,7 +543,7 @@ void setupNetHTML(WebServer &server, WebServer::ConnectionType type, char *url_t
server.printP(table_td_start);
server.printP(IP);
server.printP(table_td_end);
server.printP(table_td_start);
server.printP(table_td_start);
for (int a=0;a<4;a++) {
server.printP(Form_input_text_start);
server.print(a+6);
@@ -546,14 +554,14 @@ void setupNetHTML(WebServer &server, WebServer::ConnectionType type, char *url_t
}
server.printP(table_td_end);
server.printP(table_tr_end);

// print the current SUBNET
server.printP(table_tr_start);
server.printP(table_td_start);
server.printP(SUBNET);
server.printP(table_td_end);
server.printP(table_td_start);
server.printP(table_td_start);
for (int a=0;a<4;a++) {
server.printP(Form_input_text_start);
server.print(a+10);
@@ -570,7 +578,7 @@ void setupNetHTML(WebServer &server, WebServer::ConnectionType type, char *url_t
server.printP(table_td_start);
server.printP(GW);
server.printP(table_td_end);
server.printP(table_td_start);
server.printP(table_td_start);
for (int a=0;a<4;a++) {
server.printP(Form_input_text_start);
server.print(a+14);
@@ -587,7 +595,7 @@ void setupNetHTML(WebServer &server, WebServer::ConnectionType type, char *url_t
server.printP(table_td_start);
server.printP(DNS_SERVER);
server.printP(table_td_end);
server.printP(table_td_start);
server.printP(table_td_start);
for (int a=0;a<4;a++) {
server.printP(Form_input_text_start);
server.print(a+18);
@@ -599,7 +607,7 @@ void setupNetHTML(WebServer &server, WebServer::ConnectionType type, char *url_t
server.printP(table_td_end);
server.printP(table_tr_end);

// print the current webserver port
server.printP(table_tr_start);
server.printP(table_td_start);
@@ -613,7 +621,7 @@ void setupNetHTML(WebServer &server, WebServer::ConnectionType type, char *url_t
server.printP(Form_input_end);
server.printP(table_td_end);
server.printP(table_tr_end);
//print the current DHCP config
server.printP(table_tr_start);
server.printP(table_td_start);
@@ -625,17 +633,17 @@ void setupNetHTML(WebServer &server, WebServer::ConnectionType type, char *url_t
if(eeprom_config.use_dhcp != 1) {
server.printP(Form_cb_checked);
}
server.printP(Form_cb_off);
server.printP(Form_cb_off);
server.printP(Form_cb);
server.print("1\"");
if(eeprom_config.use_dhcp == 1) {
server.printP(Form_cb_checked);
}
server.printP(Form_cb_on);
server.printP(Form_cb_on);
server.printP(table_td_end);
server.printP(table_tr_end);
//print the current DHCP renew time
server.printP(table_tr_start);
server.printP(table_td_start);
@@ -654,16 +662,16 @@ void setupNetHTML(WebServer &server, WebServer::ConnectionType type, char *url_t
//print DHCP status
if(eeprom_config.use_dhcp == 1) {
server.printP(table_tr_start);
server.printP(table_td_start);
server.printP(table_td_start);
server.printP(DHCP_STATE);
server.printP(table_td_end);
server.printP(table_td_start);
server.print(dhcp_state);
server.printP(table_td_end);
server.printP(table_tr_end);
server.printP(table_tr_start);
server.printP(table_td_start);
server.printP(table_td_start);
server.printP(DHCP_STATE_TIME);
server.printP(table_td_end);
server.printP(table_td_start);
@@ -671,36 +679,36 @@ void setupNetHTML(WebServer &server, WebServer::ConnectionType type, char *url_t
server.printP(table_td_end);
server.printP(table_tr_end);
}
#ifdef USE_SYSTEM_LIBRARY
//print uptime
server.printP(table_tr_start);
server.printP(table_td_start);
server.printP(table_td_start);
server.printP(UPTIME);
server.printP(table_td_end);
server.printP(table_td_start);
server.print(sys.uptime());
server.printP(table_td_end);
server.printP(table_tr_end);
server.printP(table_tr_end);

server.printP(table_tr_start);
server.printP(table_td_start);
server.printP(RAM_1);
server.printP(RAM_1);
server.print(sys.ramFree());
server.printP(RAM_2);
server.print(sys.ramSize());
server.printP(table_td_end);
server.printP(table_tr_end);
server.printP(table_tr_end);
#endif
server.printP(table_end);
//print the send button
server.printP(Form_input_send);
server.printP(Form_input_send);
server.printP(Form_end);



server.printP(Page_end);

}
@@ -720,9 +728,9 @@ void errorHTML(WebServer &server, WebServer::ConnectionType type, char *url_tail
For a HEAD request, we just stop after outputting headers. */
if (type == WebServer::HEAD)
return;
server.printP(Http400);
server.printP(Page_end);
}

@@ -735,12 +743,12 @@ void errorHTML(WebServer &server, WebServer::ConnectionType type, char *url_tail
void setup()
{
Serial.begin(SERIAL_BAUD);
/* initialize the Ethernet adapter with the settings from eeprom */
delay(200); // some time to settle
setupNetwork();
delay(200); // some time to settle
#define PREFIX ""
webserver = new WebServer(PREFIX, eeprom_config.webserverPort);

@@ -766,7 +774,7 @@ void setup()
/**
* loop() function
* Runs forver ....
*
*
* Overview:
* - Renew the DHCP lease
* - Serve web clients

+ 26
- 0
struct.h View File

@@ -0,0 +1,26 @@
/*
* struct.h
*
* Created on: 07.04.2020
* Author: agr
*/

#ifndef STRUCT_H_
#define STRUCT_H_


struct config_t
{
byte config_set;
byte use_dhcp;
byte dhcp_refresh_minutes;
byte mac[6];
byte ip[4];
byte gateway[4];
byte subnet[4];
byte dns_server[4];
unsigned int webserverPort;
} eeprom_config;


#endif /* STRUCT_H_ */

Loading…
Cancel
Save