ESPHome  2021.11.3
Public Member Functions | Static Public Member Functions | Data Fields
esphome::pulse_counter::PulseCounterStorage Struct Reference

#include <pulse_counter_sensor.h>

Public Member Functions

bool pulse_counter_setup (InternalGPIOPin *pin)
 
pulse_counter_t read_raw_value ()
 

Static Public Member Functions

static void gpio_intr (PulseCounterStorage *arg)
 

Data Fields

volatile pulse_counter_t counter {0}
 
volatile uint32_t last_pulse {0}
 
InternalGPIOPinpin
 
pcnt_unit_t pcnt_unit
 
ISRInternalGPIOPin isr_pin
 
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 27 of file pulse_counter_sensor.h.

Member Function Documentation

◆ gpio_intr()

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

Definition at line 12 of file pulse_counter_sensor.cpp.

◆ pulse_counter_setup()

bool esphome::pulse_counter::PulseCounterStorage::pulse_counter_setup ( InternalGPIOPin pin)

Definition at line 31 of file pulse_counter_sensor.cpp.

◆ read_raw_value()

pulse_counter_t esphome::pulse_counter::PulseCounterStorage::read_raw_value ( )

Definition at line 38 of file pulse_counter_sensor.cpp.

Field Documentation

◆ counter

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

Definition at line 34 of file pulse_counter_sensor.h.

◆ falling_edge_mode

PulseCounterCountMode esphome::pulse_counter::PulseCounterStorage::falling_edge_mode {PULSE_COUNTER_DISABLE}

Definition at line 46 of file pulse_counter_sensor.h.

◆ filter_us

uint32_t esphome::pulse_counter::PulseCounterStorage::filter_us {0}

Definition at line 47 of file pulse_counter_sensor.h.

◆ isr_pin

ISRInternalGPIOPin esphome::pulse_counter::PulseCounterStorage::isr_pin

Definition at line 43 of file pulse_counter_sensor.h.

◆ last_pulse

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

Definition at line 35 of file pulse_counter_sensor.h.

◆ last_value

pulse_counter_t esphome::pulse_counter::PulseCounterStorage::last_value {0}

Definition at line 48 of file pulse_counter_sensor.h.

◆ pcnt_unit

pcnt_unit_t esphome::pulse_counter::PulseCounterStorage::pcnt_unit

Definition at line 40 of file pulse_counter_sensor.h.

◆ pin

InternalGPIOPin* esphome::pulse_counter::PulseCounterStorage::pin

Definition at line 38 of file pulse_counter_sensor.h.

◆ rising_edge_mode

PulseCounterCountMode esphome::pulse_counter::PulseCounterStorage::rising_edge_mode {PULSE_COUNTER_INCREMENT}

Definition at line 45 of file pulse_counter_sensor.h.


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