Skip to content

Commit 005759d

Browse files
d-c-dDavid Dyck
and
David Dyck
authored
Fix #2253 cybt_printf by wrapping with NDEBUG (#2323)
Observe that src/rp2_common/pico_cyw43_driver/cybt_shared_bus/cybt_shared_bus_driver.c wraps the definition of cybt_printf with #ifndef NDEBUG Apply this to src/rp2_common/pico_cyw43_driver/cybt_shared_bus/cybt_shared_bus.c Co-authored-by: David Dyck <david.dyck@checksum.com>
1 parent 645b33c commit 005759d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/rp2_common/pico_cyw43_driver/cybt_shared_bus/cybt_shared_bus.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ extern const int brcm_patch_ram_length;
3939
#else
4040
#define cybt_debug(format, ...) ((void)0)
4141
#endif
42+
#ifndef NDEBUG
4243
#define cybt_printf(format, args...) printf("%d.%d: " format, (int)cyw43_hal_ticks_ms() / 1000, (int)cyw43_hal_ticks_ms() % 1000, ## args)
44+
#else
45+
#define cybt_printf(...)
46+
#endif
4347

4448
#define ROUNDUP(x, a) ((((x) + ((a) - 1)) / (a)) * (a))
4549
#define ROUNDDN(x, a) ((x) & ~((a) - 1))

0 commit comments

Comments
 (0)