Simple SNTP time client. More...
#include <picofuse/hid/device.h>#include <picofuse/net/types.h>#include <picofuse/sys/date.h>#include <stdint.h>

Go to the source code of this file.
Macros | |
| #define | NET_NTP_PORT 123 |
| Standard NTP port. | |
| #define | NET_NTP_DEFAULT_ADDR 162, 159, 200, 1 |
Default NTP server address, as net_addr_v4() arguments - used by net_ntp_init() when its own addr parameter is NULL. More... | |
Typedefs | |
| typedef struct net_ntp_t | net_ntp_t |
| Opaque handle identifying an SNTP server to query. | |
Functions | |
Lifecycle | |
| 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(). More... | |
| void | net_ntp_deinit (net_ntp_t *ntp) |
| Release a handle from net_ntp_init(). More... | |
Methods | |
| bool | net_ntp_read (net_ntp_t *ntp, sys_date_t *date) |
| Query the server for the current time. More... | |
HID Integration | |
| 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. More... | |
Simple SNTP time client.
Definition in file ntp.h.