41 #include <picofuse/net/types.h> 54 #define NET_NTP_PORT 123 65 #ifndef NET_NTP_DEFAULT_ADDR 66 #define NET_NTP_DEFAULT_ADDR 162, 159, 200, 1 161 uint32_t polling_interval_ms,
void net_ntp_deinit(net_ntp_t *ntp)
Release a handle from net_ntp_init().
net_ntp_t * net_ntp_init(const net_addr_t *addr, uint16_t port, uint32_t timeout_ms)
Identify an NTP server to query with net_ntp_read().
hid_device_t * net_ntp_register_hid(hid_t *instance, net_ntp_t *ntp, uint32_t polling_interval_ms, void *userdata)
Register an NTP connection as a polling HID time source.
struct net_ntp_t net_ntp_t
Opaque handle identifying an SNTP server to query.
struct hid_device_t hid_device_t
HID child-device descriptor tracked by a HID instance.
struct hid_t hid_t
Opaque HID instance handle.
bool net_ntp_read(net_ntp_t *ntp, sys_date_t *date)
Query the server for the current time.
HID device lifecycle and polling interface.
Represents a system date and time.
Defines date and wall-clock time APIs.