@@ -165,14 +165,14 @@ Use the ``machine.ADC`` class::
165165SPI bus
166166-------
167167
168- The SPI driver is implemented in software and works on all pins::
168+ There are two SPI drivers. One is implemented in software and works on all pins::
169169
170170 from machine import Pin, SPI
171171
172172 # construct an SPI bus on the given pins
173173 # polarity is the idle state of SCK
174174 # phase=0 means sample on the first edge of SCK, phase=1 means the second
175- spi = SPI(baudrate=100000, polarity=1, phase=0, sck=Pin(0), mosi=Pin(2), miso=Pin(4))
175+ spi = SPI(-1, baudrate=100000, polarity=1, phase=0, sck=Pin(0), mosi=Pin(2), miso=Pin(4))
176176
177177 spi.init(baudrate=200000) # set the baudrate
178178
@@ -194,13 +194,13 @@ Hardware SPI
194194------------
195195
196196The hardware SPI is faster (up to 80Mhz), but only works on following pins:
197- ``MISO `` is gpio2 , ``MOSI `` is gpio13, and ``SCK `` is gpio14. It has the same
197+ ``MISO `` is gpio12 , ``MOSI `` is gpio13, and ``SCK `` is gpio14. It has the same
198198methods as SPI, except for the pin parameters for the constructor and init
199199(as those are fixed).
200200
201- from machine import Pin, HSPI
201+ from machine import Pin, SPI
202202
203- hspi = HSPI( baudrate=800000000 , polarity=0, phase=0)
203+ hspi = SPI(0, baudrate=80000000 , polarity=0, phase=0)
204204
205205
206206I2C bus
0 commit comments