Prusa MINI Firmware overview
|
Macros | |
#define | SNTP_SET_SYSTEM_TIME(sec) LWIP_UNUSED_ARG(sec) |
#define | SNTP_MAX_SERVERS LWIP_DHCP_MAX_NTP_SERVERS |
#define | SNTP_GET_SERVERS_FROM_DHCP LWIP_DHCP_GET_NTP_SRV |
#define | SNTP_SERVER_DNS 0 |
#define | SNTP_DEBUG LWIP_DBG_OFF |
#define | SNTP_PORT 123 |
#define | SNTP_CHECK_RESPONSE 0 |
#define | SNTP_STARTUP_DELAY 0 |
#define | SNTP_STARTUP_DELAY_FUNC SNTP_STARTUP_DELAY |
#define | SNTP_RECV_TIMEOUT 3000 |
#define | SNTP_UPDATE_DELAY 3600000 |
#define | SNTP_GET_SYSTEM_TIME(sec, us) do { (sec) = 0; (us) = 0; } while(0) |
#define | SNTP_RETRY_TIMEOUT SNTP_RECV_TIMEOUT |
#define | SNTP_RETRY_TIMEOUT_MAX (SNTP_RETRY_TIMEOUT * 10) |
#define | SNTP_RETRY_TIMEOUT_EXP 1 |
#define SNTP_SET_SYSTEM_TIME | ( | sec | ) | LWIP_UNUSED_ARG(sec) |
SNTP macro to change system time in seconds Define SNTP_SET_SYSTEM_TIME_US(sec, us) to set the time in microseconds instead of this one if you need the additional precision.
#define SNTP_MAX_SERVERS LWIP_DHCP_MAX_NTP_SERVERS |
The maximum number of SNTP servers that can be set
#define SNTP_GET_SERVERS_FROM_DHCP LWIP_DHCP_GET_NTP_SRV |
Set this to 1 to implement the callback function called by dhcp when NTP servers are received.
#define SNTP_SERVER_DNS 0 |
Set this to 1 to support DNS names (or IP address strings) to set sntp servers One server address/name can be defined as default if SNTP_SERVER_DNS == 1: #define SNTP_SERVER_ADDRESS "pool.ntp.org"
#define SNTP_DEBUG LWIP_DBG_OFF |
SNTP_DEBUG: Enable debugging for SNTP.
#define SNTP_PORT 123 |
SNTP server port
#define SNTP_CHECK_RESPONSE 0 |
Set this to 1 to allow config of SNTP server(s) by DNS name Sanity check: Define this to
#define SNTP_STARTUP_DELAY 0 |
According to the RFC, this shall be a random delay between 1 and 5 minutes (in milliseconds) to prevent load peaks. This can be defined to a random generation function, which must return the delay in milliseconds as u32_t. Turned off by default.
#define SNTP_STARTUP_DELAY_FUNC SNTP_STARTUP_DELAY |
If you want the startup delay to be a function, define this to a function (including the brackets) and define SNTP_STARTUP_DELAY to 1.
#define SNTP_RECV_TIMEOUT 3000 |
SNTP receive timeout - in milliseconds Also used as retry timeout - this shouldn't be too low. Default is 3 seconds.
#define SNTP_UPDATE_DELAY 3600000 |
SNTP update delay - in milliseconds Default is 1 hour. Must not be beolw 15 seconds by specification (i.e. 15000)
#define SNTP_GET_SYSTEM_TIME | ( | sec, | |
us | |||
) | do { (sec) = 0; (us) = 0; } while(0) |
SNTP macro to get system time, used with SNTP_CHECK_RESPONSE >= 2 to send in request and compare in response.
#define SNTP_RETRY_TIMEOUT SNTP_RECV_TIMEOUT |
Default retry timeout (in milliseconds) if the response received is invalid. This is doubled with each retry until SNTP_RETRY_TIMEOUT_MAX is reached.
#define SNTP_RETRY_TIMEOUT_MAX (SNTP_RETRY_TIMEOUT * 10) |
Maximum retry timeout (in milliseconds).
#define SNTP_RETRY_TIMEOUT_EXP 1 |
Increase retry timeout with every retry sent Default is on to conform to RFC.