#include "distortos/devices/communication/SpiMasterTransfer.hpp"
SpiMasterTransfer class is a single transfer operation that can be executed by SPI master as part of a transaction.
◆ SpiMasterTransfer()
constexpr distortos::devices::SpiMasterTransfer::SpiMasterTransfer |
( |
const void *const |
writeBuffer, |
|
|
void *const |
readBuffer, |
|
|
const size_t |
size |
|
) |
| |
|
inline |
SpiMasterTransfer's constructor.
- Parameters
-
[in] | writeBuffer | is the buffer with data that will be written, nullptr to send dummy data |
[out] | readBuffer | is the buffer with data that will be read, nullptr to ignore received data |
[in] | size | is the size of transfer, bytes, must be even if number of data bits is in range (8; 16], divisible by 3 if number of data bits is in range (16; 24] or divisible by 4 if number of data bits is in range (24; 32] |
◆ getReadBuffer()
void* distortos::devices::SpiMasterTransfer::getReadBuffer |
( |
| ) |
const |
|
inline |
- Returns
- buffer with data that will be read, nullptr to ignore received data
◆ getSize()
size_t distortos::devices::SpiMasterTransfer::getSize |
( |
| ) |
const |
|
inline |
- Returns
- size of transfer (size of read and/or write buffers), bytes
◆ getWriteBuffer()
const void* distortos::devices::SpiMasterTransfer::getWriteBuffer |
( |
| ) |
const |
|
inline |
- Returns
- buffer with data that will be written, nullptr to send dummy data
◆ readBuffer_
void* distortos::devices::SpiMasterTransfer::readBuffer_ |
|
private |
buffer with data that will be read, nullptr to ignore received data
◆ size_
size_t distortos::devices::SpiMasterTransfer::size_ |
|
private |
◆ writeBuffer_
const void* distortos::devices::SpiMasterTransfer::writeBuffer_ |
|
private |
buffer with data that will be written, nullptr to send dummy data
The documentation for this class was generated from the following file: