Example program to demonstrate the use of the BatteryGaugeBQ27441 class.
Dependencies: battery-gauge-bq27441
Revision 6:61df9e6e2871, committed 2017-06-14
- Comitter:
- rob.meades@u-blox.com
- Date:
- Wed Jun 14 17:17:05 2017 +0100
- Parent:
- 5:d95922f8cea2
- Child:
- 7:9ccf046018f7
- Commit message:
- Switch off the battery detect pin for C030 as it is not connected.
Changed in this revision
battery-gauge-bq27441.lib | Show annotated file Show diff for this revision Revisions of this file |
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/battery-gauge-bq27441.lib Wed Jun 14 13:46:49 2017 +0000 +++ b/battery-gauge-bq27441.lib Wed Jun 14 17:17:05 2017 +0100 @@ -1,1 +1,1 @@ -https://mbed.org/teams/ublox/code/battery-gauge-bq27441/#e6208506ebc7 +https://mbed.org/teams/ublox/code/battery-gauge-bq27441/#63b325f2c21a
--- a/main.cpp Wed Jun 14 13:46:49 2017 +0000 +++ b/main.cpp Wed Jun 14 17:17:05 2017 +0100 @@ -38,7 +38,12 @@ printf ("Starting up...\n"); if (gauge.init(&i2C)) { - printf ("BQ27441 battery gauge chip is initialised.\n"); + printf ("BQ27441 battery gauge chip is initialised.\n"); +#ifdef TARGET_UBLOX_C030 + if (gauge.disableBatteryDetect()) { + printf ("Battery detection input disabled (it is not connected on C030).\n"); + } +#endif while (!stop) { if (gauge.isBatteryDetected()) { if (!gauge.isGaugeEnabled()) {