-
Notifications
You must be signed in to change notification settings - Fork 344
spi
Boris Lovosevic edited this page Mar 3, 2018
·
8 revisions
This class includes full support for using ESP32 SPI peripheral in master mode
Argument | Description |
---|---|
spihost |
The hardware SPI host; machine-SPI-HSPI (1) or machine.SPI.VSPI (2) can be usedDefault: 1
|
baudrate |
SPI clock speed in Hz; Default: 1000000 |
polarity |
SPI polarity; 0 or `1; Default: 0 |
phase |
SPI phase; 0 or 1; Default: 0<br>polarity & phase defines the SPI operating mode: mode = (polarity<<1) + phase` |
firstbit |
Send MSB or LSB bit first; default: MSB use constants machine.SPI.MSB or machine.SPI.LSB
|
sck |
SPI SCK pin; Can be entered as integer pin number or machine.Pin object |
moosi |
SPI MISI pin; Can be entered as integer pin number or machine.Pin object |
miso |
SPI MISO pin; Can be entered as integer pin number or machine.Pin object |
cs |
Optional; SPI CS pin; Can be entered as integer pin number or machine.Pin object. If set, CS activation and deactivation is handled by the driver, if not set, SPI select and deselect must be handled by user |
Only sck
, mosi
and miso
are required, all the other arguments are optional and will be set to the default values if not given.