MAX14690 library

Fork of MAX14690 by Maxim Integrated

Revision:
11:022bcd2ea263
Parent:
10:32c7e2ab67aa
Child:
12:1ca110017930
--- a/MAX14690.h	Fri Nov 18 22:06:28 2016 +0000
+++ b/MAX14690.h	Sat Nov 19 00:23:44 2016 +0000
@@ -48,12 +48,12 @@
 #define MAX14690_OFF_COMMAND 0xB2
 
 /**
- * @brief MAX14690 Power-Management Solution Driver
+ * @brief MAX14690 Wearable Power-Management Solution Driver
  *
- * @details The MAX14690/MAX14750 are compact power-management solutions for
+ * @details The MAX14690 is a compact power-management solutions for
  * space-constrained, battery-powered applications where size and efficiency are
- * critical. Both devices integrate a power switch, a linear regulator, a buck
- * regulator, and a buck-boost regulator.
+ * critical. It combines a battery charger with two buck regulators, three LDOs and
+ * a other power supervisory functions to optimize the system implementation.
  * <br>https://www.maximintegrated.com/en/products/power/battery-management/MAX14690.html
  *
  * @code
@@ -61,10 +61,9 @@
  * #include "MAX14690.h"
  *
  * // I2C Master 2
- * I2C i2c2(I2C2_SDA, I2C2_SCL);
+ * I2C i2cm2(I2C2_SDA, I2C2_SCL);
  *
- * #define  I2C_ADDR_PMIC   (0x54)
- * MAX14690 max14690(&i2c2, I2C_ADDR_PMIC);
+ * MAX14690 max14690(&i2cm2);
  *
  * DigitalOut led(LED1, 0);
  * InterruptIn button(SW1);
@@ -78,21 +77,20 @@
  * {
  *     button.fall(&turnOff);
  *
- *     max14690.boostEn = MAX14690::BOOST_ENABLED;
+ *     max14690.ldo2Millivolts = 3300;
+ *     max14690.ldo3Millivolts = 3300;
+ *     max14690.ldo2Mode = MAX14690::LDO_ENABLED;
+ *     max14690.ldo3Mode = MAX14690::LDO_ENABLED;
+ *     max14690.monCfg = MAX14690::MON_HI_Z;
  *     if (max14690.init() == MAX14690_ERROR) {
  *         printf("Error initializing MAX14690");
  *     }
  *
- *     wait(1);
+ *     Thread::wait(500);
  *
  *     while(1) {
- *         max14690.boostSetMode(MAX14690::BOOST_DISABLED);
- *         max14690.boostEn = MAX14690::BOOST_ENABLED;
- *         wait(0.5);
- *         max14690.boostSetVoltage(2500);
- *         wait(0.5);
- *         max14690.boostSetVoltage(5000);
- *         wait(0.5);
+ *         led1 = !led1;
+ *         Thread::wait(500);
  *     }
  * }
  * @endcode