SNTP: Add function to get SNTP enabled state

This commit is contained in:
Dirk Ziegelmeier 2016-03-30 11:20:16 +02:00
parent 4bd57882b0
commit d70d9bf866
2 changed files with 9 additions and 0 deletions

View File

@ -571,6 +571,14 @@ sntp_stop(void)
}
}
/**
* Get enabled state.
*/
u8_t sntp_enabled(void)
{
return (sntp_pcb != NULL)? 1 : 0;
}
/**
* Sets the operating mode.
* @param operating_mode one of the available operating modes

View File

@ -48,6 +48,7 @@ u8_t sntp_getoperatingmode(void);
void sntp_init(void);
void sntp_stop(void);
u8_t sntp_enabled(void);
void sntp_setserver(u8_t idx, const ip_addr_t *addr);
ip_addr_t sntp_getserver(u8_t idx);