Webserver only w/o any other functions, single thread. Running on STM32F013+W5500
Dependencies: NTPClient W5500Interface Watchdog device_configuration eeprom_flash mbed-rpc-nucleo mbed-rtos mbed
Fork of F103-Serial-to-Ethernet by
Revision 13:bcf840da68fd, committed 2014-09-28
- Comitter:
- olympux
- Date:
- Sun Sep 28 17:43:43 2014 +0000
- Parent:
- 12:7c152c0ca4d8
- Child:
- 14:18eda020a589
- Commit message:
- Added comments for variables in main.c
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Sun Sep 28 17:35:54 2014 +0000 +++ b/main.cpp Sun Sep 28 17:43:43 2014 +0000 @@ -56,8 +56,9 @@ -// EEPROM: device network configuration -//#define NumbOfVar ((uint8_t)0x80) // REMEMBER: update this variable in eeprom.h too +/* +* EEPROM section +*/ // Virtual address defined by the user: 0xFFFF value is prohibited uint16_t VirtAddVarTab[NumbOfVar] = {0x1212, 0x1313, 0x1414, 0x1515, // IP_Addr 0x2212, 0x2313, 0x2414, 0x2515, // IP_Subnet @@ -86,7 +87,12 @@ #define TCP_SERVER_RECEIVE_TIMEOUT 3000 #define UDP_SERVER_RECEIVE_TIMEOUT 200 -// for static IP setting +NTPClient ntp; + + +/* +* Variables for network configuration, server +*/ uint8_t u8mac[6], u8ip_addr[4];// keep mac and ip address in 8-bits char * IP_Addr; // pointers to str_ip_xxx[16] char * IP_Subnet; @@ -108,13 +114,12 @@ char * server_ip_addr; // pointer to str_server_ip_addr char str_server_ip_addr[16];// for printf, converted from 16-bits u16server_ip_addr -extern void load_eeprom_network(void); +char buffer[256]; // socket buffer -char buffer[256]; // socket buffer - -NTPClient ntp; - +/* +* Protocol +*/ // Commands #define DEVICE_ID "NNIO" #define DISCOVERY_COMMAND "NNIODS"