|
ESPHome 2026.12.0-dev
|
Data Structures | |
| struct | NPM1300ChargerConfig |
| Register codes for the battery charger. More... | |
| class | NPM1300Component |
| struct | NPM1300Config |
| The settings applied in setup(), built by code generation into a PROGMEM table. More... | |
| struct | NPM1300OutputConfig |
| Register codes for one regulator, NPM1300_UNSET where the YAML leaves the field out. More... | |
| struct | NPM1300Status |
| The status registers read on every update. More... | |
Enumerations | |
| enum class | NPM1300Output : uint8_t { NPM1300_OUTPUT_BUCK1 = 0 , NPM1300_OUTPUT_BUCK2 = 1 , NPM1300_OUTPUT_LDO1 = 2 , NPM1300_OUTPUT_LDO2 = 3 } |
| The regulators, in the order of their enable task registers. More... | |
Functions | |
| ESPHOME_LOG_TAG (TAG, "npm1300") | |
| float | ntc_temperature (uint16_t code, float inv_beta) |
| Battery temperature in degrees Celsius from the NTC code and 1 / B constant of the thermistor. | |
| PROGMEM_STRING_TABLE (ChargerStatusStrings, "Discharging", "Error", "Disabled", "Paused, PMIC Too Hot", "Charge Complete", "Trickle Charge", "Constant Current", "Constant Voltage", "Paused, Battery Too Cold", "Paused, Battery Too Hot", "Not Charging") | |
| void | publish_charger_status (text_sensor::TextSensor *sensor, uint8_t &last, const NPM1300Status &status) |
Publish the charger status text, only when it differs from last | |
| PROGMEM_STRING_TABLE (OutputNameStrings, "BUCK1", "BUCK2", "LDO1", "LDO2") | |
| uint16_t | 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]. | |
|
strong |
|
inline |
| esphome::npm1300::ESPHOME_LOG_TAG | ( | TAG | , |
| "npm1300" | ) |
| 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.
Definition at line 103 of file npm1300.cpp.
| esphome::npm1300::PROGMEM_STRING_TABLE | ( | ChargerStatusStrings | , |
| "Discharging" | , | ||
| "Error" | , | ||
| "Disabled" | , | ||
| " | Paused, | ||
| PMIC Too Hot" | , | ||
| "Charge Complete" | , | ||
| "Trickle Charge" | , | ||
| "Constant Current" | , | ||
| "Constant Voltage" | , | ||
| " | Paused, | ||
| Battery Too Cold" | , | ||
| " | Paused, | ||
| Battery Too Hot" | , | ||
| "Not Charging" | ) |
| esphome::npm1300::PROGMEM_STRING_TABLE | ( | OutputNameStrings | , |
| "BUCK1" | , | ||
| "BUCK2" | , | ||
| "LDO1" | , | ||
| "LDO2" | ) |
| 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
Definition at line 140 of file npm1300.cpp.