summaryrefslogtreecommitdiff
path: root/shared-bindings/busio/SPI.c
diff options
context:
space:
mode:
authorDan Halbert <halbert@halwitz.org>2017-10-30 19:32:03 -0400
committerScott Shawcroft <scott@tannewt.org>2017-10-30 18:32:36 -0700
commitf738996164fc270015fdb53ee38b24f7823cbbd8 (patch)
tree4962b0c3e63fd8d0b12c1f5898d951d279bd4c4d /shared-bindings/busio/SPI.c
parentbd7abcda970e4e6ecd0f64621536870b49185594 (diff)
Allow writing buffer of length zero to I2C device; it can be used to poll for existence.
Diffstat (limited to 'shared-bindings/busio/SPI.c')
-rw-r--r--shared-bindings/busio/SPI.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/shared-bindings/busio/SPI.c b/shared-bindings/busio/SPI.c
index dc136564d..add541aa7 100644
--- a/shared-bindings/busio/SPI.c
+++ b/shared-bindings/busio/SPI.c
@@ -207,6 +207,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(busio_spi_unlock_obj, busio_spi_obj_unlock);
//| .. method:: SPI.write(buffer, \*, start=0, end=len(buffer))
//|
//| Write the data contained in ``buf``. Requires the SPI being locked.
+//| At least one byte must be written.
//|
//| :param bytearray buffer: buffer containing the bytes to write
//| :param int start: Index to start writing from
@@ -247,6 +248,7 @@ MP_DEFINE_CONST_FUN_OBJ_KW(busio_spi_write_obj, 2, busio_spi_write);
//| .. method:: SPI.readinto(buffer, \*, start=0, end=len(buffer), write_value=0)
//|
//| Read into the buffer specified by ``buf`` while writing zeroes. Requires the SPI being locked.
+//| At least one byte must be read.
//|
//| :param bytearray buffer: buffer to write into
//| :param int start: Index to start writing at