13#ifndef MCP9700_KCONFIG_HPP
14#define MCP9700_KCONFIG_HPP
17#if __has_include("sdkconfig.h")
24#ifndef CONFIG_MCP9700_ADC_CHANNEL
26#define CONFIG_MCP9700_ADC_CHANNEL 0
28#ifndef CONFIG_MCP9700_ADC_FULL_SCALE_MV
31#define CONFIG_MCP9700_ADC_FULL_SCALE_MV 3300
33#ifndef CONFIG_MCP9700_SAMPLES
35#define CONFIG_MCP9700_SAMPLES 8
37#ifndef CONFIG_MCP9700_SAMPLE_INTERVAL_US
40#define CONFIG_MCP9700_SAMPLE_INTERVAL_US 100
42#ifndef CONFIG_MCP9700_OFFSET_CAL_MC
45#define CONFIG_MCP9700_OFFSET_CAL_MC 0
47#ifndef CONFIG_MCP9700_CUSTOM_V0_MV
49#define CONFIG_MCP9700_CUSTOM_V0_MV 0
51#ifndef CONFIG_MCP9700_CUSTOM_TC_UV_PER_C
53#define CONFIG_MCP9700_CUSTOM_TC_UV_PER_C 0
55#ifndef CONFIG_MCP9700_CUSTOM_MIN_MC
57#define CONFIG_MCP9700_CUSTOM_MIN_MC 0
59#ifndef CONFIG_MCP9700_CUSTOM_MAX_MC
61#define CONFIG_MCP9700_CUSTOM_MAX_MC 0
63#ifndef CONFIG_MCP9700_CUSTOM_ACCURACY_MIN_MC
65#define CONFIG_MCP9700_CUSTOM_ACCURACY_MIN_MC 0
67#ifndef CONFIG_MCP9700_CUSTOM_ACCURACY_MAX_MC
69#define CONFIG_MCP9700_CUSTOM_ACCURACY_MAX_MC 0
77constexpr Variant KconfigVariant()
noexcept {
78#if defined(CONFIG_MCP9700_VARIANT_CUSTOM)
80#elif defined(CONFIG_MCP9700_VARIANT_MCP9700A)
82#elif defined(CONFIG_MCP9700_VARIANT_MCP9700B)
84#elif defined(CONFIG_MCP9700_VARIANT_MCP9701A)
86#elif defined(CONFIG_MCP9700_VARIANT_MCP9701)
105 c.variant = detail::KconfigVariant();
106#if defined(CONFIG_MCP9700_HIGH_TEMPERATURE)
Variant
Which part of the family is wired up: one of the five datasheet devices, or Custom.
Definition mcp9700_types.hpp:177
@ Mcp9701
400 mV at 0 C, 19.5 mV/C, -10 to +125 C, accuracy +-4 C.
@ Mcp9701A
As the MCP9701 with the +-2 C grade (0 to +70 C).
@ Mcp9700A
As the MCP9700 with the +-2 C grade (0 to +70 C).
#define CONFIG_MCP9700_CUSTOM_V0_MV
Definition mcp9700_kconfig.hpp:49
#define CONFIG_MCP9700_ADC_CHANNEL
Definition mcp9700_kconfig.hpp:26
#define CONFIG_MCP9700_CUSTOM_ACCURACY_MIN_MC
Definition mcp9700_kconfig.hpp:65
#define CONFIG_MCP9700_OFFSET_CAL_MC
Definition mcp9700_kconfig.hpp:45
#define CONFIG_MCP9700_CUSTOM_MAX_MC
Definition mcp9700_kconfig.hpp:61
#define CONFIG_MCP9700_SAMPLES
Definition mcp9700_kconfig.hpp:35
#define CONFIG_MCP9700_ADC_FULL_SCALE_MV
Definition mcp9700_kconfig.hpp:31
#define CONFIG_MCP9700_SAMPLE_INTERVAL_US
Definition mcp9700_kconfig.hpp:40
#define CONFIG_MCP9700_CUSTOM_ACCURACY_MAX_MC
Definition mcp9700_kconfig.hpp:69
#define CONFIG_MCP9700_CUSTOM_MIN_MC
Definition mcp9700_kconfig.hpp:57
#define CONFIG_MCP9700_CUSTOM_TC_UV_PER_C
Definition mcp9700_kconfig.hpp:53
Public types of the MCP970x driver: errors, Result<T>, the variant table, configuration,...
The MCP970x driver: everything it declares lives here; internals in detail.
Definition mcp9700.hpp:24
constexpr Config KconfigDefaults() noexcept
The configuration menuconfig selected, on top of the datasheet defaults.
Definition mcp9700_kconfig.hpp:102
Everything EnsureInitialized() uses. Config{} is an MCP9700 on a 12 bit, 3.3 V ADC.
Definition mcp9700_types.hpp:274
uint8_t channel
Passed to ReadVoltageMv() unchanged.
Definition mcp9700_types.hpp:275