max32630

Dependencies:   OLED USBDevice max32630fthr

Fork of FTHR_OLED by Greg Steiert

Files at this revision

API Documentation at this revision

Comitter:
switches
Date:
Fri Nov 11 21:08:36 2016 +0000
Child:
1:6923b075c8d7
Commit message:
Basic blinky demo with development libraries for MAX32630FTHR

Changed in this revision

USBDevice.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
pegasus_dev.lib Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/USBDevice.lib	Fri Nov 11 21:08:36 2016 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/teams/MaximIntegrated/code/USBDevice/#c5e178adb138
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Nov 11 21:08:36 2016 +0000
@@ -0,0 +1,29 @@
+#include "mbed.h"
+
+#define MAX14690_I2C_ADDR    0x50
+
+DigitalOut led1(LED1);
+I2C i2cm2(P5_7, P6_0);
+
+
+// main() runs in its own thread in the OS
+// (note the calls to Thread::wait below for delays)
+int main()
+{
+    char data[5];
+    data[0] = 0x14; // I2C address for first register (LDO2 CFG)
+    data[1] = 0x00; // Dissable LDO2
+    data[2] = 0x19; // Set voltage to 3.3V
+    data[3] = 0x00; // Dissable LDO3
+    data[4] = 0x19; // Set voltage to 3.3V
+    i2cm2.write(MAX14690_I2C_ADDR, data, 5);
+    data[1] = 0x02; // Enable LDO2
+    data[3] = 0x02; // Enable LDO3
+    i2cm2.write(MAX14690_I2C_ADDR, data, 5);
+
+    while (true) {
+        led1 = !led1;
+        Thread::wait(500);
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pegasus_dev.lib	Fri Nov 11 21:08:36 2016 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/users/switches/code/pegasus_dev/#5c4d7b2438d3