From e0e0b81ff1d868e309f1e0354b66ef86d905dc6c Mon Sep 17 00:00:00 2001 From: Grace Date: Mon, 13 May 2024 17:01:33 +0100 Subject: [PATCH] Add 'spi:read()' second argument --- lang/en/typeshed/stdlib/microbit/spi.pyi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lang/en/typeshed/stdlib/microbit/spi.pyi b/lang/en/typeshed/stdlib/microbit/spi.pyi index 08194d9..09c4046 100644 --- a/lang/en/typeshed/stdlib/microbit/spi.pyi +++ b/lang/en/typeshed/stdlib/microbit/spi.pyi @@ -27,12 +27,13 @@ def init( """ ... -def read(nbytes: int) -> bytes: - """Read bytes. +def read(nbytes: int, out: int = 0) -> bytes: + """Read at most ``nbytes`` while continuously writing the single byte given by ``out``. Example: ``spi.read(64)`` :param nbytes: Maximum number of bytes to read. + :param out: The byte value to write (default 0). :return: The bytes read. """ ...