merge_back #1
10
.clang-format
Normal file
10
.clang-format
Normal file
@@ -0,0 +1,10 @@
|
||||
BasedOnStyle: Microsoft
|
||||
BinPackArguments: false
|
||||
BinPackParameters: false
|
||||
AlignAfterOpenBracket: DontAlign
|
||||
AlignConsecutiveMacros: true
|
||||
AlignConsecutiveAssignments: true
|
||||
IndentCaseLabels: true
|
||||
PointerAlignment: Left
|
||||
BraceWrapping:
|
||||
AfterCaseLabel: true
|
||||
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@@ -6,7 +6,7 @@
|
||||
"comment": "clang-format"
|
||||
}
|
||||
],
|
||||
"editor.formatOnSave": false,
|
||||
"editor.formatOnSave": true,
|
||||
"clangd.arguments": [
|
||||
"--pretty",
|
||||
"--background-index",
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "platform.h"
|
||||
|
||||
#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) {
|
||||
uint64_t time = get_aclint_mtime(aclint);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -62,16 +62,6 @@
|
||||
|
||||
#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. */
|
||||
#ifdef NX_LITTLE_ENDIAN
|
||||
#define NX_CHANGE_ULONG_ENDIAN(arg) \
|
||||
|
||||
@@ -61,11 +61,8 @@
|
||||
|
||||
/* Define the base exponent of 2 for huge number.
|
||||
* 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
|
||||
#endif
|
||||
#define NX_DIRECT_ISR_CALL 1
|
||||
/* 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
|
||||
though the compiler's equivalent of the -D option. */
|
||||
@@ -79,10 +76,8 @@
|
||||
present to NetX Duo IP layer. Physical interface does not include
|
||||
loopback interface. By default there is at least one physical interface
|
||||
in the system. */
|
||||
|
||||
#define NX_MAX_PHYSICAL_INTERFACES 2
|
||||
|
||||
|
||||
/* 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
|
||||
the loopback interface. */
|
||||
@@ -99,13 +94,11 @@
|
||||
|
||||
/* This defines specifies the number of ThreadX timer ticks in one second. The default value is based
|
||||
on ThreadX timer interrupt. */
|
||||
/*
|
||||
#ifdef TX_TIMER_TICKS_PER_SECOND
|
||||
#define NX_IP_PERIODIC_RATE TX_TIMER_TICKS_PER_SECOND
|
||||
#else
|
||||
#define NX_IP_PERIODIC_RATE 100
|
||||
#endif
|
||||
*/
|
||||
|
||||
/* Defined, NX_ENABLE_IP_RAW_PACKET_FILTER allows an application to install a filter
|
||||
for incoming raw packets. This feature is disabled by default. */
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
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.
|
||||
|
||||
@@ -134,7 +134,8 @@ void thread_0_entry(ULONG 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. */
|
||||
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);
|
||||
|
||||
/* 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. */
|
||||
status = nx_ip_status_check(&ip_1, NX_IP_INITIALIZE_DONE, &actual_status, NX_IP_PERIODIC_RATE);
|
||||
|
||||
Reference in New Issue
Block a user