Skip to content

Commit 3678a98

Browse files
jerome-pouillerjhedberg
authored andcommitted
wiseconnect: Import Wiseconnect 3.5.0-rc3
Origin: Silicon Labs WiSeConnect SDK License: Zlib and Apache-2.0 URL: https://github.com/siliconlabs/wiseconnect Commit: 05ef77e82bb473fdf157d33fb9cbf6e1d9a11a9e Version: v3.5.0-rc3 Purpose: Update HAL layer Signed-off-by: Jérôme Pouiller <[email protected]>
1 parent 1950da2 commit 3678a98

File tree

172 files changed

+31913
-16570
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

172 files changed

+31913
-16570
lines changed

wiseconnect/components/common/inc/sl_additional_status.h

Lines changed: 540 additions & 301 deletions
Large diffs are not rendered by default.

wiseconnect/components/common/inc/sl_constants.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
#include <stdarg.h>
3636
#include <stdio.h>
3737

38-
#define SL_STATUS_ENUM(prefix, name, value) prefix##_##name = (prefix##_ENUM_OFFSET + value)
39-
#define SL_STATUS_SHARED_ENUM(prefix, name) prefix##_##name = (SL_##name)
38+
#define SLI_STATUS_ENUM(prefix, name, value) prefix##_##name = (prefix##_ENUM_OFFSET + value)
39+
#define SLI_STATUS_SHARED_ENUM(prefix, name) prefix##_##name = (SL_##name)
4040

4141
#ifdef __CC_ARM
4242
#define BREAKPOINT() __asm__("bkpt #0")
@@ -54,7 +54,7 @@
5454
#define UNUSED_PARAMETER(x) (void)(x)
5555
#endif // UNUSED_PARAMETER
5656

57-
#define ARRAY_COUNT(x) (sizeof(x) / sizeof *(x))
57+
#define SLI_ARRAY_COUNT(x) (sizeof(x) / sizeof *(x))
5858

5959
#ifndef FUZZING
6060
#define SL_ASSERT(condition, ...) \
@@ -171,14 +171,14 @@
171171
} \
172172
} while (0)
173173

174-
#define VERIFY_STATUS_AND_GOTO(status, goto_label) \
175-
do { \
176-
if (status != SL_STATUS_OK) { \
177-
if (PRINT_ERROR_LOGS) { \
178-
PRINT_STATUS(ERROR_TAG, status) \
179-
} \
180-
goto goto_label; \
181-
} \
174+
#define SLI_VERIFY_STATUS_AND_GOTO(status, goto_label) \
175+
do { \
176+
if (status != SL_STATUS_OK) { \
177+
if (PRINT_ERROR_LOGS) { \
178+
PRINT_STATUS(ERROR_TAG, status) \
179+
} \
180+
goto goto_label; \
181+
} \
182182
} while (0)
183183

184184
#define PRINT_ERROR_STATUS(tag, status) printf("\r\n%s %s:%d: 0x%x \r\n", tag, __FILE__, __LINE__, (unsigned int)status)
@@ -201,4 +201,4 @@ extern void sl_redirect_log(const char *format, ...);
201201

202202
typedef uint32_t sl_duration_t;
203203

204-
typedef void (*sl_event_handler_t)(void);
204+
typedef void (*sli_event_handler_t)(void);

wiseconnect/components/common/inc/sl_utility.h

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,22 @@
3434
#include "sl_ieee802_types.h"
3535
#include "sl_wifi_types.h"
3636

37+
/** @brief
38+
* Macro for marking deprecated functions
39+
*
40+
* @details
41+
* SL_DEPRECATED_API_WISECONNECT_<RELEASE> is used to mark functions that are
42+
* deprecated and should not be used from a given version of WiSeConnect SDK.
43+
* The accompanying SL_SUPPRESS_DEPRECATION_WARNINGS_WISECONNECT_<RELEASE>
44+
* define can be set to suppress warnings generated when using
45+
* deprecated APIs.
46+
*/
47+
#ifdef SL_SUPPRESS_DEPRECATION_WARNINGS_WISECONNECT_3_5
48+
#define SL_DEPRECATED_API_WISECONNECT_3_5
49+
#else
50+
#define SL_DEPRECATED_API_WISECONNECT_3_5 __attribute__((deprecated))
51+
#endif
52+
3753
/***************************************************************************/ /**
3854
* @brief
3955
* Convert a character string into a sl_ipv4_address_t
@@ -76,10 +92,10 @@ void print_sl_ip_address(const sl_ip_address_t *sl_ip_address);
7692
void print_sl_ipv4_address(const sl_ipv4_address_t *ip_address);
7793
void print_sl_ipv6_address(const sl_ipv6_address_t *ip_address);
7894
void print_mac_address(const sl_mac_address_t *mac_address);
79-
void convert_uint32_to_bytestream(uint16_t data, uint8_t *buffer);
80-
void little_to_big_endian(const unsigned int *source, unsigned char *result, unsigned int length);
95+
void sli_convert_uint32_to_bytestream(uint16_t data, uint8_t *buffer);
96+
void sli_little_to_big_endian(const unsigned int *source, unsigned char *result, unsigned int length);
8197
int sl_inet_pton6(const char *src, const char *src_endp, unsigned char *dst, unsigned int *ptr_result);
82-
void reverse_digits(unsigned char *xx, int no_digits);
98+
void sli_reverse_digits(unsigned char *xx, int no_digits);
8399
void print_firmware_version(const sl_wifi_firmware_version_t *firmware_version);
84100

85101
/***************************************************************************/ /**

wiseconnect/components/common/src/sl_utility.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ typedef struct {
5454

5555
extern char *strtok_r(char *, const char *, char **);
5656

57-
void convert_uint32_to_bytestream(uint16_t data, uint8_t *buffer)
57+
void sli_convert_uint32_to_bytestream(uint16_t data, uint8_t *buffer)
5858
{
5959
buffer[0] = (uint8_t)(data & 0xFF);
6060
buffer[1] = (uint8_t)((data >> 8) & 0xFF);
@@ -128,7 +128,7 @@ char *sl_inet_ntop6(const unsigned char *input, char *dst, uint32_t size)
128128
const unsigned char *src;
129129
src = (unsigned char *)&ip_big_endian;
130130

131-
little_to_big_endian((const unsigned int *)input, (unsigned char *)ip_big_endian, SL_IPV6_ADDRESS_LENGTH);
131+
sli_little_to_big_endian((const unsigned int *)input, (unsigned char *)ip_big_endian, SL_IPV6_ADDRESS_LENGTH);
132132

133133
memset(words, '\0', sizeof words);
134134
for (i = 0; i < SL_IPV6_ADDRESS_LENGTH; i += 2) {
@@ -188,7 +188,7 @@ char *sl_inet_ntop6(const unsigned char *input, char *dst, uint32_t size)
188188
return memcpy(dst, tmp, size);
189189
}
190190

191-
static int hex_digit_value(char ch)
191+
static int sli_hex_digit_value(char ch)
192192
{
193193
if ('0' <= ch && ch <= '9')
194194
return ch - '0';
@@ -199,7 +199,7 @@ static int hex_digit_value(char ch)
199199
return -1;
200200
}
201201

202-
void little_to_big_endian(const unsigned int *source, unsigned char *result, unsigned int length)
202+
void sli_little_to_big_endian(const unsigned int *source, unsigned char *result, unsigned int length)
203203
{
204204
unsigned char *temp;
205205
unsigned int curr = 0;
@@ -244,7 +244,7 @@ int sl_inet_pton6(const char *src, const char *src_endp, unsigned char *dst, uns
244244

245245
while (src < src_endp) {
246246
ch = *src++;
247-
int digit = hex_digit_value((char)ch);
247+
int digit = sli_hex_digit_value((char)ch);
248248
//printf(" digit :%d ",digit);
249249
if (digit >= 0) {
250250
if (xdigits_seen == 4)
@@ -298,7 +298,7 @@ int sl_inet_pton6(const char *src, const char *src_endp, unsigned char *dst, uns
298298
return 0;
299299

300300
memcpy(dst, tmp, SL_IPV6_ADDRESS_LENGTH);
301-
little_to_big_endian((const unsigned int *)dst, (unsigned char *)ptr_result, SL_IPV6_ADDRESS_LENGTH);
301+
sli_little_to_big_endian((const unsigned int *)dst, (unsigned char *)ptr_result, SL_IPV6_ADDRESS_LENGTH);
302302

303303
return 1;
304304
}
@@ -327,7 +327,7 @@ sl_status_t convert_string_to_mac_address(const char *line, sl_mac_address_t *ma
327327
return SL_STATUS_OK;
328328
}
329329

330-
void reverse_digits(unsigned char *xx, int no_digits)
330+
void sli_reverse_digits(unsigned char *xx, int no_digits)
331331
{
332332
uint8_t temp;
333333
for (int count = 0; count < (no_digits / 2); count++) {

wiseconnect/components/device/silabs/si91x/mcu/core/chip/inc/base_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ extern "C" {
5656

5757
#ifndef MIN
5858
/** Returns the minimum value out of two values */
59-
#define MIN(X, Y) ((X) < (Y) ? (X) : (Y))
59+
#define MIN(a, b) ((a) < (b) ? (a) : (b))
6060
#endif
6161
#ifndef MAX
6262
/** Returns the maximum value out of two values */

0 commit comments

Comments
 (0)