Used with eeprom_flash to write network configuration to STM32F103 flash

Dependents:   F103-Web-Server

Fork of my_eeprom_funcs by Chau Vo

Revision:
19:5671f3c25342
Parent:
18:d88314ae7979
Child:
20:858384cac44a
--- a/device_configuration.h	Sun Aug 21 17:46:55 2016 +0000
+++ b/device_configuration.h	Tue Aug 23 11:05:38 2016 +0000
@@ -6,11 +6,11 @@
 
 
 // Default device network configuration
-#define DEFAULT_IP_ADDRESS      "192.168.0.239"
+#define DEFAULT_IP_ADDRESS      "192.168.0.120"
 #define DEFAULT_IP_SUBNET       "255.255.255.0"
 #define DEFAULT_IP_GATEWAY      "192.168.0.1"
-#define DEFAULT_REMOTE_TCP_SERVER_IP        "0.0.0.0"
-#define DEFAULT_REMOTE_UDP_SERVER_IP        "0.0.0.0"
+#define DEFAULT_REMOTE_TCP_SERVER_IP        "192.168.0.2"
+#define DEFAULT_REMOTE_UDP_SERVER_IP        "192.168.0.2"
 #define DEFAULT_MAC0            0x00
 #define DEFAULT_MAC1            0x08
 #define DEFAULT_MAC2            0xDC
@@ -20,6 +20,8 @@
 #define DEFAULT_LOCAL_TCP_SERVER_PORT   10000 // change to 7000 if internet required
 #define DEFAULT_LOCAL_UDP_SERVER_PORT   11000
 #define DEFAULT_TRANSMIT_PERIOD         1000
+#define DEFAULT_REMOTE_TCP_SERVER_PORT  10000
+#define DEFAULT_REMOTE_UDP_SERVER_PORT  11000
 
 #define DEFAULT_ENABLE_FLAG_VALUE   0xA5A5
 #define DEFAULT_DISABLE_FLAG_VALUE  0xAAAA
@@ -48,12 +50,13 @@
 
 
 // prototypes
+void erase_device_configuration();
 void write_device_configuration(uint16_t* ip, uint16_t* subnet, uint16_t* gateway, uint16_t* mac,
             uint16_t tcp_port, uint16_t udp_port,
             uint16_t* remote_tcp_ip, uint16_t remote_tcp_port, uint16_t auto_transmit, uint16_t transmit_period,
             uint16_t* remote_udp_ip, uint16_t remote_udp_port,
             uint16_t enable_tcp_server, uint16_t enable_tcp_client, uint16_t enable_udp_server, uint16_t enable_udp_client);
-void reset_device_configuration();
 void read_device_configuration();
+void reset_default_device_configuration();
 
 #endif