summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/stm32/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ports/stm32/main.c b/ports/stm32/main.c
index fb3e843bb..120ab5b67 100644
--- a/ports/stm32/main.c
+++ b/ports/stm32/main.c
@@ -136,8 +136,10 @@ static const char fresh_boot_py[] =
"import machine\r\n"
"import pyb\r\n"
"#pyb.main('main.py') # main script to run after this one\r\n"
+#if MICROPY_HW_ENABLE_USB
"#pyb.usb_mode('VCP+MSC') # act as a serial and a storage device\r\n"
"#pyb.usb_mode('VCP+HID') # act as a serial device and a mouse\r\n"
+#endif
;
static const char fresh_main_py[] =