ESPHome  2024.11.0
Public Member Functions | Static Public Member Functions | Data Fields
esphome::pulse_counter::BasicPulseCounterStorage Struct Reference

#include <pulse_counter_sensor.h>

Inheritance diagram for esphome::pulse_counter::BasicPulseCounterStorage:
esphome::pulse_counter::PulseCounterStorageBase

Public Member Functions

bool pulse_counter_setup (InternalGPIOPin *pin) override
 
pulse_counter_t read_raw_value () override
 

Static Public Member Functions

static void gpio_intr (BasicPulseCounterStorage *arg)
 

Data Fields

volatile pulse_counter_t counter {0}
 
volatile uint32_t last_pulse {0}
 
ISRInternalGPIOPin isr_pin
 
- Data Fields inherited from esphome::pulse_counter::PulseCounterStorageBase
InternalGPIOPinpin
 
PulseCounterCountMode rising_edge_mode {PULSE_COUNTER_INCREMENT}
 
PulseCounterCountMode falling_edge_mode {PULSE_COUNTER_DISABLE}
 
uint32_t filter_us {0}
 
pulse_counter_t last_value {0}
 

Detailed Description

Definition at line 40 of file pulse_counter_sensor.h.

Member Function Documentation

◆ gpio_intr()

void IRAM_ATTR esphome::pulse_counter::BasicPulseCounterStorage::gpio_intr ( BasicPulseCounterStorage arg)
static

Definition at line 20 of file pulse_counter_sensor.cpp.

◆ pulse_counter_setup()

bool esphome::pulse_counter::BasicPulseCounterStorage::pulse_counter_setup ( InternalGPIOPin pin)
overridevirtual

◆ read_raw_value()

pulse_counter_t esphome::pulse_counter::BasicPulseCounterStorage::read_raw_value ( )
overridevirtual

Field Documentation

◆ counter

volatile pulse_counter_t esphome::pulse_counter::BasicPulseCounterStorage::counter {0}

Definition at line 46 of file pulse_counter_sensor.h.

◆ isr_pin

ISRInternalGPIOPin esphome::pulse_counter::BasicPulseCounterStorage::isr_pin

Definition at line 49 of file pulse_counter_sensor.h.

◆ last_pulse

volatile uint32_t esphome::pulse_counter::BasicPulseCounterStorage::last_pulse {0}

Definition at line 47 of file pulse_counter_sensor.h.


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