/* * Wire.h -- shim for host-side test builds. * * Intercepts #include so that code referencing Wire compiles * on x86_64. The mock Arduino state handles I2C through the HAL layer, * but if student code or libraries reference Wire directly, this * prevents a compile error. * * Generated by Anvil. */ #ifndef WIRE_H_MOCK_SHIM #define WIRE_H_MOCK_SHIM #include "mock_arduino.h" class MockWire { public: void begin() {} void begin(uint8_t) {} void beginTransmission(uint8_t) {} uint8_t endTransmission(bool sendStop = true) { (void)sendStop; return 0; } uint8_t requestFrom(uint8_t addr, uint8_t count, bool sendStop = true) { (void)addr; (void)count; (void)sendStop; return 0; } size_t write(uint8_t data) { (void)data; return 1; } size_t write(const uint8_t* data, size_t len) { (void)data; return len; } int available() { return 0; } int read() { return -1; } void setClock(uint32_t freq) { (void)freq; } }; extern MockWire Wire; #endif // WIRE_H_MOCK_SHIM