25#ifndef SFM_FLOW_METER_KCONFIG_HPP
26#define SFM_FLOW_METER_KCONFIG_HPP
29#if __has_include("sdkconfig.h")
36#ifndef CONFIG_SFM_FLOW_METER_AVERAGING
38#define CONFIG_SFM_FLOW_METER_AVERAGING (-1)
40#ifndef CONFIG_SFM_FLOW_METER_ERROR_LIMIT
43#define CONFIG_SFM_FLOW_METER_ERROR_LIMIT 5
57 if constexpr (kAveraging >= 0) {
58 c.averaging =
static_cast<std::uint16_t
>(kAveraging);
60#ifdef CONFIG_SFM_FLOW_METER_SCALING_LENIENT
62#elif defined(CONFIG_SFM_FLOW_METER_SCALING_OFF)
67#if defined(CONFIG_SFM_FLOW_METER_RANGE_FLAG) && CONFIG_SFM_FLOW_METER_RANGE_FLAG
70#if defined(CONFIG_SFM_FLOW_METER_TIMING_DATASHEET) && CONFIG_SFM_FLOW_METER_TIMING_DATASHEET
73#if defined(CONFIG_SFM_FLOW_METER_ALLOW_GENERAL_CALL_RESET) && \
74 CONFIG_SFM_FLOW_METER_ALLOW_GENERAL_CALL_RESET
75 c.allow_general_call_reset =
true;
77#if defined(CONFIG_SFM_FLOW_METER_NO_RESTART_BEFORE_READ) && \
78 CONFIG_SFM_FLOW_METER_NO_RESTART_BEFORE_READ
79 c.restart_before_read =
false;
@ Strict
Any difference or a wrong unit is DeviceFault.
@ Off
The sensor's values are used; only scale 0 and the unit are checked.
@ Datasheet
The part's own maxima; needs a known variant.
The SFM flow meter driver: everything it declares lives here; internals in detail.
Definition sfm_flow_meter.hpp:35
constexpr Config KconfigDefaults() noexcept
The configuration menuconfig selected, on top of the datasheet defaults.
Definition sfm_flow_meter_kconfig.hpp:54
#define CONFIG_SFM_FLOW_METER_AVERAGING
Definition sfm_flow_meter_kconfig.hpp:38
#define CONFIG_SFM_FLOW_METER_ERROR_LIMIT
Definition sfm_flow_meter_kconfig.hpp:43
Public types of the SFM flow meter driver: errors, Result<T>, the families, variants and gases,...
Everything EnsureInitialized() applies.
Definition sfm_flow_meter_types.hpp:437