diff --git a/docs/library/pyb.USB_VCP.rst b/docs/library/pyb.USB_VCP.rst index 3bc6c749ce..94ea418485 100644 --- a/docs/library/pyb.USB_VCP.rst +++ b/docs/library/pyb.USB_VCP.rst @@ -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.