Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of my_eeprom_funcs by
Diff: my_eeprom_funcs.h
- Revision:
- 13:7ffbbfe999c5
- Parent:
- 12:613ab276bf37
- Child:
- 14:17a44517b13d
--- a/my_eeprom_funcs.h Sat Jan 10 16:19:18 2015 +0000 +++ b/my_eeprom_funcs.h Thu Jun 16 19:20:49 2016 +0000 @@ -45,22 +45,26 @@ */ extern uint16_t VirtAddVarTab[]; -extern uint8_t u8mac[], u8ip_addr[];// keep mac and ip address in 8-bits -extern uint16_t u16mac_addr[], u16ip_addr[], u16ip_subnet[], u16ip_gateway[]; // 16-bits, directly loaded from eeprom -extern char str_ip_addr[], str_ip_subnet[], str_ip_gateway[]; // for printf, converted from 16-bits u16ip_xxx -extern uint16_t configured_ip; // first run flag - -extern const uint16_t tcp_server_local_port; // fixed -extern const uint16_t udp_server_local_port; // fixed +// Device configuration +extern uint16_t u16ip_addr[], u16ip_subnet[], u16ip_gateway[], u16mac_addr[]; // 16-bits, directly loaded from eeprom +extern char str_ip_addr[], str_ip_subnet[], str_ip_gateway[], str_mac[]; // for printf and RPC, converted from 16-bits u16ip_xxx +extern uint8_t u8ip_addr[];// keep ip address in 8-bits +extern uint16_t configured_ip; // flag indicates a static ip has been configured 0xA5A5 +extern uint8_t u8mac[]; // mac in 8-bits -// 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[]; +// TCP/UDP server +extern uint16_t tcp_server_local_port; // change to 7000 if internet required +extern uint16_t udp_server_local_port; + +// TCP client +// this section is used to set the TCP server that this device connects to in TCP client mode. +// this device will update its status to the server every transmit_time_period. +extern uint16_t auto_transmit_flag, transmit_time_period ; // auto transmit status, time period = 1s extern uint16_t u16server_ip_addr[]; // directly loaded from eeprom +extern uint8_t u8server_ip_addr[]; // server ip address in 8-bits +extern char str_server_ip_addr[];// for printf, converted from 16-bits u16server_ip_addr extern uint16_t u16tcp_server_port; // directly loaded from eeprom -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 +extern uint16_t u16enable_tcp_server, u16enable_tcp_client;// flags for enabling TCP client or TCP server void write_eeprom_network(char* buf); void load_eeprom_network(void);
