|
@@ -39,15 +39,24 @@ inline void delayMicroseconds(unsigned long us) {
|
|
|
// Mock digital I/O functions
|
|
// Mock digital I/O functions
|
|
|
inline void pinMode(int pin, int mode) {
|
|
inline void pinMode(int pin, int mode) {
|
|
|
// Mock implementation - do nothing
|
|
// Mock implementation - do nothing
|
|
|
|
|
+ if ( pin == mode ) return;
|
|
|
|
|
+ else return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
inline void digitalWrite(int pin, int value) {
|
|
inline void digitalWrite(int pin, int value) {
|
|
|
// Mock implementation - could log pin states if needed
|
|
// Mock implementation - could log pin states if needed
|
|
|
|
|
+ if ( pin == value ) return;
|
|
|
|
|
+ else return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
inline int digitalRead(int pin) {
|
|
inline int digitalRead(int pin) {
|
|
|
// Mock implementation - return LOW by default
|
|
// Mock implementation - return LOW by default
|
|
|
- return LOW;
|
|
|
|
|
|
|
+ if (pin == 0) return LOW;
|
|
|
|
|
+ else return HIGH;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+inline void yield() {
|
|
|
|
|
+ std::this_thread::yield();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// Global test output capture
|
|
// Global test output capture
|
|
@@ -84,4 +93,4 @@ inline bool waitForCondition(Condition condition, unsigned long timeout_ms) {
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-#endif // MOCK_ARDUINO_H
|
|
|
|
|
|
|
+#endif // MOCK_ARDUINO_H
|