From b4df3e74e15ac1658c125b13bbaca5203bab5505 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sun, 4 Sep 2016 23:31:05 +0300 Subject: [PATCH] docs/esp8266/quickref: Further improvements for SPI subsections. Consistency and formatting. --- docs/esp8266/quickref.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/esp8266/quickref.rst b/docs/esp8266/quickref.rst index ae7a8f724f..d06fe5a6f1 100644 --- a/docs/esp8266/quickref.rst +++ b/docs/esp8266/quickref.rst @@ -162,8 +162,8 @@ Use the ``machine.ADC`` class:: adc = ADC(0) # create ADC object on ADC pin adc.read() # read value, 0-1024 -SPI bus -------- +Software SPI bus +---------------- There are two SPI drivers. One is implemented in software (bit-banging) and works on all pins:: @@ -191,19 +191,19 @@ and works on all pins:: spi.write_readinto(buf, buf) # write buf to MOSI and read MISO back into buf -Hardware SPI ------------- +Hardware SPI bus +---------------- The hardware SPI is faster (up to 80Mhz), but only works on following pins: ``MISO`` is GPIO12, ``MOSI`` is GPIO13, and ``SCK`` is GPIO14. It has the same -methods as SPI, except for the pin parameters for the constructor and init -(as those are fixed). +methods as the bitbanging SPI class above, except for the pin parameters for the +constructor and init (as those are fixed):: from machine import Pin, SPI hspi = SPI(1, baudrate=80000000, polarity=0, phase=0) -(SPI(0) is used for FlashROM and not available to users.) +(``SPI(0)`` is used for FlashROM and not available to users.) I2C bus -------