33template<
typename T, u
int16_t N>
void enable_loop()
Enable this component's loop.
Base for expanders that cache reads per loop. With an interrupt pin the cache stays valid until INT f...
void setup_interrupt_pin_()
Call at the end of setup().
A class to cache the read state of a GPIO expander.
void reset_pin_cache_()
Invalidate cache. This function should be called in component loop().
void set_invalidate_on_read_(bool invalidate)
Control whether digital_read() invalidates the pin's cache entry after reading.
Component side of a cached GPIO expander with an optional active-low INT line.
InternalGPIOPin * interrupt_pin_
bool attach_interrupt_pin_()
Attach the falling-edge ISR when there is an interrupt pin, then disable the loop until an input need...
void set_interrupt_pin(InternalGPIOPin *pin)
void disable_loop_when_released_()
The loop runs again after the INT line falls; stop it once the line is released (HIGH).
float get_setup_priority() const override
void enable_polling_loop_()
Call from pin_mode() for an input pin: without an interrupt pin the loop polls instead.
constexpr float IO
For components that represent GPIO pins like PCF8573.