12 #include <linux/spi/spidev.h> 17 namespace duds {
namespace hardware {
namespace interface {
namespace linux {
67 const std::uint8_t * __restrict__ out,
68 std::uint8_t * __restrict__ in,
84 const std::string &path,
115 const std::string &path,
A synchronous serial implementation using the SPI userspace interface provided by the Linux kernel...
virtual void transfer(const std::uint8_t *__restrict__ out, std::uint8_t *__restrict__ in, duds::general::Bits bits)
Moves data about.
virtual void close()
Transitions the object from the open (MssOpen) to the ready (MssReady) state.
void setClockFrequency(unsigned int freq)
Changes the maximum clock frequency.
SpiMasterSyncSerial()
Creates the object without a SPI device to use.
static constexpr Flags MssSpiMode0
Flags for SPI mode 0.
spi_ioc_transfer xfer
Data for telling the kernel what to send and receive.
An abstraction for the master side of a simple synchronous serial communication connection to some de...
virtual void stop()
Denotes the end of a conversation; transitions from the communicating state to the open state...
A class to assist with specifiying the sizes of data with scaling units, much like std::chrono::durat...
int spifd
The file descriptor for SPI access.
virtual void open()
Transitions the object from the ready (MssReady) to the open (MssOpen) state.
void setClockPeriod(unsigned int nanos)
Changes the minimum clock period.
Flags flags
Configuration flags.
virtual void start()
Denotes the start of a conversation; transitions from the open state to the communicating state...