File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -43,12 +43,14 @@ Methods
4343
4444 Read at most ``nbytes `` from the serial device and return them as a
4545 bytes object. If ``nbytes `` is not specified then the method acts as
46- ``readall() ``.
46+ ``readall() ``. USB_VCP stream implicitly works in non-blocking mode,
47+ so if no pending data available, this method will return immediately
48+ with ``None `` value.
4749
4850.. method :: usb_vcp.readall()
4951
5052 Read all available bytes from the serial device and return them as
51- a bytes object.
53+ a bytes object, or `` None `` if no pending data available .
5254
5355.. method :: usb_vcp.readinto(buf, [maxlen])
5456
@@ -57,14 +59,15 @@ Methods
5759 If ``maxlen `` is given and then at most ``min(maxlen, len(buf)) `` bytes
5860 are read.
5961
60- Returns the number of bytes read and stored into ``buf ``.
62+ Returns the number of bytes read and stored into ``buf `` or ``None ``
63+ if no pending data available.
6164
6265.. method :: usb_vcp.readline()
6366
6467 Read a whole line from the serial device.
6568
6669 Returns a bytes object containing the data, including the trailing
67- newline character.
70+ newline character or `` None `` if no pending data available .
6871
6972.. method :: usb_vcp.readlines()
7073
You can’t perform that action at this time.
0 commit comments