21 #ifndef PLUGINS_SPI_SPIDEVICE_H_
22 #define PLUGINS_SPI_SPIDEVICE_H_
28 #include "olad/Device.h"
29 #include "ola/io/SelectServer.h"
32 #include "plugins/spi/SPIBackend.h"
33 #include "plugins/spi/SPIWriter.h"
46 const string &spi_device,
49 string DeviceId()
const;
51 bool AllowMultiPortPatching()
const {
return true; }
58 typedef std::vector<class SPIOutputPort*> SPIPorts;
60 auto_ptr<SPIWriterInterface> m_writer;
61 auto_ptr<SPIBackendInterface> m_backend;
65 string m_spi_device_name;
68 string SPIBackendKey()
const;
69 string SPISpeedKey()
const;
70 string SPICEKey()
const;
71 string PortCountKey()
const;
72 string SyncPortKey()
const;
73 string GPIOPinKey()
const;
76 string PersonalityKey(uint8_t port)
const;
77 string PixelCountKey(uint8_t port)
const;
78 string StartAddressKey(uint8_t port)
const;
79 string GetPortKey(
const string &suffix, uint8_t port)
const;
86 static const char SPI_DEVICE_NAME[];
87 static const char HARDWARE_BACKEND[];
88 static const char SOFTWARE_BACKEND[];
89 static const uint8_t MAX_GPIO_PIN = 25;
94 #endif // PLUGINS_SPI_SPIDEVICE_H_