#[non_exhaustive]pub enum Operation<'a> {
Read(&'a mut [u8]),
ReadWithWidth(&'a mut [u8], LineWidth),
Write(&'a [u8]),
WriteWithWidth(&'a [u8], LineWidth),
Transfer(&'a mut [u8], &'a [u8]),
TransferInPlace(&'a mut [u8]),
DelayNs(u32),
}
Expand description
SPI transaction operation.
This allows composition of SPI operations into a single bus transaction.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Read(&'a mut [u8])
Read data into the provided buffer.
ReadWithWidth(&'a mut [u8], LineWidth)
Read data into the provided buffer with the provided line width in half-duplex mode.
Write(&'a [u8])
Write data from the provided buffer, discarding read data.
WriteWithWidth(&'a [u8], LineWidth)
Write data from the provided buffer, using the provided line width in half-duplex mode, discarding read data.
Transfer(&'a mut [u8], &'a [u8])
Read data into the first buffer, while writing data from the second buffer.
TransferInPlace(&'a mut [u8])
Write data out while reading data into the provided buffer.
DelayNs(u32)
Delay for at least the specified number of nanoseconds.