setDataMode()

描述

设定 SPI Data 的模式:clock 极性及相位设定。详见 Wikipedia article on SPI

语法


SPI.setDataMode(mode)

参数

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

回传

See also

setBitOrder()
setClockDivider()


函式库参考主页面

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.