ESPHome  2024.12.2
Public Member Functions | Protected Member Functions | Protected Attributes
esphome::gpio_expander::CachedGpioExpander< T, N > Class Template Referenceabstract

A class to cache the read state of a GPIO expander. More...

#include <cached_gpio.h>

Public Member Functions

bool digital_read (T pin)
 
void digital_write (T pin, bool value)
 

Protected Member Functions

virtual bool digital_read_hw (T pin)=0
 
virtual bool digital_read_cache (T pin)=0
 
virtual void digital_write_hw (T pin, bool value)=0
 
void reset_pin_cache_ ()
 

Protected Attributes

std::array< bool, N > read_cache_invalidated_ {}
 

Detailed Description

template<typename T, T N>
class esphome::gpio_expander::CachedGpioExpander< T, N >

A class to cache the read state of a GPIO expander.

Definition at line 11 of file cached_gpio.h.

Member Function Documentation

◆ digital_read()

template<typename T, T N>
bool esphome::gpio_expander::CachedGpioExpander< T, N >::digital_read ( pin)
inline

Definition at line 13 of file cached_gpio.h.

◆ digital_read_cache()

template<typename T, T N>
virtual bool esphome::gpio_expander::CachedGpioExpander< T, N >::digital_read_cache ( pin)
protectedpure virtual

◆ digital_read_hw()

template<typename T, T N>
virtual bool esphome::gpio_expander::CachedGpioExpander< T, N >::digital_read_hw ( pin)
protectedpure virtual

◆ digital_write()

template<typename T, T N>
void esphome::gpio_expander::CachedGpioExpander< T, N >::digital_write ( pin,
bool  value 
)
inline

Definition at line 21 of file cached_gpio.h.

◆ digital_write_hw()

template<typename T, T N>
virtual void esphome::gpio_expander::CachedGpioExpander< T, N >::digital_write_hw ( pin,
bool  value 
)
protectedpure virtual

◆ reset_pin_cache_()

template<typename T, T N>
void esphome::gpio_expander::CachedGpioExpander< T, N >::reset_pin_cache_ ( )
inlineprotected

Definition at line 28 of file cached_gpio.h.

Field Documentation

◆ read_cache_invalidated_

template<typename T, T N>
std::array<bool, N> esphome::gpio_expander::CachedGpioExpander< T, N >::read_cache_invalidated_ {}
protected

Definition at line 34 of file cached_gpio.h.


The documentation for this class was generated from the following file: