Example program to demonstrate the use of the BatteryGaugeBQ27441 class.
Dependencies: battery-gauge-bq27441
Diff: main.cpp
- Revision:
- 6:61df9e6e2871
- Parent:
- 1:7af88dc66286
- Child:
- 7:9ccf046018f7
--- 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()) {