Skip to content

Commit 6346cc1

Browse files
jukkarandrewboie
authored andcommitted
doc: net: Add SNTP API documentation
Documentation for Simple Network Time Protocol library was missing. Signed-off-by: Jukka Rissanen <[email protected]>
1 parent cac20e9 commit 6346cc1

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

doc/reference/networking/apis.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ Network APIs
1414
net_timeout.rst
1515
net_context.rst
1616
promiscuous.rst
17+
sntp.rst
1718
trickle.rst

doc/reference/networking/sntp.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
.. _sntp_interface:
2+
3+
Simple Network Time Protocol Library
4+
####################################
5+
6+
.. contents::
7+
:local:
8+
:depth: 2
9+
10+
Overview
11+
********
12+
13+
The SNTP library implements
14+
`IETF RFC4330 (Simple Network Time Protocol v4) <https://tools.ietf.org/html/rfc4330>`_.
15+
16+
SNTP provides a way to synchronize clocks in computer networks.
17+
18+
19+
API Reference
20+
*************
21+
22+
.. doxygengroup:: sntp
23+
:project: Zephyr

include/net/sntp.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@
1010

1111
#include <net/socket.h>
1212

13+
/**
14+
* @brief Simple Network Time Protocol API
15+
* @defgroup sntp SNTP
16+
* @ingroup networking
17+
* @{
18+
*/
19+
1320
/** SNTP context */
1421
struct sntp_ctx {
1522
struct {
@@ -55,4 +62,8 @@ int sntp_request(struct sntp_ctx *ctx, u32_t timeout, u64_t *epoch_time);
5562
*/
5663
void sntp_close(struct sntp_ctx *ctx);
5764

65+
/**
66+
* @}
67+
*/
68+
5869
#endif

0 commit comments

Comments
 (0)