Skip to content

Commit 2b5b387

Browse files
wiseconnect: SNTP Network Stack Application protocol offloading APIs
Origin: Silicon Labs WiseConnect SDK License: Zlib URL: https://github.com/siliconlabs/wiseconnect Commit: 05ef77e82bb473fdf157d33fb9cbf6e1d9a11a9e Version: v3.5.0-rc3 Purpose: To support the SiWx917 SNTP Network Stack Application protocol offloading, we need to add the Silicon Labs APIs, so adding the corresponding source files and include files Co-authored-by: Swami Das Nampalli <[email protected]> Signed-off-by: Swami Das Nampalli <[email protected]> Signed-off-by: Rahul Gurram <[email protected]>
1 parent 389726f commit 2b5b387

File tree

4 files changed

+768
-0
lines changed

4 files changed

+768
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*******************************************************************************
2+
* @file si91x_sntp_client_callback_framework.h
3+
* @brief
4+
*******************************************************************************
5+
* # License
6+
* <b>Copyright 2023 Silicon Laboratories Inc. www.silabs.com</b>
7+
*******************************************************************************
8+
*
9+
* The licensor of this software is Silicon Laboratories Inc. Your use of this
10+
* software is governed by the terms of Silicon Labs Master Software License
11+
* Agreement (MSLA) available at
12+
* www.silabs.com/about-us/legal/master-software-license-agreement. This
13+
* software is distributed to you in Source Code format and is governed by the
14+
* sections of the MSLA applicable to Source Code.
15+
*
16+
******************************************************************************/
17+
#pragma once
18+
19+
#include "sl_si91x_types.h"
20+
21+
sl_status_t sli_si91x_sntp_event_handler(sli_si91x_queue_packet_t *data);
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
/***************************************************************************/ /**
2+
* @file si91x_sntp_client_types.h
3+
*******************************************************************************
4+
* # License
5+
* <b>Copyright 2025 Silicon Laboratories Inc. www.silabs.com</b>
6+
*******************************************************************************
7+
*
8+
* SPDX-License-Identifier: Zlib
9+
*
10+
* The licensor of this software is Silicon Laboratories Inc.
11+
*
12+
* This software is provided 'as-is', without any express or implied
13+
* warranty. In no event will the authors be held liable for any damages
14+
* arising from the use of this software.
15+
*
16+
* Permission is granted to anyone to use this software for any purpose,
17+
* including commercial applications, and to alter it and redistribute it
18+
* freely, subject to the following restrictions:
19+
*
20+
* 1. The origin of this software must not be misrepresented; you must not
21+
* claim that you wrote the original software. If you use this software
22+
* in a product, an acknowledgment in the product documentation would be
23+
* appreciated but is not required.
24+
* 2. Altered source versions must be plainly marked as such, and must not be
25+
* misrepresented as being the original software.
26+
* 3. This notice may not be removed or altered from any source distribution.
27+
*
28+
******************************************************************************/
29+
#pragma once
30+
#include "stdint.h"
31+
32+
/******************************************************
33+
* * Macros
34+
* ******************************************************/
35+
//SNTP client feature
36+
#define SLI_SI91X_SNTP_CLIENT_CREATE 1
37+
#define SLI_SI91X_SNTP_CLIENT_GETTIME 2
38+
#define SLI_SI91X_SNTP_CLIENT_GETTIME_DATE 3
39+
#define SLI_SI91X_SNTP_CLIENT_GETSERVER_ADDRESS 4
40+
#define SLI_SI91X_SNTP_CLIENT_DELETE 5
41+
#define SLI_SI91X_SNTP_CLIENT_GET_SERVER_INFO 6
42+
#define SLI_SI91X_SNTP_CLIENT_SERVER_ASYNC_RSP 7
43+
44+
/******************************************************
45+
* * Type Definitions
46+
* ******************************************************/
47+
48+
// Define for SNTP client initialization
49+
typedef struct {
50+
uint8_t command_type;
51+
uint8_t ip_version;
52+
union {
53+
uint8_t ipv4_address[4];
54+
uint8_t ipv6_address[16];
55+
} server_ip_address;
56+
uint8_t sntp_method;
57+
uint8_t sntp_timeout[2];
58+
} sli_si91x_sntp_client_t;
59+
60+
typedef struct {
61+
uint8_t command_type;
62+
uint8_t ip_version;
63+
union {
64+
uint8_t ipv4_address[4];
65+
uint8_t ipv6_address[16];
66+
} server_ip_address;
67+
uint8_t sntp_method;
68+
} sli_si91x_sntp_server_info_rsp_t;
69+
70+
typedef struct {
71+
uint8_t ip_version;
72+
union {
73+
uint8_t ipv4_address[4];
74+
uint8_t ipv6_address[16];
75+
} server_ip_address;
76+
uint8_t sntp_method;
77+
} sli_si91x_sntp_server_rsp_t;

0 commit comments

Comments
 (0)