21 #ifndef PLUGINS_SPI_FAKESPIWRITER_H_
22 #define PLUGINS_SPI_FAKESPIWRITER_H_
24 #include <ola/testing/TestUtils.h>
25 #include <ola/thread/Mutex.h>
28 #include "plugins/spi/SPIWriter.h"
40 : m_device_path(device_path),
51 bool Init() {
return true; }
53 std::string DevicePath()
const {
return m_device_path; }
55 bool WriteSPIData(
const uint8_t *data,
unsigned int length);
64 unsigned int WriteCount()
const;
65 unsigned int LastWriteSize()
const;
66 void CheckDataMatches(
const ola::testing::SourceLine &source_line,
71 const std::string m_device_path;
73 unsigned int m_writes;
74 unsigned int m_last_write_size;
85 #endif // PLUGINS_SPI_FAKESPIWRITER_H_