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

Go to the source code of this file.

Data Structures

struct  esphome::sy6970::SY6970Data
 
class  esphome::sy6970::SY6970Component
 

Namespaces

namespace  esphome
 
namespace  esphome::sy6970
 

Enumerations

enum  esphome::sy6970::BusStatus {
  esphome::sy6970::BUS_STATUS_NO_INPUT = 0 , esphome::sy6970::BUS_STATUS_USB_SDP = 1 , esphome::sy6970::BUS_STATUS_USB_CDP = 2 , esphome::sy6970::BUS_STATUS_USB_DCP = 3 ,
  esphome::sy6970::BUS_STATUS_HVDCP = 4 , esphome::sy6970::BUS_STATUS_ADAPTER = 5 , esphome::sy6970::BUS_STATUS_NO_STD_ADAPTER = 6 , esphome::sy6970::BUS_STATUS_OTG = 7
}
 
enum  esphome::sy6970::ChargeStatus { esphome::sy6970::CHARGE_STATUS_NOT_CHARGING = 0 , esphome::sy6970::CHARGE_STATUS_PRE_CHARGE = 1 , esphome::sy6970::CHARGE_STATUS_FAST_CHARGE = 2 , esphome::sy6970::CHARGE_STATUS_CHARGE_DONE = 3 }
 
enum  esphome::sy6970::I2CWatchdogTimeout { esphome::sy6970::I2C_WATCHDOG_DISABLED = 0 , esphome::sy6970::I2C_WATCHDOG_40S = 1 , esphome::sy6970::I2C_WATCHDOG_80S = 2 , esphome::sy6970::I2C_WATCHDOG_160S = 3 }
 

Functions

uint16_t esphome::sy6970::vbus_voltage_mv (uint8_t reg)
 VBUS voltage in mV from REG11; 0 while VBUS_GD (bit 7) shows no input, as the ADC then reads its 2.6 V offset.
 
bool esphome::sy6970::is_charging (uint8_t charge_status)
 
 esphome::sy6970::PROGMEM_STRING_TABLE (BusStatusStrings, "No Input", "USB SDP", "USB CDP", "USB DCP", "HVDCP", "Adapter", "Non-Standard Adapter", "OTG")
 
 esphome::sy6970::PROGMEM_STRING_TABLE (ChargeStatusStrings, "Not Charging", "Pre-charge", "Fast Charge", "Charge Done")
 
 esphome::sy6970::PROGMEM_STRING_TABLE (NtcStatusStrings, "Normal", "Unknown", "Warm", "Cool", "Unknown", "Cold", "Hot", "Unknown")