Skip to content

Commit bf99442

Browse files
wiseconnect: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 Required Zlib licensing to push to upstream 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 5f6228e commit bf99442

File tree

5 files changed

+763
-0
lines changed

5 files changed

+763
-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: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
/*******************************************************************************
2+
* @file si91x_sntp_client_types.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+
#include "stdint.h"
19+
/******************************************************
20+
* * Macros
21+
* ******************************************************/
22+
//SNTP client feature
23+
#define SI91X_SNTP_CLIENT_CREATE 1
24+
#define SI91X_SNTP_CLIENT_GETTIME 2
25+
#define SI91X_SNTP_CLIENT_GETTIME_DATE 3
26+
#define SI91X_SNTP_CLIENT_GETSERVER_ADDRESS 4
27+
#define SI91X_SNTP_CLIENT_DELETE 5
28+
#define SI91X_SNTP_CLIENT_GET_SERVER_INFO 6
29+
#define SI91X_SNTP_CLIENT_SERVER_ASYNC_RSP 7
30+
31+
/******************************************************
32+
* * Type Definitions
33+
* ******************************************************/
34+
35+
// Define for SNTP client initialization
36+
typedef struct {
37+
uint8_t command_type;
38+
uint8_t ip_version;
39+
union {
40+
uint8_t ipv4_address[4];
41+
uint8_t ipv6_address[16];
42+
} server_ip_address;
43+
uint8_t sntp_method;
44+
uint8_t sntp_timeout[2];
45+
} si91x_sntp_client_t;
46+
47+
typedef struct {
48+
uint8_t command_type;
49+
uint8_t ip_version;
50+
union {
51+
uint8_t ipv4_address[4];
52+
uint8_t ipv6_address[16];
53+
} server_ip_address;
54+
uint8_t sntp_method;
55+
} si91x_sntp_server_info_rsp_t;
56+
57+
typedef struct {
58+
uint8_t ip_version;
59+
union {
60+
uint8_t ipv4_address[4];
61+
uint8_t ipv6_address[16];
62+
} server_ip_address;
63+
uint8_t sntp_method;
64+
} si91x_sntp_server_rsp_t;

0 commit comments

Comments
 (0)