56 Pcf8574(TwoWire& wire, uint8_t addr);
62 return last_read_cache_duration_;
67 last_read_cache_duration_ = duration;
74 bool read(uint8_t& data);
80 bool write(uint8_t data);
110 uint8_t last_written_;
117 roo_time::Uptime last_read_time_;
120 roo_time::Duration last_read_cache_duration_;
bool setState(BinaryLogicalState state) override
Updates the state of the switch. Returns true on success.
bool getState(BinaryLogicalState &result) const override
Quasi-bidirectional port usable as both input and output.
bool getState(BinaryLogicalState &result) const override
bool setState(BinaryLogicalState state) override
Updates the state of the switch. Returns true on success.
PCF8574 I2C-controlled 8-bit port extender.
bool write(uint8_t data)
Writes the levels of all ports.
bool writePort(uint8_t port, BinaryLogicalState state)
Writes the level of the specified port.
void setReadCacheDuration(roo_time::Duration duration)
Sets the maximum allowed staleness of cached reads.
uint8_t last_written() const
Returns the most recently written byte, or 0xFF if never written.
bool read(uint8_t &data)
Reads, caches, and returns levels of all ports.
BinaryLogicalState readPort(uint8_t port)
Reads the level of the specified port.
roo_time::Duration getReadCacheDuration() const
Returns the maximum allowed staleness of cached reads.
uint8_t last_read() const
Returns the most recently read byte, or 0xFF if never read.
BinaryLogicalState
Binary logical state used by selectors and switches.