29 auto write(
bool level) ->
void {
38 [[nodiscard]]
auto last_level() const ->
bool {
return last_level_; }
44 [[nodiscard]]
auto write_count() const -> std::
size_t {
return write_count_; }
55 bool last_level_ =
false;
56 std::size_t write_count_ = 0;
59static_assert(DigitalOutput<MockOutputPin>,
"MockOutputPin must satisfy DigitalOutput concept");
90 auto set_level(
bool level) ->
void { level_ = level; }
96 [[nodiscard]]
auto read_count() const -> std::
size_t {
return read_count_; }
108 std::size_t read_count_ = 0;
111static_assert(DigitalInput<MockInputPin>,
"MockInputPin must satisfy DigitalInput concept");
Definition mock_pin.hpp:22
auto write_count() const -> std::size_t
Get total number of write operations.
Definition mock_pin.hpp:44
auto last_level() const -> bool
Get the last written logic level.
Definition mock_pin.hpp:38
auto reset() -> void
Reset pin state for new test.
Definition mock_pin.hpp:49
auto write(bool level) -> void
Write logic level to pin (records operation).
Definition mock_pin.hpp:29
GPIO pin concepts for hardware abstraction.