repo time

Dependencies:   mbed MAX14720 MAX30205 USBDevice

Revision:
18:b64938c813dc
Parent:
17:9a467f9a0579
--- a/main.cpp	Thu Oct 06 17:11:37 2016 +0000
+++ b/main.cpp	Thu Oct 20 16:31:16 2016 +0000
@@ -18,8 +18,6 @@
 
 int main()
 {
-    int result;
-
     // Assign turnOff function to falling edge of button
     button.fall(&turnOff);
 
@@ -32,8 +30,9 @@
     // The buck-boost regulator will remain off until init is called
 
     // Call init to apply all settings to the PMIC
-    result = max14720.init();
-    if (result == MAX14720_ERROR) printf("Error initializing MAX14720");
+    if (max14720.init() == MAX14720_ERROR) {
+        printf("Error initializing MAX14720");
+    }
 
     // Wait 1 second to see the buck-boost regulator turn on
     wait(1);
@@ -49,7 +48,7 @@
         wait(0.5);
 
         // Change the voltage of the buck-boost regulator
-        // Note that the MAX14720 cannot change the buck-boost voltage while  
+        // Note that the MAX14720 cannot change the buck-boost voltage while
         // it is enabled so if boostEn is set to BOOST_ENABLED, this
         // function will disable it, change the voltage, and re-enable it.
         max14720.boostSetVoltage(5000);