Skip to content

Commit 57c92d9

Browse files
philandstuffdpgeorge
authored andcommitted
docs/pyboard: Update USB mouse tutorial to use VCP instead of CDC.
1 parent 13c5a22 commit 57c92d9

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

docs/pyboard/tutorial/usb_mouse.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,23 @@ will look something like this::
1313

1414
import pyb
1515
#pyb.main('main.py') # main script to run after this one
16-
#pyb.usb_mode('CDC+MSC') # act as a serial and a storage device
17-
#pyb.usb_mode('CDC+HID') # act as a serial device and a mouse
16+
#pyb.usb_mode('VCP+MSC') # act as a serial and a storage device
17+
#pyb.usb_mode('VCP+HID') # act as a serial device and a mouse
1818

1919
To enable the mouse mode, uncomment the last line of the file, to
2020
make it look like::
2121

22-
pyb.usb_mode('CDC+HID') # act as a serial device and a mouse
22+
pyb.usb_mode('VCP+HID') # act as a serial device and a mouse
2323

2424
If you already changed your ``boot.py`` file, then the minimum code it
2525
needs to work is::
2626

2727
import pyb
28-
pyb.usb_mode('CDC+HID')
28+
pyb.usb_mode('VCP+HID')
2929

30-
This tells the pyboard to configure itself as a CDC (serial) and HID
31-
(human interface device, in our case a mouse) USB device when it boots
32-
up.
30+
This tells the pyboard to configure itself as a VCP (Virtual COM Port,
31+
ie serial port) and HID (human interface device, in our case a mouse)
32+
USB device when it boots up.
3333

3434
Eject/unmount the pyboard drive and reset it using the RST switch.
3535
Your PC should now detect the pyboard as a mouse!
@@ -121,9 +121,9 @@ If you leave your pyboard as-is, it'll behave as a mouse everytime you plug
121121
it in. You probably want to change it back to normal. To do this you need
122122
to first enter safe mode (see above), and then edit the ``boot.py`` file.
123123
In the ``boot.py`` file, comment out (put a # in front of) the line with the
124-
``CDC+HID`` setting, so it looks like::
124+
``VCP+HID`` setting, so it looks like::
125125

126-
#pyb.usb_mode('CDC+HID') # act as a serial device and a mouse
126+
#pyb.usb_mode('VCP+HID') # act as a serial device and a mouse
127127

128128
Save your file, eject/unmount the drive, and reset the pyboard. It is now
129129
back to normal operating mode.

0 commit comments

Comments
 (0)