|
MAX22200 Driver 0.1.0
API reference
|
Optional ESP-IDF layer: a Config built from the CONFIG_MAX22200_* Kconfig options.
More...
#include "max22200_types.hpp"Go to the source code of this file.
Namespaces | |
| namespace | max22200 |
The MAX22200 driver: everything it declares lives here; internals in detail. | |
Macros | |
| #define | CONFIG_MAX22200_RREF_OHM 0 |
Functions | |
| constexpr Config | max22200::KconfigDefaults () noexcept |
The configuration menuconfig selected, on top of Config{}. | |
Optional ESP-IDF layer: a Config built from the CONFIG_MAX22200_* Kconfig options.
Include this header only where you want menuconfig to choose the defaults; the driver never includes it and no driver signature depends on it. Under ESP-IDF the values come from sdkconfig.h. Without Kconfig every option falls back to Config{}, so KconfigDefaults() equals Config{}.
Kconfig writes a bool option set to "n" as an absent macro, so an absent CONFIG_MAX22200_CLOCK_80KHZ means 100 kHz in both cases. The channel settings are not Kconfig options: set them in the Config in code.
One configuration per program: the function below depends on the CONFIG_ macros, so every translation unit of one program must see the same values (ESP-IDF has one sdkconfig.h per build; each host test is its own program). No driver header includes this one (handbook KB-CPP20-018).
| #define CONFIG_MAX22200_RREF_OHM 0 |
RREF in ohms when Kconfig does not set it: Config{}.rref_ohm, not given.