mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-06 22:24:33 +02:00
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:
committed by
David Čermák
parent
1195b6cb2b
commit
c8f0ec7fa4
@@ -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")))
|
||||
|
Reference in New Issue
Block a user