Chau Vo / device_configuration

Dependents:   F103-Web-Server

Fork of my_eeprom_funcs by Chau Vo

Revision:
6:241d1539914a
Parent:
5:eea03d0eb95a
Child:
8:4fc4b1b5509b
--- a/my_eeprom_funcs.h	Tue Oct 21 20:38:38 2014 +0000
+++ b/my_eeprom_funcs.h	Fri Oct 24 21:27:52 2014 +0000
@@ -17,6 +17,8 @@
 #define DEFAULT_MAC4            0x00
 #define DEFAULT_MAC5            0x01
 
+#define DEFAULT_ENABLE_FLAG_VALUE   0xA5A5
+#define DEFAULT_DISABLE_FLAG_VALUE  0xAAAA
 
 /*
 * Positions of variables in EEPROM array
@@ -28,7 +30,7 @@
 #define UDP_SERVER_LOCAL_PORT_POS    13
 #define FIRST_RUN_FLAG_POS     14
 #define MAC_ADDRESS_POS        15
-// EEPROM: for TCP server this device connects to in TCP client mode
+// EEPROM: for setting TCP server where this device connects to in TCP client mode
 #define AUTO_TRANSMIT_FLAG_POS  18
 #define AUTO_TRANSMIT_TIME_PERIOD_POS    19
 #define TCP_SERVER_IP_ADDR_POS  20
@@ -53,12 +55,12 @@
 
 // this section is for the TCP server that this device connects to in TCP client mode
 extern uint16_t auto_transmit_flag, transmit_time_period; // auto transmit status, time period = 1s
+extern uint8_t u8server_ip_addr[];
 extern uint16_t u16server_ip_addr[]; // directly loaded from eeprom
 extern uint16_t u16tcp_server_port; // directly loaded from eeprom
-extern uint16_t u16enable_tcp_client, u16enable_tcp_server;// flags for enabling TCP client or TCP server
-extern uint8_t u8server_ip_addr[];
 extern char * server_ip_addr;
 extern char str_server_ip_addr[];
+extern uint16_t u16enable_tcp_client, u16enable_tcp_server;// flags for enabling TCP client or TCP server
 
 
 /*