This class provides APIs to all of the registers of the TI BQ24295 battery charger chip, as used on the u-blox C030 board. This class is not required to charge a battery connected to the C030 board, charging will begin automatically when a battery is connected. This class is only required if the user wishes to monitor the charger's state or change the charger's settings. The caller should instantiate an I2C interface and pass this to init(), which will initialise the chip and place it into its lowest power state. The chip may then be configured using the API calls. Once the chip is configured, battery charging can be enabled. If battery charging is disabled the chip will once more be put into its lowest power state.

Dependents:   example-battery-charger-bq24295 example-C030-out-of-box-demo example-C030-out-of-box-demo Amit

Files at this revision

API Documentation at this revision

Comitter:
rob.meades@u-blox.com
Date:
Wed Aug 02 13:33:58 2017 +0100
Parent:
7:cc08662947cd
Commit message:
Add comment concerning the response to getChargerState() on a C030 board and removed spurious "/".

Changed in this revision

battery_charger_bq24295.h Show annotated file Show diff for this revision Revisions of this file
bq24295.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/battery_charger_bq24295.h	Wed Jun 14 17:35:12 2017 +0100
+++ b/battery_charger_bq24295.h	Wed Aug 02 13:33:58 2017 +0100
@@ -83,6 +83,9 @@
     bool init (I2C * pI2c, uint8_t address = BATTERY_CHARGER_BQ24295_ADDRESS);
 
     /** Get the charger state.
+    * Note: on a u-blox C030 board with no battery connected this will report
+    *       CHARGER_STATE_COMPLETE or CHARGER_STATE_FAST_CHARGE rather than
+    *       CHARGER_STATE_NOT_CHARGING.
     * @return the charge state.
     */
     ChargerState getChargerState(void);
--- a/bq24295.cpp	Wed Jun 14 17:35:12 2017 +0100
+++ b/bq24295.cpp	Wed Aug 02 13:33:58 2017 +0100
@@ -262,7 +262,7 @@
     return isPresent;
 }
 
-/// Enable charging.
+// Enable charging.
 bool BatteryChargerBq24295::enableCharging (void)
 {
     bool success = false;