abfall/src/ntp_client.h

18 lines
285 B
C
Raw Normal View History

2023-01-02 11:10:22 +01:00
#pragma once
#include "pico/stdlib.h"
#include "lwip/apps/sntp.h"
extern "C" void set_system_time(u32_t sec);
class NtpClient {
public:
2023-01-05 09:08:00 +01:00
NtpClient() = delete;
2023-01-02 11:10:22 +01:00
static void setDateTime();
2023-01-04 10:16:35 +01:00
static void stop();
2023-01-02 11:10:22 +01:00
private:
2023-01-05 09:08:00 +01:00
};
inline void NtpClient::stop() { sntp_stop(); }