Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
c777b695
Commit
c777b695
authored
Aug 28, 2016
by
Philip Potter
Committed by
Damien George
Aug 29, 2016
Browse files
stmhal: Update boot.py files to use VCP instead of CDC.
parent
0f8b1ba8
Changes
2
Hide whitespace changes
Inline
Side-by-side
examples/SDdatalogger/boot.py
View file @
c777b695
...
...
@@ -16,10 +16,10 @@ pyb.LED(3).off() # indicate that we finished waiting for the swit
pyb
.
LED
(
4
).
on
()
# indicate that we are selecting the mode
if
switch_value
:
pyb
.
usb_mode
(
'
CDC
+MSC'
)
pyb
.
usb_mode
(
'
VCP
+MSC'
)
pyb
.
main
(
'cardreader.py'
)
# if switch was pressed, run this
else
:
pyb
.
usb_mode
(
'
CDC
+HID'
)
pyb
.
usb_mode
(
'
VCP
+HID'
)
pyb
.
main
(
'datalogger.py'
)
# if switch wasn't pressed, run this
pyb
.
LED
(
4
).
off
()
# indicate that we finished selecting the mode
stmhal/main.c
View file @
c777b695
...
...
@@ -137,8 +137,8 @@ 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
"
"#pyb.usb_mode('
CDC
+MSC') # act as a serial and a storage device
\r\n
"
"#pyb.usb_mode('
CDC
+HID') # act as a serial device and a mouse
\r\n
"
"#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
"
;
static
const
char
fresh_main_py
[]
=
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment