ADS7952 Driver 0.1.0
API reference
Loading...
Searching...
No Matches
ads7952_kconfig.hpp
Go to the documentation of this file.
1
21#ifndef ADS7952_KCONFIG_HPP
22#define ADS7952_KCONFIG_HPP
23
24#ifdef __has_include
25#if __has_include("sdkconfig.h")
26#include "sdkconfig.h"
27#endif
28#endif
29
30#include "ads7952_types.hpp"
31
32#ifndef CONFIG_ADS7952_VREF_MV
34#define CONFIG_ADS7952_VREF_MV 2500
35#endif
36#ifndef CONFIG_ADS7952_VA_MIN_MV
38#define CONFIG_ADS7952_VA_MIN_MV 5000
39#endif
40
41namespace ads7952 {
42
47constexpr Config KconfigDefaults() noexcept {
48#ifdef CONFIG_ADS7952_VARIANT_ADS7950
50#elif defined(CONFIG_ADS7952_VARIANT_ADS7951)
52#elif defined(CONFIG_ADS7952_VARIANT_ADS7953)
54#else
56#endif
57#if defined(CONFIG_ADS7952_PACKAGE_VQFN) && CONFIG_ADS7952_PACKAGE_VQFN
59#endif
60#if defined(CONFIG_ADS7952_RANGE_2VREF) && CONFIG_ADS7952_RANGE_2VREF
62#endif
65#ifdef CONFIG_ADS7952_AUTO1_CHANNELS
66 c.auto1_channels = CONFIG_ADS7952_AUTO1_CHANNELS;
67#endif
68#ifdef CONFIG_ADS7952_AUTO2_LAST_CHANNEL
69 c.auto2_last_channel = CONFIG_ADS7952_AUTO2_LAST_CHANNEL;
70#endif
71 return c;
72}
73
74} // namespace ads7952
75
76#endif // ADS7952_KCONFIG_HPP
#define CONFIG_ADS7952_VREF_MV
Definition ads7952_kconfig.hpp:34
#define CONFIG_ADS7952_VA_MIN_MV
Definition ads7952_kconfig.hpp:38
Public types of the ADS7952 driver: errors, Result<T>, variants, ranges, GPIO and alarm settings,...
constexpr Config ResetConfig(Variant variant) noexcept
The Config of a variant left in its reset state: Config{} with that variant's Auto-1 mask and Auto-2 ...
Definition ads7952_types.hpp:628
@ TwoVref
0 to 2 x VREF (Range 2); specified only while 2 x VREF <= +VA (section 7.6).
@ Ads7953
16 channels.
@ Ads7952
12 channels. The default.
@ Ads7951
8 channels.
@ Ads7950
4 channels.
The ADS7952 driver: everything it declares lives here; internals in detail.
Definition ads7952.hpp:30
constexpr Config KconfigDefaults() noexcept
The configuration menuconfig selected, on top of the chosen part's reset state.
Definition ads7952_kconfig.hpp:47
What the driver is told about the chip and the board. Config{} is an ADS7952 in TSSOP left in its res...
Definition ads7952_types.hpp:402
uint16_t va_min_mv
Definition ads7952_types.hpp:416
uint16_t vref_mv
Definition ads7952_types.hpp:412
Package package
Definition ads7952_types.hpp:404
uint8_t auto2_last_channel
Definition ads7952_types.hpp:422
uint16_t auto1_channels
Definition ads7952_types.hpp:419
Range range
Definition ads7952_types.hpp:408