Skip to content

Commit ca6723b

Browse files
committed
rp2/cyw43_configport: Define CYW43_PRINTF to mp_printf to get messages.
The cyw43-driver uses `printf` by default for `CYW43_PRINTF`, but on the rp2 port `printf` only goes to a UART output and not to USB CDC. By defining `CYW43_PRINTF` to `mp_printf`, all the messages from the cyw43-driver are seen on USB CDC. For example this allows `network.WLAN().config(trace=1)` to show async WALN events. Signed-off-by: Damien George <[email protected]>
1 parent ca220b5 commit ca6723b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ports/rp2/cyw43_configport.h

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#define MICROPY_INCLUDED_RP2_CYW43_CONFIGPORT_H
2828

2929
// The board-level config will be included here, so it can set some CYW43 values.
30+
#include <stdio.h>
3031
#include "py/mpconfig.h"
3132
#include "py/mperrno.h"
3233
#include "py/mphal.h"
@@ -39,6 +40,7 @@
3940
#define CYW43_SLEEP_MAX (10)
4041
#define CYW43_NETUTILS (1)
4142
#define CYW43_USE_OTP_MAC (1)
43+
#define CYW43_PRINTF(...) mp_printf(MP_PYTHON_PRINTER, __VA_ARGS__)
4244

4345
#define CYW43_EPERM MP_EPERM // Operation not permitted
4446
#define CYW43_EIO MP_EIO // I/O error

0 commit comments

Comments
 (0)