Provide an easy way to disable cyw43 logging (#2535)

* Provide an easy way to disable cyw43 logging

All cyw43 logging uses CYW43_PRINTF by default. To disable logging you
have to define this to do nothing. There's no simple way to achieve
this. Make it easier by adding PICO_CYW43_LOGGING_ENABLED which can be
set to zero to disable CYW43_PRINTF.

Fixes #2523

* teensy style change

---------

Co-authored-by: Graham Sanderson <graham.sanderson@raspberrypi.com>
This commit is contained in:
Peter Harper 2025-07-14 17:29:28 +01:00 committed by GitHub
parent 69e018504d
commit b3aed37a18
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -198,6 +198,15 @@ void cyw43_post_poll_hook(void);
#define cyw43_free free #define cyw43_free free
#endif #endif
// PICO_CONFIG: PICO_CYW43_LOGGING_ENABLED, Enable/disable CYW43_PRINTF used for logging in cyw43 components. Has no effect if CYW43_PRINTF is defined by the user, default=1, type=bool, group=pico_cyw43_driver
#ifndef PICO_CYW43_LOGGING_ENABLED
#define PICO_CYW43_LOGGING_ENABLED 1
#endif
#if !defined(CYW43_PRINTF) && !PICO_CYW43_LOGGING_ENABLED
#define CYW43_PRINTF(...) (void)0
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif