Skip to content

Commit 2dd0130

Browse files
RP2350 fixes, tested on 2W-compatible
1 parent caf7fc8 commit 2dd0130

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed
Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
// For FreeRTOS, we'll just use the NOSYS version because we already safely handle it
22
#ifdef __FREERTOS
33

4+
#include "lwip/init.h"
45
#include "pico/async_context.h"
56

6-
extern bool lwip_nosys_init(async_context_t *context);
7-
extern void lwip_nosys_deinit(async_context_t *context);
8-
97
bool lwip_freertos_init(async_context_t *context) {
10-
return lwip_nosys_init(context);
8+
static bool done_lwip_init;
9+
if (!done_lwip_init) {
10+
lwip_init();
11+
done_lwip_init = true;
12+
}
13+
return true;
1114
}
1215
void lwip_freertos_deinit(__unused async_context_t *context) {
13-
lwip_nosys_deinit(context);
16+
panic("unsupported");
1417
}
1518
#endif

cores/rp2040/lwip_wrap.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ extern "C" {
5151
void __wrap_lwip_init() {
5252
if (!_lwip_rng) {
5353
recursive_mutex_init(&__lwipMutex);
54-
_lwip_rng = new XoshiroCpp::Xoshiro256PlusPlus(micros() * rp2040.getCycleCount());
54+
_lwip_rng = new XoshiroCpp::Xoshiro256PlusPlus(micros());
5555
__real_lwip_init();
5656
}
5757
}

0 commit comments

Comments
 (0)