[SPI]
Description
Sets the SPI data mode: that is, clock polarity and phase. See the Wikipedia article on SPI for details.
Syntax
SPI.setDataMode(mode)
Parameters
mode
: SPI_MODE0
, SPI_MODE1
, SPI_MODE2
, or SPI_MODE3
.
mode | Clock Polarity (CPOL) | Clock Phase (CPHA) |
SPI_MODE0 | 0 | 0 |
SPI_MODE1 | 0 | 1 |
SPI_MODE2 | 1 | 0 |
SPI_MODE3 | 1 | 1 |
Returns
None
See also
Libraries Reference Home
The text of the 86Duino reference is a modification of the Arduino reference and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.