docs/library/pyb.USB_VCP.rst: Add info about id and flow params.

pull/1/head
Damien George 2019-09-26 14:00:21 +10:00
parent 2397b44062
commit 78e0e76b4f
1 changed files with 18 additions and 2 deletions

View File

@ -12,14 +12,21 @@ the connected host.
Constructors
------------
.. class:: pyb.USB_VCP()
.. class:: pyb.USB_VCP(id=0)
Create a new USB_VCP object.
Create a new USB_VCP object. The *id* argument specifies which USB VCP port to
use.
Methods
-------
.. method:: USB_VCP.init(\*, flow=-1)
Configure the USB VCP port. If the *flow* argument is not -1 then the value sets
the flow control, which can be a bitwise-or of ``USB_VCP.RTS`` and ``USB_VCP.CTS``.
RTS is used to control read behaviour and CTS, to control write behaviour.
.. method:: USB_VCP.setinterrupt(chr)
Set the character which interrupts running Python code. This is set
@ -101,3 +108,12 @@ Methods
- ``timeout`` is the timeout in milliseconds to wait for the send.
Return value: number of bytes sent.
Constants
---------
.. data:: USB_VCP.RTS
USB_VCP.CTS
to select the flow control type.