Skip to content

Commit f364acb

Browse files
committed
Minor changes to get Pico 2 W to compile and link
These two files need changes for the Pico 2W target to compile - cores/rp2040/cyw43_wrappers.h - cores/rp2040/lwip_wrap.cpp Some changes to `tools/libpico/CMakeLists.txt` will hopefully fix a linking error.
1 parent 4debb1c commit f364acb

30 files changed

+7
-1
lines changed

cores/rp2040/cyw43_wrappers.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,15 @@
2323
#include <pico/cyw43_driver.h>
2424

2525
extern bool __isPicoW;
26+
#ifdef __cplusplus
2627
extern "C" {
28+
#endif
2729
void init_cyw43_wifi();
2830
void __lockBluetooth();
2931
void __unlockBluetooth();
3032
void cyw43_pinMode(pin_size_t pin, PinMode mode);
3133
void cyw43_digitalWrite(pin_size_t pin, PinStatus val);
3234
PinStatus cyw43_digitalRead(pin_size_t pin);
35+
#ifdef __cplusplus
3336
}
37+
#endif

cores/rp2040/lwip_wrap.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include <lwip/dns.h>
2727
#include <lwip/raw.h>
2828
#include <lwip/timeouts.h>
29-
#ifdef PICO_RP2040
29+
#ifdef PICO_CYW43_SUPPORTED
3030
#include <pico/cyw43_arch.h>
3131
#endif
3232
#include <pico/mutex.h>

0 commit comments

Comments
 (0)