Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of MAX14690 by
Revision 1:f8919b0c2052, committed 2016-09-28
- Comitter:
- jbradshaw
- Date:
- Wed Sep 28 17:38:41 2016 +0000
- Parent:
- 0:0e40db4a2b3e
- Child:
- 2:5bcfe7e294b6
- Commit message:
- Added example code in the header file
Changed in this revision
| MAX14720.h | Show annotated file Show diff for this revision Revisions of this file |
--- 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
