ESPHome 2026.12.0-dev
Loading...
Searching...
No Matches
npm1300.h File Reference

Go to the source code of this file.

Data Structures

struct  esphome::npm1300::NPM1300OutputConfig
 Register codes for one regulator, NPM1300_UNSET where the YAML leaves the field out. More...
 
struct  esphome::npm1300::NPM1300ChargerConfig
 Register codes for the battery charger. More...
 
struct  esphome::npm1300::NPM1300Config
 The settings applied in setup(), built by code generation into a PROGMEM table. More...
 
struct  esphome::npm1300::NPM1300Status
 The status registers read on every update. More...
 
class  esphome::npm1300::NPM1300Component
 

Namespaces

namespace  esphome
 
namespace  esphome::npm1300
 

Enumerations

enum class  esphome::npm1300::NPM1300Output : uint8_t { esphome::npm1300::NPM1300_OUTPUT_BUCK1 = 0 , esphome::npm1300::NPM1300_OUTPUT_BUCK2 = 1 , esphome::npm1300::NPM1300_OUTPUT_LDO1 = 2 , esphome::npm1300::NPM1300_OUTPUT_LDO2 = 3 }
 The regulators, in the order of their enable task registers. More...
 

Functions

uint16_t esphome::npm1300::adc_code (const uint8_t *adc, uint8_t msb, uint8_t lsbs, uint8_t shift)
 The 10-bit ADC result whose high 8 bits are adc[msb] and low 2 bits are at shift in adc[lsbs].
 
float esphome::npm1300::ntc_temperature (uint16_t code, float inv_beta)
 Battery temperature in degrees Celsius from the NTC code and 1 / B constant of the thermistor.
 
void esphome::npm1300::publish_charger_status (text_sensor::TextSensor *sensor, uint8_t &last, const NPM1300Status &status)
 Publish the charger status text, only when it differs from last