ESPHome  2025.2.0
Public Member Functions | Protected Attributes
esphome::adc::Aggregator Class Reference

#include <adc_sensor.h>

Public Member Functions

void add_sample (uint32_t value)
 
uint32_t aggregate ()
 
 Aggregator (SamplingMode mode)
 

Protected Attributes

SamplingMode mode_ {SamplingMode::AVG}
 
uint32_t aggr_ {0}
 
uint32_t samples_ {0}
 

Detailed Description

Definition at line 34 of file adc_sensor.h.

Constructor & Destructor Documentation

◆ Aggregator()

esphome::adc::Aggregator::Aggregator ( SamplingMode  mode)

Definition at line 21 of file adc_sensor_common.cpp.

Member Function Documentation

◆ add_sample()

void esphome::adc::Aggregator::add_sample ( uint32_t  value)

Definition at line 29 of file adc_sensor_common.cpp.

◆ aggregate()

uint32_t esphome::adc::Aggregator::aggregate ( )

Definition at line 50 of file adc_sensor_common.cpp.

Field Documentation

◆ aggr_

uint32_t esphome::adc::Aggregator::aggr_ {0}
protected

Definition at line 42 of file adc_sensor.h.

◆ mode_

SamplingMode esphome::adc::Aggregator::mode_ {SamplingMode::AVG}
protected

Definition at line 41 of file adc_sensor.h.

◆ samples_

uint32_t esphome::adc::Aggregator::samples_ {0}
protected

Definition at line 43 of file adc_sensor.h.


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