BMP581 Driver 0.1.0
API reference
Loading...
Searching...
No Matches
Namespaces | Macros | Functions
bmp581_kconfig.hpp File Reference

Optional ESP-IDF layer: a Config built from the CONFIG_BMP581_* Kconfig options. More...

#include <cstdint>
#include <utility>
#include "bmp581_types.hpp"

Go to the source code of this file.

Namespaces

namespace  bmp581
 The BMP581 driver: everything it declares lives here; internals in detail.
 

Macros

#define CONFIG_BMP581_PRESSURE_OVERSAMPLING   1
 
#define CONFIG_BMP581_TEMPERATURE_OVERSAMPLING   1
 
#define CONFIG_BMP581_STARTUP_TIMEOUT_MS   10
 
#define CONFIG_BMP581_DATA_READY_TIMEOUT_MS   2000
 

Functions

constexpr Oversampling bmp581::OversamplingFromSamples (int32_t samples) noexcept
 The oversampling setting for a number of samples, rounded down to a power of two.
 
constexpr Config bmp581::KconfigDefaults () noexcept
 The configuration menuconfig selected, on top of the datasheet defaults.
 

Detailed Description

Optional ESP-IDF layer: a Config built from the CONFIG_BMP581_* 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 the datasheet default, so KconfigDefaults() equals Config{}.

Kconfig writes a bool option set to "n" as an absent macro, so an absent CONFIG_BMP581_DATA_READY means off in both cases.

One configuration per program: the inline 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 or library header includes this one (handbook KB-CPP20-018).

Macro Definition Documentation

◆ CONFIG_BMP581_DATA_READY_TIMEOUT_MS

#define CONFIG_BMP581_DATA_READY_TIMEOUT_MS   2000

Data-ready timeout in milliseconds when Kconfig does not set it: Config{}.data_ready_timeout_ms.

◆ CONFIG_BMP581_PRESSURE_OVERSAMPLING

#define CONFIG_BMP581_PRESSURE_OVERSAMPLING   1

Pressure oversampling when Kconfig does not set it: 1, the reset value.

◆ CONFIG_BMP581_STARTUP_TIMEOUT_MS

#define CONFIG_BMP581_STARTUP_TIMEOUT_MS   10

NVM-ready timeout in milliseconds when Kconfig does not set it: Config{}.startup_timeout_ms.

◆ CONFIG_BMP581_TEMPERATURE_OVERSAMPLING

#define CONFIG_BMP581_TEMPERATURE_OVERSAMPLING   1

Temperature oversampling when Kconfig does not set it: 1, the reset value.