template<SPIBitOrder BIT_ORDER, SPIClockPolarity CLOCK_POLARITY, SPIClockPhase CLOCK_PHASE, SPIDataRate DATA_RATE>
class esphome::spi::SPIDevice< BIT_ORDER, CLOCK_POLARITY, CLOCK_PHASE, DATA_RATE >
The SPIDevice is what components using the SPI will create.
- Template Parameters
-
BIT_ORDER | |
CLOCK_POLARITY | |
CLOCK_PHASE | |
DATA_RATE | |
Definition at line 410 of file spi.h.
template<SPIBitOrder BIT_ORDER, SPIClockPolarity CLOCK_POLARITY, SPIClockPhase CLOCK_PHASE, SPIDataRate DATA_RATE>
void esphome::spi::SPIDevice< BIT_ORDER, CLOCK_POLARITY, CLOCK_PHASE, DATA_RATE >::transfer_array |
( |
uint8_t * |
data, |
|
|
size_t |
length |
|
) |
| |
|
inline |
Write the array data, replace with received data.
- Parameters
-
Definition at line 466 of file spi.h.
template<SPIBitOrder BIT_ORDER, SPIClockPolarity CLOCK_POLARITY, SPIClockPhase CLOCK_PHASE, SPIDataRate DATA_RATE>
void esphome::spi::SPIDevice< BIT_ORDER, CLOCK_POLARITY, CLOCK_PHASE, DATA_RATE >::write |
( |
uint16_t |
data, |
|
|
size_t |
num_bits |
|
) |
| |
|
inline |
Write a single data item, up to 32 bits.
- Parameters
-
data | The data |
num_bits | The number of bits to write. The lower num_bits of data will be sent. |
Definition at line 442 of file spi.h.
template<SPIBitOrder BIT_ORDER, SPIClockPolarity CLOCK_POLARITY, SPIClockPhase CLOCK_PHASE, SPIDataRate DATA_RATE>
void esphome::spi::SPIDevice< BIT_ORDER, CLOCK_POLARITY, CLOCK_PHASE, DATA_RATE >::write_array16 |
( |
const uint16_t * |
data, |
|
|
size_t |
length |
|
) |
| |
|
inline |
Write an array of data as 16 bit values, byte-swapping if required.
Use of this should be avoided as it is horribly slow.
- Parameters
-
Definition at line 480 of file spi.h.