#pragma once // Minimal standalone SPI.h stand-in - see Arduino.h in this same directory // for why this exists. Every byte transfer is logged with the DC pin's // current logical level (tracked by trace.h from digitalWrite() calls), // which is what lets the harness tell a command byte from a data byte // without any driver-specific knowledge. #include #include "../trace.h" class SPISettings { public: SPISettings() = default; SPISettings(uint32_t clock, uint8_t bit_order, uint8_t data_mode) { Trace::spi_settings(clock, bit_order, data_mode); } }; #define MSBFIRST 0 #define SPI_MODE0 0 class SPIClass { public: void begin() {} void end() {} void beginTransaction(SPISettings) {} void endTransaction() {} uint8_t transfer(uint8_t data) { return Trace::spi_transfer(data); } }; inline SPIClass SPI;