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"
45 const std::string &spi_device,
48 std::string DeviceId()
const;
50 bool AllowMultiPortPatching()
const {
return true; }
57 typedef std::vector<class SPIOutputPort*> SPIPorts;
59 std::auto_ptr<SPIWriterInterface> m_writer;
60 std::auto_ptr<SPIBackendInterface> m_backend;
64 std::string m_spi_device_name;
67 std::string SPIBackendKey()
const;
68 std::string SPISpeedKey()
const;
69 std::string SPICEKey()
const;
70 std::string PortCountKey()
const;
71 std::string SyncPortKey()
const;
72 std::string GPIOPinKey()
const;
75 std::string DeviceLabelKey(uint8_t port)
const;
76 std::string PersonalityKey(uint8_t port)
const;
77 std::string PixelCountKey(uint8_t port)
const;
78 std::string StartAddressKey(uint8_t port)
const;
79 std::string GetPortKey(
const std::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_