summaryrefslogtreecommitdiff
path: root/docs/library
diff options
context:
space:
mode:
authorJason Neal <jason.neal@astro.up.pt>2020-01-04 23:00:27 +1300
committerDamien George <damien.p.george@gmail.com>2020-01-06 22:25:35 +1100
commit99ed431d2840b30f67eae49be96d31c7faeca75e (patch)
tree6a0a7b896c86e7fa9e07e0218702db9687ce8232 /docs/library
parent1bc9fc80821edea293bc04a4c1c2c462dc546813 (diff)
docs/library/machine.I2C.rst: Use positional-only arguments syntax.
Addresses issue #5196.
Diffstat (limited to 'docs/library')
-rw-r--r--docs/library/machine.I2C.rst10
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/library/machine.I2C.rst b/docs/library/machine.I2C.rst
index f58912437..2cbfec1ba 100644
--- a/docs/library/machine.I2C.rst
+++ b/docs/library/machine.I2C.rst
@@ -89,7 +89,7 @@ These methods are available on software I2C only.
Generate a STOP condition on the bus (SDA transitions to high while SCL is high).
-.. method:: I2C.readinto(buf, nack=True)
+.. method:: I2C.readinto(buf, nack=True, /)
Reads bytes from the bus and stores them into *buf*. The number of bytes
read is the length of *buf*. An ACK will be sent on the bus after
@@ -109,13 +109,13 @@ Standard bus operations
The following methods implement the standard I2C master read and write
operations that target a given slave device.
-.. method:: I2C.readfrom(addr, nbytes, stop=True)
+.. method:: I2C.readfrom(addr, nbytes, stop=True, /)
Read *nbytes* from the slave specified by *addr*.
If *stop* is true then a STOP condition is generated at the end of the transfer.
Returns a `bytes` object with the data read.
-.. method:: I2C.readfrom_into(addr, buf, stop=True)
+.. method:: I2C.readfrom_into(addr, buf, stop=True, /)
Read into *buf* from the slave specified by *addr*.
The number of bytes read will be the length of *buf*.
@@ -123,7 +123,7 @@ operations that target a given slave device.
The method returns ``None``.
-.. method:: I2C.writeto(addr, buf, stop=True)
+.. method:: I2C.writeto(addr, buf, stop=True, /)
Write the bytes from *buf* to the slave specified by *addr*. If a
NACK is received following the write of a byte from *buf* then the
@@ -131,7 +131,7 @@ operations that target a given slave device.
generated at the end of the transfer, even if a NACK is received.
The function returns the number of ACKs that were received.
-.. method:: I2C.writevto(addr, vector, stop=True)
+.. method:: I2C.writevto(addr, vector, stop=True, /)
Write the bytes contained in *vector* to the slave specified by *addr*.
*vector* should be a tuple or list of objects with the buffer protocol.