Skip to content

Commit cce86cd

Browse files
committed
Allow LwIP to be disabled by default
The cyw43-driver enables LwIP if CYW43_LWIP is not defined. Allow LwIP to be disabled by default if CYW43_LWIP is not defined so we can use the driver to access the led without needing to link to LwIP. Add CYW43_LWIP_DEFAULT to enable this.
1 parent 389ff83 commit cce86cd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/rp2_common/pico_cyw43_driver/include/cyw43_configport.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,11 @@ void cyw43_post_poll_hook(void);
211211
#define CYW43_PRINTF(...) (void)0
212212
#endif
213213

214+
// PICO_CONFIG: CYW43_LWIP_DEFAULT, Sets the default value of CYW43_LWIP if it's undefined. CYW43_LWIP defines if cyw43-driver uses LwIP. The default behavior - if it's not defined anywhere - is to set it to 1 and cyw43-driver will use LwIP requiring you to provide an lwipopts.h header file. You can set CYW43_LWIP_DEFAULT to change the default to 0, and avoid using LwIP if CYW43_LWIP is undefined, type=bool, group=pico_cyw43_driver
215+
#if !defined CYW43_LWIP && defined CYW43_LWIP_DEFAULT
216+
#define CYW43_LWIP CYW43_LWIP_DEFAULT
217+
#endif
218+
214219
#ifdef __cplusplus
215220
}
216221
#endif

0 commit comments

Comments
 (0)