1
0
mirror of https://github.com/lwip-tcpip/lwip.git synced 2025-01-26 09:35:23 +00:00

SNTP: Add function to get operating mode

This commit is contained in:
Dirk Ziegelmeier 2016-01-15 11:41:12 +01:00
parent c221361874
commit d9534325cf
2 changed files with 10 additions and 0 deletions
src
apps/sntp
include/lwip/apps

@ -583,6 +583,15 @@ sntp_setoperatingmode(u8_t operating_mode)
sntp_opmode = operating_mode;
}
/**
* Gets the operating mode.
*/
u8_t
sntp_getoperatingmode(void)
{
return sntp_opmode;
}
#if SNTP_GET_SERVERS_FROM_DHCP
/**
* Config SNTP server handling by IP address, name, or DHCP; clear table

@ -44,6 +44,7 @@ extern "C" {
#define SNTP_OPMODE_POLL 0
#define SNTP_OPMODE_LISTENONLY 1
void sntp_setoperatingmode(u8_t operating_mode);
u8_t sntp_getoperatingmode(void);
void sntp_init(void);
void sntp_stop(void);