SensorLib 0.5.0
Multi-platform sensor driver library for Arduino, PlatformIO, and ESP-IDF
Loading...
Searching...
No Matches
SY6970Core.hpp File Reference

@license MIT License More...

Include dependency graph for SY6970Core.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  SY6970Core
 

Namespaces

namespace  SY6970Faults
 

Functions

bool SY6970Faults::isWatchdogTimeout (uint8_t fault)
 
bool SY6970Faults::isBoostFault (uint8_t fault)
 
bool SY6970Faults::isChargeFault (uint8_t fault)
 
uint8_t SY6970Faults::getChargeFaultType (uint8_t fault)
 
bool SY6970Faults::isChargeInputFault (uint8_t fault)
 
bool SY6970Faults::isChargeThermalFault (uint8_t fault)
 
bool SY6970Faults::isChargeTimerFault (uint8_t fault)
 
bool SY6970Faults::isBatteryFault (uint8_t fault)
 
uint8_t SY6970Faults::getNtcFault (uint8_t fault)
 

Variables

constexpr uint8_t SY6970Faults::WATCHDOG_TIMEOUT = 0x80
 
constexpr uint8_t SY6970Faults::BOOST_FAULT = 0x40
 
constexpr uint8_t SY6970Faults::CHARGE_FAULT_MASK = 0x30
 
constexpr uint8_t SY6970Faults::CHARGE_FAULT_NORMAL = 0x00
 
constexpr uint8_t SY6970Faults::CHARGE_FAULT_INPUT = 0x10
 
constexpr uint8_t SY6970Faults::CHARGE_FAULT_THERMAL = 0x20
 
constexpr uint8_t SY6970Faults::CHARGE_FAULT_TIMER = 0x30
 
constexpr uint8_t SY6970Faults::BATTERY_FAULT = 0x08
 
constexpr uint8_t SY6970Faults::NTC_FAULT_MASK = 0x07
 

Detailed Description

@license MIT License

Copyright (c) 2026 lewis he

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Author
Lewis He (lewis.nosp@m.he@o.nosp@m.utloo.nosp@m.k.co.nosp@m.m)
Date
2026-04-09

SY6970 Core Communication and Status Interface

This class provides low-level I2C communication and direct access to SY6970 status and fault registers. It serves as the base class for charger, power, and ADC modules.

See also
PmicSY6970 for the main PMIC interface
SY6970Core.cpp for implementation
SY6970Charger for charging functions
SY6970Power for power/OTG functions
SY6970Adc for ADC functions
SY6970Regs.hpp for register definitions

Definition in file SY6970Core.hpp.