Skip to content

Commit d295918

Browse files
Add 'spi:read()' second argument (#105)
1 parent c66757f commit d295918

File tree

1 file changed

+3
-2
lines changed
  • lang/en/typeshed/stdlib/microbit

1 file changed

+3
-2
lines changed

lang/en/typeshed/stdlib/microbit/spi.pyi

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,13 @@ def init(
2727
"""
2828
...
2929

30-
def read(nbytes: int) -> bytes:
31-
"""Read bytes.
30+
def read(nbytes: int, out: int = 0) -> bytes:
31+
"""Read at most ``nbytes`` while continuously writing the single byte given by ``out``.
3232
3333
Example: ``spi.read(64)``
3434
3535
:param nbytes: Maximum number of bytes to read.
36+
:param out: The byte value to write (default 0).
3637
:return: The bytes read.
3738
"""
3839
...

0 commit comments

Comments
 (0)