summaryrefslogtreecommitdiffstatshomepage
path: root/docs/esp8266
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2020-09-29 16:50:23 +1000
committerDamien George <damien@micropython.org>2020-10-01 12:57:10 +1000
commit98182a97c5a9229938406beb722966eacceeb823 (patch)
tree257a6c96fcbb0f54dbaa6d191218fb98999f2e3c /docs/esp8266
parent71f3ade770fa7f2637d94f5ba5840b64a16a95db (diff)
downloadmicropython-98182a97c5a9229938406beb722966eacceeb823.tar.gz
micropython-98182a97c5a9229938406beb722966eacceeb823.zip
docs: Update I2C and SPI docs to add reference to SoftI2C and SoftSPI.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'docs/esp8266')
-rw-r--r--docs/esp8266/quickref.rst9
1 files changed, 5 insertions, 4 deletions
diff --git a/docs/esp8266/quickref.rst b/docs/esp8266/quickref.rst
index c884d93fc9..1a22bd50a5 100644
--- a/docs/esp8266/quickref.rst
+++ b/docs/esp8266/quickref.rst
@@ -214,15 +214,15 @@ Software SPI bus
----------------
There are two SPI drivers. One is implemented in software (bit-banging)
-and works on all pins, and is accessed via the :ref:`machine.SPI <machine.SPI>`
+and works on all pins, and is accessed via the :ref:`machine.SoftSPI <machine.SoftSPI>`
class::
- from machine import Pin, SPI
+ from machine import Pin, SoftSPI
# construct an SPI bus on the given pins
# polarity is the idle state of SCK
# phase=0 means sample on the first edge of SCK, phase=1 means the second
- spi = SPI(-1, baudrate=100000, polarity=1, phase=0, sck=Pin(0), mosi=Pin(2), miso=Pin(4))
+ spi = SoftSPI(baudrate=100000, polarity=1, phase=0, sck=Pin(0), mosi=Pin(2), miso=Pin(4))
spi.init(baudrate=200000) # set the baudrate
@@ -258,7 +258,8 @@ I2C bus
-------
The I2C driver is implemented in software and works on all pins,
-and is accessed via the :ref:`machine.I2C <machine.I2C>` class::
+and is accessed via the :ref:`machine.I2C <machine.I2C>` class (which is an
+alias of :ref:`machine.SoftI2C <machine.SoftI2C>`)::
from machine import Pin, I2C