merge_back #1

Merged
eyck merged 4 commits from Airbus/ADS-VP-Demo-FW:merge_back into main 2026-02-04 06:33:30 +00:00
8 changed files with 500 additions and 537 deletions

10
.clang-format Normal file
View File

@@ -0,0 +1,10 @@
BasedOnStyle: Microsoft
BinPackArguments: false
BinPackParameters: false
AlignAfterOpenBracket: DontAlign
AlignConsecutiveMacros: true
AlignConsecutiveAssignments: true
IndentCaseLabels: true
PointerAlignment: Left
BraceWrapping:
AfterCaseLabel: true

View File

@@ -6,7 +6,7 @@
"comment": "clang-format" "comment": "clang-format"
} }
], ],
"editor.formatOnSave": false, "editor.formatOnSave": true,
"clangd.arguments": [ "clangd.arguments": [
"--pretty", "--pretty",
"--background-index", "--background-index",

View File

@@ -15,7 +15,7 @@
#include "platform.h" #include "platform.h"
#define TICKNUM_PER_SECOND 32768 #define TICKNUM_PER_SECOND 32768
#define TICKNUM_PER_TIMER (TICKNUM_PER_SECOND / 1000) // ~ 1ms timer #define TICKNUM_PER_TIMER (TICKNUM_PER_SECOND / 100) // ~ 1ms timer
static inline int hwtimer_init(void) { static inline int hwtimer_init(void) {
uint64_t time = get_aclint_mtime(aclint); uint64_t time = get_aclint_mtime(aclint);

File diff suppressed because it is too large Load Diff

View File

@@ -62,16 +62,6 @@
#define NX_LITTLE_ENDIAN #define NX_LITTLE_ENDIAN
/* Define various constants for the port. */
#ifndef NX_IP_PERIODIC_RATE
#ifdef TX_TIMER_TICKS_PER_SECOND
#define NX_IP_PERIODIC_RATE TX_TIMER_TICKS_PER_SECOND
#else
#define NX_IP_PERIODIC_RATE 10
#endif
#endif
/* Define macros that swap the endian for little endian ports. */ /* Define macros that swap the endian for little endian ports. */
#ifdef NX_LITTLE_ENDIAN #ifdef NX_LITTLE_ENDIAN
#define NX_CHANGE_ULONG_ENDIAN(arg) \ #define NX_CHANGE_ULONG_ENDIAN(arg) \

View File

@@ -61,11 +61,8 @@
/* Define the base exponent of 2 for huge number. /* Define the base exponent of 2 for huge number.
* Only 16 and 32 are supported. */ * Only 16 and 32 are supported. */
#if __riscv_xlen == 64
#define NX_CRYPTO_HUGE_NUMBER_BITS 16
#else
#define NX_CRYPTO_HUGE_NUMBER_BITS 32 #define NX_CRYPTO_HUGE_NUMBER_BITS 32
#endif #define NX_DIRECT_ISR_CALL 1
/* Define various build options for the NetX Duo port. The application should either make changes /* Define various build options for the NetX Duo port. The application should either make changes
here by commenting or un-commenting the conditional compilation defined OR supply the defines here by commenting or un-commenting the conditional compilation defined OR supply the defines
though the compiler's equivalent of the -D option. */ though the compiler's equivalent of the -D option. */
@@ -79,10 +76,8 @@
present to NetX Duo IP layer. Physical interface does not include present to NetX Duo IP layer. Physical interface does not include
loopback interface. By default there is at least one physical interface loopback interface. By default there is at least one physical interface
in the system. */ in the system. */
#define NX_MAX_PHYSICAL_INTERFACES 2 #define NX_MAX_PHYSICAL_INTERFACES 2
/* Defined, this option disables NetX Duo support on the 127.0.0.1 loopback interface. /* Defined, this option disables NetX Duo support on the 127.0.0.1 loopback interface.
127.0.0.1 loopback interface is enabled by default. Uncomment out the follow code to disable 127.0.0.1 loopback interface is enabled by default. Uncomment out the follow code to disable
the loopback interface. */ the loopback interface. */
@@ -99,13 +94,11 @@
/* This defines specifies the number of ThreadX timer ticks in one second. The default value is based /* This defines specifies the number of ThreadX timer ticks in one second. The default value is based
on ThreadX timer interrupt. */ on ThreadX timer interrupt. */
/*
#ifdef TX_TIMER_TICKS_PER_SECOND #ifdef TX_TIMER_TICKS_PER_SECOND
#define NX_IP_PERIODIC_RATE TX_TIMER_TICKS_PER_SECOND #define NX_IP_PERIODIC_RATE TX_TIMER_TICKS_PER_SECOND
#else #else
#define NX_IP_PERIODIC_RATE 100 #define NX_IP_PERIODIC_RATE 100
#endif #endif
*/
/* Defined, NX_ENABLE_IP_RAW_PACKET_FILTER allows an application to install a filter /* Defined, NX_ENABLE_IP_RAW_PACKET_FILTER allows an application to install a filter
for incoming raw packets. This feature is disabled by default. */ for incoming raw packets. This feature is disabled by default. */

View File

@@ -130,7 +130,7 @@
Note: the actual hardware timer value may need to be changed (usually in tx_initialize_low_level). */ Note: the actual hardware timer value may need to be changed (usually in tx_initialize_low_level). */
#define TX_TIMER_TICKS_PER_SECOND (33UL) // for moonlight with 32,7kHz Frequency (divided by 1000) #define TX_TIMER_TICKS_PER_SECOND (100) // for moonlight with 32,7kHz Frequency (divided by 1000)
/* Determine if there is a FileX pointer in the thread control block. /* Determine if there is a FileX pointer in the thread control block.

View File

@@ -134,7 +134,8 @@ void thread_0_entry(ULONG thread_input) {
NX_PARAMETER_NOT_USED(thread_input); NX_PARAMETER_NOT_USED(thread_input);
tx_thread_sleep(NX_IP_PERIODIC_RATE); /* Wait 1 second for the IP thread to finish its initilization. */
tx_thread_sleep(/* NX_IP_PERIODIC_RATE */ 10);
/* set the TCP server addresses. */ /* set the TCP server addresses. */
server_ipv4_address.nxd_ip_version = NX_IP_VERSION_V4; server_ipv4_address.nxd_ip_version = NX_IP_VERSION_V4;
@@ -234,7 +235,7 @@ void thread_1_entry(ULONG thread_input) {
NX_PARAMETER_NOT_USED(thread_input); NX_PARAMETER_NOT_USED(thread_input);
/* Wait 1 second for the IP thread to finish its initilization. */ /* Wait 1 second for the IP thread to finish its initilization. */
tx_thread_sleep(NX_IP_PERIODIC_RATE); tx_thread_sleep(/* NX_IP_PERIODIC_RATE */ 10);
/* Ensure the IP instance has been initialized. */ /* Ensure the IP instance has been initialized. */
status = nx_ip_status_check(&ip_1, NX_IP_INITIALIZE_DONE, &actual_status, NX_IP_PERIODIC_RATE); status = nx_ip_status_check(&ip_1, NX_IP_INITIALIZE_DONE, &actual_status, NX_IP_PERIODIC_RATE);