4 #include <linux/spi/spidev.h> 7 #include <leddevice/LedDevice.h> 25 virtual bool init(
const QJsonObject &deviceConfig);
49 int writeBytes(
const unsigned size,
const uint8_t *data);
QString _deviceName
The name of the output device.
Definition: ProviderSpi.h:52
virtual ~ProviderSpi()
Destructor of the LedDevice; closes the output device if it is open.
Definition: ProviderSpi.cpp:29
int _baudRate_Hz
The used baudrate of the output device.
Definition: ProviderSpi.h:55
bool _spiDataInvert
1=>invert the data pattern
Definition: ProviderSpi.h:64
Interface (pure virtual base class) for LedDevices.
Definition: LedDevice.h:32
int _spiMode
which spi clock mode do we use? (0..3)
Definition: ProviderSpi.h:61
int open()
Opens and configures the output device.
Definition: ProviderSpi.cpp:46
ProviderSpi()
Constructs specific LedDevice.
Definition: ProviderSpi.cpp:17
spi_ioc_transfer _spi
The transfer structure for writing to the spi-device.
Definition: ProviderSpi.h:67
int _fid
The File Identifier of the opened output device (or -1 if not opened)
Definition: ProviderSpi.h:58
int writeBytes(const unsigned size, const uint8_t *data)
Writes the given bytes/bits to the SPI-device and sleeps the latch time to ensure that the values are...
Definition: ProviderSpi.cpp:79
The ProviderSpi implements an abstract base-class for LedDevices using the SPI-device.
Definition: ProviderSpi.h:12
virtual bool init(const QJsonObject &deviceConfig)
Sets configuration.
Definition: ProviderSpi.cpp:34