NetBurner 3.1
serial/SerialBurner/src/nvsettings.h
1 /*NB_REVISION*/
2 
3 /*NB_COPYRIGHT*/
4 
5 #ifndef _NVSETTINGS_H_
6 #define _NVSETTINGS_H_
7 
8 #define VERIFY_KEY (0x48666050) // NV Settings key code
9 
10 /*
11  * The default number of seconds between receiving TCP chars before a timeout occurs.
12  * The system default timeout, TCP_WRITE_TIMEOUT, is 10 seconds, which is the minimum
13  * timeout value. A timeout value of 0 will disable the timeout feature.
14  * */
15 #define DEF_INACTIVITY_TIMEOUT (60) // inactivity timeout in seconds
16 
17 /* If a new client TCP connection is attempted while one is active,
18  * one of the following three actions can be taken:
19  * a) Ignore the incoming connection (leave current connection active)
20  * (set override timeout to 0xFFFFFFFF)
21  * b) Replace the existing connection if it has been idle for a specified number of seconds.
22  * (set override to the number of seconds to wait)
23  * c) Always replace the existing connection.
24  * (set override to 0 seconds)
25  *
26  * This is done with the override timeout setting below:
27  * The default number of seconds to wait before a new connection can override an
28  * existing connection.
29  */
30 #define DEF_OVERRIDE_TIMEOUT (20)
31 
32 
33 struct NV_SettingsStruct
34 {
35  uint32_t VerifyKey;
36  uint16_t ServerListenPort;
37  uint16_t ClientTimeout;
38  uint16_t ClientOverrideTimeout;
39  uint32_t DataBaudRate;
40  uint16_t SerialDataFlowControl;
41 };
42 
43 extern NV_SettingsStruct NV_Settings; // Non-volatile settings to store in flash memory
44 
45 
46 #endif
47