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

View File

@ -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

View File

@ -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);