u-blox / battery-charger-bq24295

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 Jun 14 17:35:12 2017 +0100
Parent:
6:79e747c6d094
Child:
8:2a758bf86bb7
Commit message:
Remove printf() warnings under GCC.

Changed in this revision

bq24295.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/bq24295.cpp	Wed Jun 07 10:33:22 2017 +0000
+++ b/bq24295.cpp	Wed Jun 14 17:35:12 2017 +0100
@@ -638,7 +638,7 @@
                 success = setRegister (0x05, reg);
 #ifdef DEBUG_BQ24295
                 if (success) {
-                    printf("BatteryChargerBq24295 (I2C 0x%02x): fast charging safety timer now set to %d hours.\r\n", gAddress >> 1, timerHours);
+                    printf("BatteryChargerBq24295 (I2C 0x%02x): fast charging safety timer now set to %d hours.\r\n", gAddress >> 1, (int) timerHours);
                 }
 #endif
             }
@@ -684,7 +684,7 @@
                     }
                 }
 #ifdef DEBUG_BQ24295
-                printf("BatteryChargerBq24295 (I2C 0x%02x): fast charging safety timer is %d hours.\r\n", gAddress >> 1, *pTimerHours);
+                printf("BatteryChargerBq24295 (I2C 0x%02x): fast charging safety timer is %d hours.\r\n", gAddress >> 1, (int) *pTimerHours);
 #endif
             }
         }
@@ -1171,7 +1171,7 @@
             success = setRegister (0x06, reg);
 #ifdef DEBUG_BQ24295
             if (success) {
-                printf("BatteryChargerBq24295 (I2C 0x%02x): boost mode lower temperature limit now set to %d C.\r\n", gAddress >> 1, temperatureC);
+                printf("BatteryChargerBq24295 (I2C 0x%02x): boost mode lower temperature limit now set to %d C.\r\n", gAddress >> 1, (int) temperatureC);
             }
 #endif
         }
@@ -1210,7 +1210,7 @@
                         break;
                     }
 #ifdef DEBUG_BQ24295
-                    printf("BatteryChargerBq24295 (I2C 0x%02x): boost mode upper temperature limit is %d C.\r\n", gAddress >> 1, *pTemperatureC);
+                    printf("BatteryChargerBq24295 (I2C 0x%02x): boost mode upper temperature limit is %d C.\r\n", gAddress >> 1, (int) *pTemperatureC);
 #endif
                 }
             }
@@ -1594,7 +1594,7 @@
             success = setRegister (0x06, reg);
 #ifdef DEBUG_BQ24295
             if (success) {
-                printf("BatteryChargerBq24295 (I2C 0x%02x): chip thermal regulation threshold now set to %d C.\r\n", gAddress >> 1, temperatureC);
+                printf("BatteryChargerBq24295 (I2C 0x%02x): chip thermal regulation threshold now set to %d C.\r\n", gAddress >> 1, (int) temperatureC);
             }
 #endif
         }
@@ -1634,7 +1634,7 @@
                     break;
                 }
 #ifdef DEBUG_BQ24295
-                printf("BatteryChargerBq24295 (I2C 0x%02x): chip thermal regulation threshold is %d C.\r\n", gAddress >> 1, *pTemperatureC);
+                printf("BatteryChargerBq24295 (I2C 0x%02x): chip thermal regulation threshold is %d C.\r\n", gAddress >> 1, (int) *pTemperatureC);
 #endif
             }
         }
@@ -1717,7 +1717,7 @@
             }
 #ifdef DEBUG_BQ24295
             if (success) {
-                printf("BatteryChargerBq24295 (I2C 0x%02x): watchdog is %d seconds.\r\n", gAddress >> 1, *pWatchdogS);
+                printf("BatteryChargerBq24295 (I2C 0x%02x): watchdog is %d seconds.\r\n", gAddress >> 1, (int) *pWatchdogS);
             }
 #endif
         }
@@ -1752,7 +1752,7 @@
             success = setRegister(0x05, reg);
 #ifdef DEBUG_BQ24295
             if (success) {
-                printf("BatteryChargerBq24295 (I2C 0x%02x): watchdog set to %d seconds.\r\n", gAddress >> 1, watchdogS);
+                printf("BatteryChargerBq24295 (I2C 0x%02x): watchdog set to %d seconds.\r\n", gAddress >> 1, (int) watchdogS);
             }
 #endif
         }