8 namespace pulse_width {
33 void setup()
override { this->store_.setup(this->
pin_); }
34 void dump_config()
override;
36 void update()
override;
const float DATA
For components that import data from directly connected sensors like DHT.
void setup(InternalGPIOPin *pin)
Copy of GPIOPin that is safe to use from ISRs (with no virtual functions)
volatile uint32_t last_rise_
volatile uint32_t last_width_
This class simplifies creating components that periodically check a state.
void set_pin(InternalGPIOPin *pin)
uint32_t IRAM_ATTR HOT micros()
float get_setup_priority() const override
Store data in a class that doesn't use multiple-inheritance (vtables in flash)
float get_pulse_width_s() const
uint32_t get_pulse_width_us() const
virtual ISRInternalGPIOPin to_isr() const =0
Implementation of SPI Controller mode.
Base-class for all sensors.
PulseWidthSensorStore store_
void attach_interrupt(void(*func)(T *), T *arg, gpio::InterruptType type) const
uint32_t get_last_rise() const
static void gpio_intr(PulseWidthSensorStore *arg)