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

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

#include "pf1550_config.hpp"

Go to the source code of this file.

Namespaces

namespace  pf1550
 The PF1550 driver: everything it declares lives here; internals in detail.
 

Macros

#define CONFIG_PF1550_CELL_MAX_MV   4200
 
#define CONFIG_PF1550_CELL_MAX_CHARGE_MA   500
 
#define CONFIG_PF1550_INPUT_MAX_MA   1000
 

Functions

constexpr Config pf1550::KconfigDefaults () noexcept
 The configuration menuconfig selected: the cell and supply Limits and the as-found policy, with every block left unapplied.
 

Detailed Description

Optional ESP-IDF layer: a Config built from the CONFIG_PF1550_* 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_PF1550_CRC_ENABLE 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_PF1550_CELL_MAX_CHARGE_MA

#define CONFIG_PF1550_CELL_MAX_CHARGE_MA   500

Highest cell charge current in mA when Kconfig does not set it: 500.

◆ CONFIG_PF1550_CELL_MAX_MV

#define CONFIG_PF1550_CELL_MAX_MV   4200

Highest cell charge voltage in mV when Kconfig does not set it: 4200, a standard Li-ion cell.

◆ CONFIG_PF1550_INPUT_MAX_MA

#define CONFIG_PF1550_INPUT_MAX_MA   1000

Supply current in mA when Kconfig does not set it: 1000.