idfxx 1.0.0
Modern C++23 components for ESP-IDF
Loading...
Searching...
No Matches
idfxx::adc::divider_ratio Struct Reference

External voltage-divider ratio between a source and an ADC pin. More...

Public Member Functions

constexpr bool operator== (const divider_ratio &) const noexcept=default
 Compares two divider ratios for equality.
 

Public Attributes

int num = 1
 Ratio numerator (source = pin × num / den); must be positive.
 
int den = 1
 Ratio denominator; must be positive.
 

Detailed Description

External voltage-divider ratio between a source and an ADC pin.

Describes a resistive divider on the board: the source voltage is the pin voltage multiplied by num / den. The default 1:1 means the pin is connected directly to the source.

Definition at line 72 of file adc.hpp.

Member Function Documentation

◆ operator==()

constexpr bool idfxx::adc::divider_ratio::operator== ( const divider_ratio ) const
constexprdefaultnoexcept

Compares two divider ratios for equality.

Member Data Documentation

◆ den

int idfxx::adc::divider_ratio::den = 1

Ratio denominator; must be positive.

Definition at line 74 of file adc.hpp.

◆ num

int idfxx::adc::divider_ratio::num = 1

Ratio numerator (source = pin × num / den); must be positive.

Definition at line 73 of file adc.hpp.


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