No description
|
Some checks failed
Arduino Library CI / test (push) Has been cancelled
Implemented complete control functions for registers REG0F through REG16: - REG0F-REG11: Charger control with enable/disable functions and enum-based settings - REG12-REG13: Advanced charger control including AC drivers, OTG, PFM, and protection functions - REG14: Charger Control 5 with ship FET, battery discharge, and current limit controls - REG15: MPPT control with VOC percentage, delay, rate, and MPPT enable functions - REG16: Temperature control with thermal thresholds, pulldown controls, and backup ACFET All functions include proper bit field access, enum validation, and inverted logic handling for disable bits. Test coverage added to example sketch with F() macro optimization. Hardware-tested compilation successful at 70% program storage usage. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .github/workflows | ||
| examples/test_bq25798 | ||
| .clang-format | ||
| .gitignore | ||
| Adafruit_BQ25798.cpp | ||
| Adafruit_BQ25798.h | ||
| library.properties | ||
| README.md | ||
Adafruit BQ25798 Library 

Arduino library for the TI BQ25798 I2C controlled buck-boost battery charger with dual-input selector
About this Driver
The BQ25798 is a fully integrated switch-mode buck-boost charger for 1-4 cell Li-ion batteries and Li-polymer batteries. Key features include:
- 1- to 4-cell Li-ion/Li-polymer battery support
- 5A charging current with 10mA resolution
- 3.6V to 24V wide input operating voltage range
- Dual-input power mux controller
- Built-in MPPT for solar panel charging
- USB OTG output (2.8V to 22V)
- Integrated 16-bit ADC for monitoring
- I2C interface for full control
- 29-pin 4mm x 4mm QFN package
Installation
To install, use the Arduino Library Manager and search for "Adafruit BQ25798", or download the ZIP archive from the releases page.
Dependencies
This library depends on the Adafruit BusIO library.
Quick Start
#include <Adafruit_BQ25798.h>
Adafruit_BQ25798 bq;
void setup() {
Serial.begin(115200);
if (!bq.begin()) {
Serial.println("Could not find BQ25798 chip");
while (1);
}
Serial.println("BQ25798 found!");
}
void loop() {
// Your code here
}
Hardware
The BQ25798 communicates via I2C. Connect:
- VIN to 3.3V or 5V power
- GND to ground
- SCL to I2C clock
- SDA to I2C data
The default I2C address is 0x6B.
License
This library is licensed under the MIT license. See LICENSE for more details.
Contributing
Contributions are welcome! Please read our Code of Conduct and Contributing guidelines before submitting pull requests.