#include <SPISettings.h>
◆ SPISettings() [1/2]
SPISettings::SPISettings |
( |
| ) |
|
|
inline |
◆ SPISettings() [2/2]
SPISettings::SPISettings |
( |
uint32_t |
speed, |
|
|
uint8_t |
byteOrder, |
|
|
uint8_t |
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. |
byteOrder | MSBFIRST or LSBFIRST |
dataMode | : SPI_MODE0, SPI_MODE1, SPI_MODE2, or SPI_MODE3 |
byteOrder's are:
MSBFIRST Data is sent out starting with Bit31 and down to Bit0
LSBFIRST Data is sent out starting with the lowest BYTE, from MSB to LSB.
0xABCDEFGH would be sent as 0xGHEFCDAB
Data modes are:
Mode Clock Polarity (CPOL) Clock Phase (CPHA)
SPI_MODE0 0 0
SPI_MODE1 0 1
SPI_MODE2 1 0
SPI_MODE3 1 1
◆ operator==()
◆ print()
void SPISettings::print |
( |
const char * |
s | ) |
|
|
inline |
◆ byteOrder
uint8_t SPISettings::byteOrder {MSBFIRST} |
◆ dataMode
◆ speed
The documentation for this class was generated from the following file: