Contain general payload transfer API for an SPI device.
More...
#include <fastarduino/spi.h>
|
| AbstractSPIDevice (const AbstractSPIDevice &)=delete |
|
AbstractSPIDevice & | operator= (const AbstractSPIDevice &)=delete |
|
uint8_t | transfer (uint8_t data) |
| Transfer one byte to the currently selected SPI slave device through MOSI pin, and get the byte returned by the device through MISO pin. More...
|
|
void | transfer (uint8_t *data, uint16_t size) |
| Transfer an array of payload data to the currently selected SPI slave device through MOSI pin, and get all data bytes simultaneously received from that device through MISO pin. More...
|
|
void | transfer (const uint8_t *data, uint16_t size) |
| Transfer an array of payload data to the currently selected SPI slave device through MOSI pin; any data bytes simultaneously received from that device through MISO pin are lost. More...
|
|
void | transfer (uint8_t *data, uint16_t size, uint8_t sent) |
| Transfer the provided byte sent several times to the currently selected SPI slave device through MOSI pin, and get all data bytes simultaneously received from that device through MISO pin. More...
|
|
void | transfer (uint16_t size, uint8_t sent) |
| Transfer the provided byte sent several times to the currently selected SPI slave device through MOSI pin; any data bytes simultaneously received from that device through MISO pin are lost. More...
|
|
Contain general payload transfer API for an SPI device.
This is not supposed to be used directly, as it does not include start/end transfer methods. SPI device implementers shall use SPIDevice
template class instead.
- See also
- SPIDevice
Definition at line 152 of file spi.h.
◆ transfer() [1/5]
uint8_t spi::AbstractSPIDevice::transfer |
( |
uint8_t |
data | ) |
|
|
inlineprotected |
◆ transfer() [2/5]
void spi::AbstractSPIDevice::transfer |
( |
uint8_t * |
data, |
|
|
uint16_t |
size |
|
) |
| |
|
inlineprotected |
◆ transfer() [3/5]
void spi::AbstractSPIDevice::transfer |
( |
const uint8_t * |
data, |
|
|
uint16_t |
size |
|
) |
| |
|
inlineprotected |
◆ transfer() [4/5]
void spi::AbstractSPIDevice::transfer |
( |
uint8_t * |
data, |
|
|
uint16_t |
size, |
|
|
uint8_t |
sent |
|
) |
| |
|
inlineprotected |
Transfer the provided byte sent
several times to the currently selected SPI slave device through MOSI pin, and get all data bytes simultaneously received from that device through MISO pin.
This method is useful when you have requested information from the slave device and then you must always send the same byte to receive all requested information: with this method, you do not need to initialize data
with sent
size
times.
- Parameters
-
data | placeholder for the payload returned by the slave whilst transmitting size times the sent byte |
size | the number of times to transmit sent byte to the SPI slave |
sent | the data byte to transmit several times |
- See also
- transfer(uint8_t)
-
transfer(uint8_t*, uint16_t)
-
transfer(uint16_t, uint8_t)
Definition at line 248 of file spi.h.
◆ transfer() [5/5]
void spi::AbstractSPIDevice::transfer |
( |
uint16_t |
size, |
|
|
uint8_t |
sent |
|
) |
| |
|
inlineprotected |
The documentation for this class was generated from the following file: