Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
micropython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
card10
micropython
Commits
c777b695
Commit
c777b695
authored
8 years ago
by
Philip Potter
Committed by
Damien George
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
stmhal: Update boot.py files to use VCP instead of CDC.
parent
0f8b1ba8
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
examples/SDdatalogger/boot.py
+2
-2
2 additions, 2 deletions
examples/SDdatalogger/boot.py
stmhal/main.c
+2
-2
2 additions, 2 deletions
stmhal/main.c
with
4 additions
and
4 deletions
examples/SDdatalogger/boot.py
+
2
−
2
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
This diff is collapsed.
Click to expand it.
stmhal/main.c
+
2
−
2
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
[]
=
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment