Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions shared-bindings/usb_cdc/Serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,15 @@
//| The available instances are in the ``usb_cdc.serials`` tuple."""
//| ...
//|
//| def read(self, size: int = 1) -> bytes:
//| """Read at most ``size`` bytes. If ``size`` exceeds the internal buffer size
//| only the bytes in the buffer will be read. If `timeout` is > 0 or ``None``,
//| and fewer than ``size`` bytes are available, keep waiting until the timeout
//| expires or ``size`` bytes are available.
//| def read(self, size: int = -1) -> bytes:
//| """Read at most ``size`` bytes. If ``size`` exceeds the internal buffer size,
//| only the bytes in the buffer will be read. If ``size`` is not specified or is ``-1``,
//| read as many bytes as possible, until the timeout expires.
//| If `timeout` is > 0 or ``None``, and fewer than ``size`` bytes are available,
//| keep waiting until the timeout expires or ``size`` bytes are available.
//|
//| If no bytes are read, return ``b''``. This is unlike, say, `busio.UART.read()`, which
//| would return ``None``.
//|
//| :return: Data read
//| :rtype: bytes"""
Expand Down