14#ifndef NTC_THERMISTOR_KCONFIG_HPP
15#define NTC_THERMISTOR_KCONFIG_HPP
18#if __has_include("sdkconfig.h")
26#ifndef CONFIG_NTC_THERMISTOR_ADC_CHANNEL
28#define CONFIG_NTC_THERMISTOR_ADC_CHANNEL 0
30#ifndef CONFIG_NTC_THERMISTOR_ADC_BITS
32#define CONFIG_NTC_THERMISTOR_ADC_BITS 12
34#ifndef CONFIG_NTC_THERMISTOR_SERIES_OHM
36#define CONFIG_NTC_THERMISTOR_SERIES_OHM 10000
38#ifndef CONFIG_NTC_THERMISTOR_SAMPLES
40#define CONFIG_NTC_THERMISTOR_SAMPLES 1
48[[nodiscard]]
constexpr Curve KconfigCurve()
noexcept {
49#ifdef CONFIG_NTC_THERMISTOR_CURVE_TDK_NTCG163JF103FT1S
51#elif defined(CONFIG_NTC_THERMISTOR_CURVE_GENERIC_B3950)
53#elif defined(CONFIG_NTC_THERMISTOR_CURVE_R25_B)
55 c.
r0_ohm =
static_cast<uint32_t
>(CONFIG_NTC_THERMISTOR_R25_OHM);
56 c.b_kelvin =
static_cast<uint32_t
>(CONFIG_NTC_THERMISTOR_B_KELVIN);
73 c.
curve = detail::KconfigCurve();
78#ifdef CONFIG_NTC_THERMISTOR_HIGH_SIDE
81#if defined(CONFIG_NTC_THERMISTOR_MIN_TEMPERATURE_C) && \
82 defined(CONFIG_NTC_THERMISTOR_MAX_TEMPERATURE_C)
83 c.min_temperature_mc =
static_cast<int32_t
>(CONFIG_NTC_THERMISTOR_MIN_TEMPERATURE_C) * 1000;
84 c.max_temperature_mc =
static_cast<int32_t
>(CONFIG_NTC_THERMISTOR_MAX_TEMPERATURE_C) * 1000;
constexpr Curve kGeneric10kB3950
The common 10 kOhm / B 3950 class (B25/50), beta mode: typical values of probes and beads,...
Definition ntc_thermistor_presets.hpp:108
constexpr Curve kTdkNtcg163jf103ft1s
TDK NTCG163JF103FT1S: R25 10 kOhm +-1 %, B25/85 3435 K +-1 %, table mode. R25, B and both tolerances ...
Definition ntc_thermistor_presets.hpp:93
The NTC thermistor driver: everything it declares lives here; internals in detail.
Definition ntc_thermistor.hpp:25
constexpr Config KconfigDefaults() noexcept
The configuration menuconfig selected.
Definition ntc_thermistor_kconfig.hpp:71
#define CONFIG_NTC_THERMISTOR_SERIES_OHM
Definition ntc_thermistor_kconfig.hpp:36
#define CONFIG_NTC_THERMISTOR_ADC_BITS
Definition ntc_thermistor_kconfig.hpp:32
#define CONFIG_NTC_THERMISTOR_ADC_CHANNEL
Definition ntc_thermistor_kconfig.hpp:28
#define CONFIG_NTC_THERMISTOR_SAMPLES
Definition ntc_thermistor_kconfig.hpp:40
Example curves as data. The driver includes this header nowhere: a preset is a convenience,...
Public types of the NTC thermistor driver: errors, Result<T>, the curve and the configuration,...
Everything one thermistor and its divider need. There is no default part: a Config{} fails Validate()...
Definition ntc_thermistor_types.hpp:284
Curve curve
The thermistor.
Definition ntc_thermistor_types.hpp:285
uint32_t r0_ohm
R at ref_temperature_mc (R25), 1 to kMaxR0Ohm; beta mode.
Definition ntc_thermistor_types.hpp:263