MAX14690 Library

Dependents:   MAX32630HSP3_IMU_HelloWorld MAX32630HSP3_IMU_HelloWorld max32630fthr max4146x_comp ... more

Fork of MAX14690 by Greg Steiert

Revision:
1:f8919b0c2052
Parent:
0:0e40db4a2b3e
Child:
2:5bcfe7e294b6
diff -r 0e40db4a2b3e -r f8919b0c2052 MAX14720.h
--- a/MAX14720.h	Wed Sep 28 16:42:42 2016 +0000
+++ b/MAX14720.h	Wed Sep 28 17:38:41 2016 +0000
@@ -36,6 +36,36 @@
 
 #include "mbed.h"
 
+/**
+ * Example for the MAX14720 PMIC Driver
+ *
+ * @code
+ * #include <stdio.h>
+ * #include "mbed.h"
+ * #include "MAX14720.h"
+ *
+ *  // I2C Master 2
+ * I2C i2c2(I2C2_SDA, I2C2_SCL);                 
+ * MAX14720 max14720(&i2c2);
+ *
+ * int main(void) {
+ *     int result;
+ * 
+ *	   // initialize BoostVSet on the MAX14720 PMIC to 4.5 Volts
+ *     printf("Init MAX14720\n");
+ *     result = max14720.boostEn(MAX14720::BoostEn_Disable);
+ *     if (result == MAX14720_ERROR) printf("Error communicating with MAX14720");
+ *     result = max14720.boostVSet(MAX14720::BoostVSet_45);
+ *     if (result == MAX14720_ERROR) printf("Error communicating with MAX14720");
+ *     result = max14720.boostEn(MAX14720::BoostEn_Enable);
+ *     if (result == MAX14720_ERROR) printf("Error communicating with MAX14720");
+ * 
+ *	   while (1) {
+ *     }
+ * }
+ * @endcode
+ */
+
 #define MAX14720_NO_ERROR   0
 #define MAX14720_ERROR      -1