File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 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-
97bool 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}
1215void lwip_freertos_deinit (__unused async_context_t * context ) {
13- lwip_nosys_deinit ( context );
16+ panic ( "unsupported" );
1417}
1518#endif
Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments