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.
Dependencies: USBDevice max32630fthr
Revision 0:59c04ca89ae2, committed 2017-06-18
- Comitter:
- koziniec
- Date:
- Sun Jun 18 03:41:55 2017 +0000
- Child:
- 1:b8cb82927f33
- Commit message:
- no idea
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/USBDevice.lib Sun Jun 18 03:41:55 2017 +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 Sun Jun 18 03:41:55 2017 +0000
@@ -0,0 +1,47 @@
+
+#include "mbed.h"
+#include "max32630fthr.h"
+Serial pc(USBTX, USBRX);
+Serial uart(P5_3, P5_4, 9600);
+I2C i2c(P5_7,P6_0); // SDA, SCL
+
+DigitalOut pc_activity(LED1);
+DigitalOut uart_activity(LED2);
+
+int main() {
+ uart.format(8,Serial::None,1);
+ char data[2];
+ data[0] = 0x1A; //MAX14960 BootCfg register
+ data[1] = 0x30; // Always-On Mode, off state via PWR_OFF_CMD
+ i2c.write( 0x50, data, 2 );
+
+ data[0] = 0x17; //MAX14960 LDO3Vset register
+ data[1] = 0x19; //3.3V
+ i2c.write( 0x50, data, 2 );
+
+ data[0] = 0x16; //MAX14960 LDO3cfg register
+ data[1] = 0xE2; //Enable LDO3
+ i2c.write( 0x50, data, 2 );
+
+ wait(1);
+ while(1) {
+ if(pc.readable()) {
+ uart.putc(pc.getc());
+ pc_activity = !pc_activity;
+ }
+ if(uart.readable()) {
+ pc.putc(uart.getc());
+ uart_activity = !uart_activity;
+ }
+ }
+}
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/max32630fthr.lib Sun Jun 18 03:41:55 2017 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/teams/MaximIntegrated/code/max32630fthr/#60997adf01a2
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed-os.lib Sun Jun 18 03:41:55 2017 +0000 @@ -0,0 +1,1 @@ +https://github.com/ARMmbed/mbed-os/#269f58d75b752a4e67a6a2d8c5c698635ffd6752