I wanted to try SPI on my ESP32 Devkit. I was reading the SPI class https://docs.zerynth.com/latest/official/core.zerynth.stdlib/docs/official_core.zerynth.stdlib_spi.html
Its confusing to me.
class Spi(nss, drvname=SPI0, clock=12000000, bits=SPI_8_BITS, mode=SPI_MODE_LOW_FIRST)
Yet, does not mention what "nss" is.
It also says "Spi is initialized by passing the driver name drvname
, in the form of SPI0, SPI1, etc... "
yet the examples show:
s0 = spi.Spi(D0)
when I tried just adding this it compiled ok (which makes no sense, because D1 is not one of the specified parameters) .
s1 = spi.Spi(D1,clock=8000000)
Yet from the docs I should be able to do this, but yet I get an error ([error] Can't find name [SPI_MODE_LOW_FIRST] ).
s1 = spi.Spi(D1,clock=8000000,mode=SPI_MODE_LOW_FIRST)
Am I doing something wrong, or is it just messed up ?