PMIC (Power Management IC)
System status register
This is the read-only system status register, REG08. It's decoded in one call by getSystemStatus(), above, or one bit at a time with the methods below.
getVbusStat()
byte getVbusStat();
Returns the power source (VBUS_STAT, REG08 bits 7:6): 0 = unknown (no input, or DPDM detection incomplete), 1 = USB host, 2 = adapter port, 3 = OTG (boost mode).
See also: System.powerSource() reports similar information in a higher-level, cross-platform form.
getChargingStat()
byte getChargingStat();
Returns the charging state (CHRG_STAT, REG08 bits 5:4): 0 = not charging, 1 = pre-charge (below BATLOWV), 2 = fast charging, 3 = charge termination done.
See also: System.batteryState() reports similar information in a higher-level, cross-platform form.
getDPMStat()
bool getDPMStat();
Returns true if the PMIC is currently in dynamic power management (DPM), meaning either the input voltage (VINDPM) or input current (IINDPM) limit has been reached and the charge current is being reduced to compensate.
isPowerGood()
bool isPowerGood(void);
Returns true if the input source (VBUS) is present and passing the PMIC's input qualification checks (PG_STAT, REG08 bit 2).
isHot()
bool isHot(void);
Returns true if the PMIC is currently in thermal regulation (THERM_STAT, REG08 bit 1), meaning its internal junction temperature has exceeded the threshold set by setThermalRegulation() and it is reducing charge current to cool down.
getVsysStat()
// PROTOTYPE
bool getVsysStat();
bool getVsysStat();
Returns true if the system voltage (SYS) is being held at the minimum system voltage regulation point (VSYS_STAT, REG08 bit 0) because the battery voltage has dropped below it.