8namespace gpio_expander {
A class to cache the read state of a GPIO expander.
virtual void digital_write_hw(T pin, bool value)=0
Call component low level function to write GPIO state to device.
const uint8_t cache_byte_size_
std::array< bool, N/(sizeof(T) *BITS_PER_BYTE)> read_cache_invalidated_
virtual bool digital_read_cache(T pin)=0
Call component read function from internal cache.
static const uint8_t BITS_PER_BYTE
void digital_write(T pin, bool value)
void reset_pin_cache_()
Invalidate cache. This function should be called in component loop().
virtual bool digital_read_hw(T pin)=0
Call component low level function to read GPIO state from device.
Providing packet encoding functions for exchanging data with a remote host.