MCPcopy Index your code
hub / github.com/endbasic/endbasic / inject_read

Method inject_read

std/src/gpio/fakes.rs:100–102  ·  view source on GitHub ↗

Pre-seeds a future `read(pin)` call to return `high`.

(&mut self, pin: Pin, high: bool)

Source from the content-addressed store, hash-verified

98impl MockPins {
99 /// Pre-seeds a future `read(pin)` call to return `high`.
100 pub fn inject_read(&mut self, pin: Pin, high: bool) {
101 self.reads.push_back((pin, high));
102 }
103
104 /// Returns the ordered trace of all GPIO operations performed so far.
105 pub fn trace(&self) -> &[i32] {

Callers 2

execMethod · 0.80
make_mock_machineFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected