BASIS 2 Driver 0.1.0
API reference
Loading...
Searching...
No Matches
Namespaces | Macros | Functions
alicat_basis2_kconfig.hpp File Reference

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

#include "alicat_basis2_types.hpp"

Go to the source code of this file.

Namespaces

namespace  alicat_basis2
 The ALICAT_BASIS2 driver: everything it declares lives here; internals in detail.
 

Macros

#define CONFIG_ALICAT_BASIS2_PROCESSING_MS   50
 
#define CONFIG_ALICAT_BASIS2_SLOW_COMMAND_MS   1000
 
#define CONFIG_ALICAT_BASIS2_READ_RETRIES   1
 

Functions

constexpr Config alicat_basis2::KconfigDefaults () noexcept
 The configuration menuconfig selected, on top of the datasheet defaults.
 

Detailed Description

Optional ESP-IDF layer: a Config built from the CONFIG_ALICAT_BASIS2_* 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_ALICAT_BASIS2_MODBUS means ASCII 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_ALICAT_BASIS2_PROCESSING_MS

#define CONFIG_ALICAT_BASIS2_PROCESSING_MS   50

Instrument turnaround added to every reply wait when Kconfig does not set it: 50 ms.

◆ CONFIG_ALICAT_BASIS2_READ_RETRIES

#define CONFIG_ALICAT_BASIS2_READ_RETRIES   1

Retries of a failed read when Kconfig does not set it: 1.

◆ CONFIG_ALICAT_BASIS2_SLOW_COMMAND_MS

#define CONFIG_ALICAT_BASIS2_SLOW_COMMAND_MS   1000

Reply wait of commands that may write non-volatile memory when Kconfig does not set it: 1000 ms.