|
BASIS 2 Driver 0.1.0
API 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. | |
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).
| #define CONFIG_ALICAT_BASIS2_PROCESSING_MS 50 |
Instrument turnaround added to every reply wait when Kconfig does not set it: 50 ms.
| #define CONFIG_ALICAT_BASIS2_READ_RETRIES 1 |
Retries of a failed read when Kconfig does not set it: 1.
| #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.