Skip to content

Commit 869fff8

Browse files
committed
update stm netxduo
1 parent e614fca commit 869fff8

File tree

490 files changed

+5846
-2220
lines changed

Some content is hidden

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

490 files changed

+5846
-2220
lines changed

STMicroelectronics/STM32L4_L4+/lib/netxduo/CMakeLists.txt

Lines changed: 437 additions & 432 deletions
Large diffs are not rendered by default.

STMicroelectronics/STM32L4_L4+/lib/netxduo/addons/sntp/nxd_sntp_client.c

Lines changed: 3 additions & 194 deletions
Large diffs are not rendered by default.

STMicroelectronics/STM32L4_L4+/lib/netxduo/addons/sntp/nxd_sntp_client.h

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,8 @@
2323
/* */
2424
/* APPLICATION INTERFACE DEFINITION RELEASE */
2525
/* */
26-
#ifdef __PRODUCT_NETXDUO__
2726
/* nxd_sntp_client.h PORTABLE C */
2827
/* 6.0 */
29-
#else
30-
/* nx_sntp_client.h PORTABLE C */
31-
/* 6.0 */
32-
#endif
3328
/* AUTHOR */
3429
/* */
3530
/* Yuxin Zhou, Microsoft Corporation */
@@ -65,11 +60,7 @@ extern "C" {
6560
#endif
6661

6762

68-
#ifdef __PRODUCT_NETXDUO__
6963
#define NXD_SNTP_ID 0x534E5460UL
70-
#else
71-
#define NX_SNTP_ID 0x534E5460UL
72-
#endif
7364

7465

7566
/* Conversion between seconds and timer ticks. This must equal the
@@ -573,11 +564,7 @@ extern "C" {
573564
TX_THREAD nx_sntp_client_thread; /* The SNTP Client processing thread */
574565
TX_MUTEX nx_sntp_client_mutex; /* The SNTP Client mutex for protecting access */
575566
UCHAR nx_sntp_client_thread_stack[NX_SNTP_CLIENT_THREAD_STACK_SIZE]; /* Stack size for SNTP client thread */
576-
#ifdef __PRODUCT_NETXDUO__
577567
NXD_ADDRESS nx_sntp_server_ip_address; /* Client's current time server IP address. */
578-
#else
579-
ULONG nx_sntp_server_ip_address; /* Client's current time server IP address. */
580-
#endif
581568
NX_UDP_SOCKET nx_sntp_client_udp_socket; /* Client UDP socket for sending and receiving time updates. */
582569
UINT nx_sntp_client_first_update_pending; /* First SNTP update not yet received with current server */
583570
UINT nx_sntp_client_time_start_wait; /* Initial time at start of receiving broadcast SNTP updates */
@@ -586,19 +573,10 @@ extern "C" {
586573
UINT nx_sntp_valid_server_status; /* Server status; if receiving valid updates, status is TRUE */
587574
UINT nx_sntp_client_protocol_mode; /* Mode of operation, either unicast or broadcast */
588575
UINT nx_sntp_client_broadcast_initialized; /* Client task is ready to receive broadcast time data. */
589-
#ifdef __PRODUCT_NETXDUO__
590576
NXD_ADDRESS nx_sntp_broadcast_time_server; /* Client's broadcast SNTP server */
591577
NXD_ADDRESS nx_sntp_multicast_server_address; /* IP address Client should listen on to receive broadcasts from a multicast server. */
592-
#else
593-
ULONG nx_sntp_broadcast_time_server; /* Client's broadcast SNTP server */
594-
ULONG nx_sntp_multicast_server_address; /* IP address Client should listen on to receive broadcasts from a multicast server. */
595-
#endif
596578
UINT nx_sntp_client_unicast_initialized; /* Client task is ready to receive unicast time data. */
597-
#ifdef __PRODUCT_NETXDUO__
598579
NXD_ADDRESS nx_sntp_unicast_time_server; /* Client's unicast time server. */
599-
#else
600-
ULONG nx_sntp_unicast_time_server; /* Client's unicast time server. */
601-
#endif
602580
ULONG nx_sntp_client_unicast_poll_interval; /* Unicast interval at which client is polling the time server. */
603581
UINT nx_sntp_client_backoff_count; /* Count of times the back off rate has been applied to the poll interval */
604582
TX_TIMER nx_sntp_update_timer; /* SNTP update timer; expires when no data received for specified time lapse. */
@@ -643,10 +621,8 @@ extern "C" {
643621
#define nx_sntp_client_delete _nx_sntp_client_delete
644622
#define nx_sntp_client_get_local_time _nx_sntp_client_get_local_time
645623
#define nx_sntp_client_get_local_time_extended _nx_sntp_client_get_local_time_extended
646-
#ifdef __PRODUCT_NETXDUO__
647624
#define nxd_sntp_client_initialize_broadcast _nxd_sntp_client_initialize_broadcast
648625
#define nxd_sntp_client_initialize_unicast _nxd_sntp_client_initialize_unicast
649-
#endif
650626
#define nx_sntp_client_initialize_broadcast _nx_sntp_client_initialize_broadcast
651627
#define nx_sntp_client_initialize_unicast _nx_sntp_client_initialize_unicast
652628
#define nx_sntp_client_receiving_updates _nx_sntp_client_receiving_updates
@@ -669,10 +645,8 @@ extern "C" {
669645
#define nx_sntp_client_delete _nxe_sntp_client_delete
670646
#define nx_sntp_client_get_local_time _nxe_sntp_client_get_local_time
671647
#define nx_sntp_client_get_local_time_extended _nxe_sntp_client_get_local_time_extended
672-
#ifdef __PRODUCT_NETXDUO__
673648
#define nxd_sntp_client_initialize_broadcast _nxde_sntp_client_initialize_broadcast
674649
#define nxd_sntp_client_initialize_unicast _nxde_sntp_client_initialize_unicast
675-
#endif
676650
#define nx_sntp_client_initialize_broadcast _nxe_sntp_client_initialize_broadcast
677651
#define nx_sntp_client_initialize_unicast _nxe_sntp_client_initialize_unicast
678652
#define nx_sntp_client_receiving_updates _nxe_sntp_client_receiving_updates
@@ -699,13 +673,9 @@ UINT nx_sntp_client_create(NX_SNTP_CLIENT *client_ptr, NX_IP *ip_ptr, UINT ifa
699673
UINT nx_sntp_client_delete (NX_SNTP_CLIENT *client_ptr);
700674
UINT nx_sntp_client_get_local_time(NX_SNTP_CLIENT *client_ptr, ULONG *seconds, ULONG *fraction, CHAR *buffer);
701675
UINT nx_sntp_client_get_local_time_extended(NX_SNTP_CLIENT *client_ptr, ULONG *seconds, ULONG *fraction, CHAR *buffer, UINT buffer_size);
702-
#ifdef __PRODUCT_NETXDUO__
703676
UINT nxd_sntp_client_initialize_broadcast(NX_SNTP_CLIENT *client_ptr, NXD_ADDRESS *multicast_server_address, NXD_ADDRESS *broadcast_time_server);
704-
#endif
705677
UINT nx_sntp_client_initialize_broadcast(NX_SNTP_CLIENT *client_ptr, ULONG multicast_server_address, ULONG broadcast_time_server);
706-
#ifdef __PRODUCT_NETXDUO__
707678
UINT nxd_sntp_client_initialize_unicast(NX_SNTP_CLIENT *client_ptr, NXD_ADDRESS *unicast_time_server);
708-
#endif
709679
UINT nx_sntp_client_initialize_unicast(NX_SNTP_CLIENT *client_ptr, ULONG unicast_time_server);
710680
UINT nx_sntp_client_receiving_updates(NX_SNTP_CLIENT *client_ptr, UINT *server_status);
711681
UINT nx_sntp_client_run_broadcast(NX_SNTP_CLIENT *client_ptr);
@@ -738,20 +708,12 @@ UINT _nx_sntp_client_get_local_time(NX_SNTP_CLIENT *client_ptr, ULONG *second
738708
UINT _nxe_sntp_client_get_local_time(NX_SNTP_CLIENT *client_ptr, ULONG *seconds, ULONG *fraction, CHAR *buffer);
739709
UINT _nx_sntp_client_get_local_time_extended(NX_SNTP_CLIENT *client_ptr, ULONG *seconds, ULONG *fraction, CHAR *buffer, UINT buffer_size);
740710
UINT _nxe_sntp_client_get_local_time_extended(NX_SNTP_CLIENT *client_ptr, ULONG *seconds, ULONG *fraction, CHAR *buffer, UINT buffer_size);
741-
#ifdef __PRODUCT_NETXDUO__
742711
UINT _nxde_sntp_client_initialize_broadcast(NX_SNTP_CLIENT *client_ptr, NXD_ADDRESS *multicast_server_address, NXD_ADDRESS *broadcast_time_server);
743712
UINT _nxd_sntp_client_initialize_broadcast(NX_SNTP_CLIENT *client_ptr, NXD_ADDRESS *multicast_server_address, NXD_ADDRESS *broadcast_time_server);
744-
#else
745-
UINT _nx_sntp_client_initialize_broadcast(NX_SNTP_CLIENT *client_ptr, ULONG multicast_server_address, ULONG broadcast_time_server);
746-
#endif
747713
UINT _nx_sntp_client_initialize_broadcast(NX_SNTP_CLIENT *client_ptr, ULONG multicast_server_address, ULONG broadcast_time_server);
748714
UINT _nxe_sntp_client_initialize_broadcast(NX_SNTP_CLIENT *client_ptr, ULONG multicast_server_address, ULONG broadcast_time_server);
749-
#ifdef __PRODUCT_NETXDUO__
750715
UINT _nxde_sntp_client_initialize_unicast(NX_SNTP_CLIENT *client_ptr, NXD_ADDRESS *unicast_time_server);
751716
UINT _nxd_sntp_client_initialize_unicast(NX_SNTP_CLIENT *client_ptr, NXD_ADDRESS *unicast_time_server);
752-
#else
753-
UINT _nx_sntp_client_initialize_unicast(NX_SNTP_CLIENT *client_ptr, ULONG unicast_time_server);
754-
#endif
755717
UINT _nx_sntp_client_initialize_unicast(NX_SNTP_CLIENT *client_ptr, ULONG unicast_time_server);
756718
UINT _nxe_sntp_client_initialize_unicast(NX_SNTP_CLIENT *client_ptr, ULONG unicast_time_server);
757719
UINT _nx_sntp_client_receiving_updates(NX_SNTP_CLIENT *client_ptr, UINT *server_status);

STMicroelectronics/STM32L4_L4+/lib/netxduo/src/nx_api.h renamed to STMicroelectronics/STM32L4_L4+/lib/netxduo/common/nx_api.h

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
/* APPLICATION INTERFACE DEFINITION RELEASE */
2727
/* */
2828
/* nx_api.h PORTABLE C */
29-
/* 6.0 */
29+
/* 6.0.2 */
3030
/* AUTHOR */
3131
/* */
3232
/* Yuxin Zhou, Microsoft Corporation */
@@ -45,6 +45,13 @@
4545
/* DATE NAME DESCRIPTION */
4646
/* */
4747
/* 05-19-2020 Yuxin Zhou Initial Version 6.0 */
48+
/* 06-30-2020 Yuxin Zhou Modified comment(s), fixed */
49+
/* ThreadX version check, */
50+
/* updated product constants, */
51+
/* resulting in version 6.0.1 */
52+
/* 08-14-2020 Yuxin Zhou Modified comment(s), and */
53+
/* updated product constants, */
54+
/* resulting in version 6.0.2 */
4855
/* */
4956
/**************************************************************************/
5057

@@ -91,15 +98,15 @@ extern "C" {
9198
#include "tx_trace.h"
9299

93100
/* Define symbols for compatibility before and after ThreadX 5.8. */
94-
#if (((THREADX_MAJOR_VERSION << 16) | THREADX_MINOR_VERSION) >= 0x0508)
101+
#if (((THREADX_MAJOR_VERSION << 8) | THREADX_MINOR_VERSION) >= 0x0508)
95102
#define NX_CLEANUP_PARAMETER , ULONG suspension_sequence
96103
#define NX_CLEANUP_ARGUMENT , 0
97104
#define NX_CLEANUP_EXTENSION NX_PARAMETER_NOT_USED(suspension_sequence);
98105
#else
99106
#define NX_CLEANUP_PARAMETER
100107
#define NX_CLEANUP_ARGUMENT
101108
#define NX_CLEANUP_EXTENSION
102-
#endif /* (((THREADX_MAJOR_VERSION << 16) | THREADX_MINOR_VERSION) >= 0x0508) */
109+
#endif /* (((THREADX_MAJOR_VERSION << 8) | THREADX_MINOR_VERSION) >= 0x0508) */
103110

104111
/* Define the get system state macro. By default, it simply maps to the variable _tx_thread_system_state. */
105112
#ifndef TX_THREAD_GET_SYSTEM_STATE
@@ -449,11 +456,13 @@ VOID _nx_trace_event_update(TX_TRACE_BUFFER_ENTRY *event, ULONG timestamp, ULONG
449456

450457

451458
/* Define basic constants for the NetX TCP/IP Stack. */
452-
#define EL_PRODUCT_NETXDUO
459+
#define AZURE_RTOS_NETXDUO
453460
#define NETXDUO_MAJOR_VERSION 6
454461
#define NETXDUO_MINOR_VERSION 0
462+
#define NETXDUO_PATCH_VERSION 2
455463

456-
/* Define the following symbosl for backward compatibility */
464+
/* Define the following symbols for backward compatibility */
465+
#define EL_PRODUCT_NETXDUO
457466
#define __PRODUCT_NETXDUO__
458467
#define __NETXDUO_MAJOR_VERSION__ NETXDUO_MAJOR_VERSION
459468
#define __NETXDUO_MINOR_VERSION__ NETXDUO_MINOR_VERSION

STMicroelectronics/STM32L4_L4+/lib/netxduo/src/nx_ip.h renamed to STMicroelectronics/STM32L4_L4+/lib/netxduo/common/nx_ip.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,6 @@
9898
#include "nx_ipv4.h"
9999

100100

101-
USHORT _nx_ip_checksum_compute(NX_PACKET *packet_ptr, ULONG protocol, UINT data_length,
102-
ULONG *_src_ip_addr, ULONG *_dest_ip_addr);
103101

104102
#if 0 /* Not support for STM32L475E-IOT01A1. */
105103
/* Define IP function prototypes. */

STMicroelectronics/STM32L4_L4+/lib/netxduo/src/nx_ip_create.c renamed to STMicroelectronics/STM32L4_L4+/lib/netxduo/common/nx_ip_create.c

File renamed without changes.

STMicroelectronics/STM32L4_L4+/lib/netxduo/src/nx_ip_delete.c renamed to STMicroelectronics/STM32L4_L4+/lib/netxduo/common/nx_ip_delete.c

File renamed without changes.

STMicroelectronics/STM32L4_L4+/lib/netxduo/src/nx_ip_initialize.c renamed to STMicroelectronics/STM32L4_L4+/lib/netxduo/common/nx_ip_initialize.c

File renamed without changes.

STMicroelectronics/STM32L4_L4+/lib/netxduo/src/nx_ipv4.h renamed to STMicroelectronics/STM32L4_L4+/lib/netxduo/common/nx_ipv4.h

File renamed without changes.

STMicroelectronics/STM32L4_L4+/lib/netxduo/src/nx_ipv6.h renamed to STMicroelectronics/STM32L4_L4+/lib/netxduo/common/nx_ipv6.h

File renamed without changes.

0 commit comments

Comments
 (0)