diff options
author | Radomir Dopieralski <openstack@sheep.art.pl> | 2016-06-07 21:40:56 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-08-19 21:19:59 +0300 |
commit | 8e7dfea803f618beaa2ad976dff0b196e449d5d9 (patch) | |
tree | 93eb8f7dfed421dec4cfc4c187ab0d5fea55522a /docs/esp8266 | |
parent | 49dd532180282f24ad31daf7f4f661722d4f9b16 (diff) | |
download | micropython-8e7dfea803f618beaa2ad976dff0b196e449d5d9.tar.gz micropython-8e7dfea803f618beaa2ad976dff0b196e449d5d9.zip |
esp8266/modpybhspi: Add a HSPI module for hardware SPI support
This module uses ESP8266's SPI hardware, which allows much higher
speeds. It uses a library from
https://github.com/MetalPhreak/ESP8266_SPI_Driver
Diffstat (limited to 'docs/esp8266')
-rw-r--r-- | docs/esp8266/quickref.rst | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/esp8266/quickref.rst b/docs/esp8266/quickref.rst index 48543dfab6..be58f9332c 100644 --- a/docs/esp8266/quickref.rst +++ b/docs/esp8266/quickref.rst @@ -189,6 +189,20 @@ The SPI driver is implemented in software and works on all pins:: spi.write_readinto(b'1234', buf) # write to MOSI and read from MISO into the buffer spi.write_readinto(buf, buf) # write buf to MOSI and read MISO back into buf + +Hardware SPI +------------ + +The hardware SPI is faster (up to 80Mhz), but only works on following pins: +``MISO`` is gpio2, ``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). + + from machine import Pin, HSPI + + hspi = HSPI(baudrate=800000000, polarity=0, phase=0) + + I2C bus ------- |