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

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

#include "isf15acp4_types.hpp"

Go to the source code of this file.

Namespaces

namespace  isf15acp4
 The ISF15ACP4 driver: everything it declares lives here; internals in detail.
 

Macros

#define CONFIG_ISF15ACP4_MASTER_CURRENT   15
 
#define CONFIG_ISF15ACP4_BUTTON_DEBOUNCE_MS   20
 
#define CONFIG_ISF15ACP4_BUTTON_LONG_PRESS_MS   800
 
#define CONFIG_ISF15ACP4_IDLE_DIM_MS   0
 
#define CONFIG_ISF15ACP4_IDLE_SLEEP_MS   0
 

Functions

constexpr Config isf15acp4::KconfigDefaults () noexcept
 The configuration menuconfig selected, on top of the module's preset.
 

Detailed Description

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

Kconfig writes a bool option set to "n" as an absent macro, so an absent CONFIG_ISF15ACP4_RED_ON_SEGMENT_A or CONFIG_ISF15ACP4_BUTTON_ACTIVE_LOW is read as off only when the option menu is present (CONFIG_ISF15ACP4); without the menu the defaults stay on.

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_ISF15ACP4_BUTTON_DEBOUNCE_MS

#define CONFIG_ISF15ACP4_BUTTON_DEBOUNCE_MS   20

Debounce time when Kconfig does not set it: ButtonConfig{}.

◆ CONFIG_ISF15ACP4_BUTTON_LONG_PRESS_MS

#define CONFIG_ISF15ACP4_BUTTON_LONG_PRESS_MS   800

Long-press time when Kconfig does not set it: ButtonConfig{}.

◆ CONFIG_ISF15ACP4_IDLE_DIM_MS

#define CONFIG_ISF15ACP4_IDLE_DIM_MS   0

Idle dim time when Kconfig does not set it: never.

◆ CONFIG_ISF15ACP4_IDLE_SLEEP_MS

#define CONFIG_ISF15ACP4_IDLE_SLEEP_MS   0

Idle sleep time when Kconfig does not set it: never.

◆ CONFIG_ISF15ACP4_MASTER_CURRENT

#define CONFIG_ISF15ACP4_MASTER_CURRENT   15

Master current step when Kconfig does not set it: the full current, Config{}.