Skip to content

Commit 59dda71

Browse files
doc-hexdpgeorge
authored andcommitted
stm32/main: Guard usb_mode lines in default boot.py by relevant #if.
1 parent 4ff05ae commit 59dda71

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

ports/stm32/main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,10 @@ static const char fresh_boot_py[] =
136136
"import machine\r\n"
137137
"import pyb\r\n"
138138
"#pyb.main('main.py') # main script to run after this one\r\n"
139+
#if MICROPY_HW_ENABLE_USB
139140
"#pyb.usb_mode('VCP+MSC') # act as a serial and a storage device\r\n"
140141
"#pyb.usb_mode('VCP+HID') # act as a serial device and a mouse\r\n"
142+
#endif
141143
;
142144

143145
static const char fresh_main_py[] =

0 commit comments

Comments
 (0)