ESPHome  2024.4.0
Public Member Functions | Static Public Member Functions | Protected Attributes
esphome::pulse_width::PulseWidthSensorStore Class Reference

Store data in a class that doesn't use multiple-inheritance (vtables in flash) More...

#include <pulse_width.h>

Public Member Functions

void setup (InternalGPIOPin *pin)
uint32_t get_pulse_width_us () const
float get_pulse_width_s () const
uint32_t get_last_rise () const

Static Public Member Functions

static void gpio_intr (PulseWidthSensorStore *arg)

Protected Attributes

ISRInternalGPIOPin pin_
volatile uint32_t last_width_ {0}
volatile uint32_t last_rise_ {0}

Detailed Description

Store data in a class that doesn't use multiple-inheritance (vtables in flash)

Definition at line 11 of file pulse_width.h.

Member Function Documentation

◆ get_last_rise()

uint32_t esphome::pulse_width::PulseWidthSensorStore::get_last_rise ( ) const

Definition at line 22 of file pulse_width.h.

◆ get_pulse_width_s()

float esphome::pulse_width::PulseWidthSensorStore::get_pulse_width_s ( ) const

Definition at line 21 of file pulse_width.h.

◆ get_pulse_width_us()

uint32_t esphome::pulse_width::PulseWidthSensorStore::get_pulse_width_us ( ) const

Definition at line 20 of file pulse_width.h.

◆ gpio_intr()

void IRAM_ATTR esphome::pulse_width::PulseWidthSensorStore::gpio_intr ( PulseWidthSensorStore arg)

Definition at line 9 of file pulse_width.cpp.

◆ setup()

void esphome::pulse_width::PulseWidthSensorStore::setup ( InternalGPIOPin pin)

Definition at line 13 of file pulse_width.h.

Field Documentation

◆ last_rise_

volatile uint32_t esphome::pulse_width::PulseWidthSensorStore::last_rise_ {0}

Definition at line 27 of file pulse_width.h.

◆ last_width_

volatile uint32_t esphome::pulse_width::PulseWidthSensorStore::last_width_ {0}

Definition at line 26 of file pulse_width.h.

◆ pin_

ISRInternalGPIOPin esphome::pulse_width::PulseWidthSensorStore::pin_

Definition at line 25 of file pulse_width.h.

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