esp_sntp: Fix c++ compile issue in esp_sntp.h

Added a cast to esp_sntp_operatingmode_t in sntp_setoperatingmode()'s
call to esp_sntp_setoperatingmode(operating_mode).  Althouogh C
doesn't require the cast, C++ does.  Otherwise you get...

error: invalid conversion from 'u8_t' {aka 'unsigned char'}
    to 'esp_sntp_operatingmode_t'
This commit is contained in:
George Joseph
2023-01-26 11:27:48 -07:00
committed by David Čermák
parent 1195b6cb2b
commit c8f0ec7fa4

View File

@@ -228,7 +228,7 @@ void esp_sntp_servermode_dhcp(bool enable);
static inline __attribute__((deprecated("use esp_sntp_setoperatingmode() instead")))
void sntp_setoperatingmode(u8_t operating_mode)
{
esp_sntp_setoperatingmode(operating_mode);
esp_sntp_setoperatingmode((esp_sntp_operatingmode_t)operating_mode);
}
static inline __attribute__((deprecated("use esp_sntp_servermode_dhcp() instead")))