summaryrefslogtreecommitdiffstatshomepage
path: root/docs/library/pyb.SPI.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/library/pyb.SPI.rst')
-rw-r--r--docs/library/pyb.SPI.rst11
1 files changed, 6 insertions, 5 deletions
diff --git a/docs/library/pyb.SPI.rst b/docs/library/pyb.SPI.rst
index b17c804d70..54ecc65b6d 100644
--- a/docs/library/pyb.SPI.rst
+++ b/docs/library/pyb.SPI.rst
@@ -1,3 +1,4 @@
+.. currentmodule:: pyb
.. _pyb.SPI:
class SPI -- a master-driven serial protocol
@@ -50,13 +51,13 @@ Constructors
Methods
-------
-.. method:: spi.deinit()
+.. method:: SPI.deinit()
Turn off the SPI bus.
.. only:: port_pyboard
- .. method:: spi.init(mode, baudrate=328125, \*, prescaler, polarity=1, phase=0, bits=8, firstbit=SPI.MSB, ti=False, crc=None)
+ .. method:: SPI.init(mode, baudrate=328125, \*, prescaler, polarity=1, phase=0, bits=8, firstbit=SPI.MSB, ti=False, crc=None)
Initialise the SPI bus with the given parameters:
@@ -82,7 +83,7 @@ Methods
.. only:: port_pyboard
- .. method:: spi.recv(recv, \*, timeout=5000)
+ .. method:: SPI.recv(recv, \*, timeout=5000)
Receive data on the bus:
@@ -93,7 +94,7 @@ Methods
Return value: if ``recv`` is an integer then a new buffer of the bytes received,
otherwise the same buffer that was passed in to ``recv``.
- .. method:: spi.send(send, \*, timeout=5000)
+ .. method:: SPI.send(send, \*, timeout=5000)
Send data on the bus:
@@ -102,7 +103,7 @@ Methods
Return value: ``None``.
- .. method:: spi.send_recv(send, recv=None, \*, timeout=5000)
+ .. method:: SPI.send_recv(send, recv=None, \*, timeout=5000)
Send and receive data on the bus at the same time: