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

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

#include "pcal9555_types.hpp"

Go to the source code of this file.

Namespaces

namespace  pcal9555
 The PCAL9555 driver: everything it declares lives here; internals in detail.
 

Macros

#define CONFIG_PCAL9555_OUTPUT_HIGH_MASK   0xFFFF
 
#define CONFIG_PCAL9555_INPUT_MASK   0xFFFF
 

Functions

constexpr Config pcal9555::KconfigDefaults () noexcept
 The configuration menuconfig selected, on top of the power-up values.
 

Detailed Description

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

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 header includes this one (handbook KB-CPP20-018).

Macro Definition Documentation

◆ CONFIG_PCAL9555_INPUT_MASK

#define CONFIG_PCAL9555_INPUT_MASK   0xFFFF

Pins configured as inputs when Kconfig does not set it: all, the power-up value.

◆ CONFIG_PCAL9555_OUTPUT_HIGH_MASK

#define CONFIG_PCAL9555_OUTPUT_HIGH_MASK   0xFFFF

Output pins driven high when Kconfig does not set it: all, the power-up value.