Skip to content

Commit d991f6d

Browse files
committed
pbio/debug: Use native stdout when available.
1 parent a17c1d2 commit d991f6d

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

lib/pbio/src/debug.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
// SPDX-License-Identifier: MIT
22
// Copyright (c) 2021-2025 The Pybricks Authors
33

4+
#include <pbdrv/config.h>
5+
46
#include <pbdrv/usb.h>
57
#include <pbdrv/../../drv/uart/uart_debug_first_port.h>
68

79
#include <pbio/debug.h>
810

911
void pbio_debug_va(const char *format, va_list args) {
12+
#if PBDRV_CONFIG_USB_SIMULATION
13+
vprintf(format, args);
14+
return;
15+
#endif
16+
1017
char buf[256];
1118
size_t len = vsnprintf(buf, sizeof(buf), format, args);
1219
pbdrv_usb_debug_print(buf, len);

0 commit comments

Comments
 (0)