diff options
-rw-r--r-- | ports/rp2/modmachine.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ports/rp2/modmachine.c b/ports/rp2/modmachine.c index 139309281..bf5033adb 100644 --- a/ports/rp2/modmachine.c +++ b/ports/rp2/modmachine.c @@ -33,6 +33,7 @@ #include "extmod/machine_spi.h" #include "modmachine.h" +#include "uart.h" #include "hardware/clocks.h" #include "hardware/watchdog.h" #include "pico/bootrom.h" @@ -89,6 +90,10 @@ STATIC mp_obj_t machine_freq(size_t n_args, const mp_obj_t *args) { if (!set_sys_clock_khz(freq / 1000, false)) { mp_raise_ValueError(MP_ERROR_TEXT("cannot change frequency")); } + #if MICROPY_HW_ENABLE_UART_REPL + setup_default_uart(); + mp_uart_init(); + #endif return mp_const_none; } } |