#include <SPISettings.h>
◆ SPISettings() [1/3]
SPISettings::SPISettings |
( |
| ) |
|
|
inline |
◆ SPISettings() [2/3]
SPISettings::SPISettings |
( |
uint32_t |
speed, |
|
|
uint8_t |
bitOrder, |
|
|
SpiMode |
dataMode |
|
) |
| |
|
inline |
constructor for SPISettings
Settings are applied to SPI::beginTransaction(SPISettings) and are valid until next beginTransaction()
- Parameters
-
speed | The maximum speed of communication. For a SPI chip rated up to sys clock speed. For 20 MHz, use 20000000. |
bitOrder | MSBFIRST or LSBFIRST Determines how bits within each byte are sent on the wire. Data is always sent LSB first (matches system endianness) |
dataMode | : 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
|
◆ SPISettings() [3/3]
SPISettings::SPISettings |
( |
uint32_t |
speed, |
|
|
uint8_t |
bitOrder, |
|
|
uint8_t |
dataMode |
|
) |
| |
|
inline |
◆ getModeNum()
Get number 0-3 corresponding to an SpiMode setting.
- Parameters
-
mode | Can be SpiMode or a number 0-3 |
◆ operator==()
◆ print()
void SPISettings::print |
( |
const char * |
s | ) |
|
|
inline |
◆ bitOrder
◆ dataMode
◆ speed
The documentation for this class was generated from the following file: