Test program for DS1683, Maxim Total-Elapsed-Time and Event Recorder with Alarm.

Dependencies:   DS1683 mbed vt100

Revision:
4:8fac856f8a67
Parent:
3:7043500e6f93
--- a/testDS1683.cpp	Wed Apr 12 07:24:02 2017 +0000
+++ b/testDS1683.cpp	Fri Apr 14 06:55:25 2017 +0000
@@ -89,23 +89,26 @@
     tty = new vt100(57600) ;
     DigitalIn tmpIn(P2_5, PullUp) ;
     DigitalOut tmpOut(P1_2) ;
+        ds1683 = new DS1683(
+        PIN_SDA,  /* I2C SDA */
+        PIN_SCL,  /* I2C SCL */
+        P1_2,     /* event GPIO output */ /* MAX32600 only */
+        P2_5, /* alarm interrupt */
+        MSU_DS1683_ADDRESS ) ; /* 0x6B as 7bit address */
 #else
     tty = new vt100() ;
     DigitalIn tmpIn(PIN_INT0, PullUp) ;
     DigitalOut tmpOut(PIN_AN0) ;
-#endif
-    tty->cls() ;
-
-    
-    ds1683 = new DS1683(
+        ds1683 = new DS1683(
         PIN_SDA,  /* I2C SDA */
         PIN_SCL,  /* I2C SCL */
- //       PIN_AN0,  /* event GPIO output */
-        P1_2,      /* MAX32600 only */
-//        PIN_INT0, /* alarm interrupt */
-        P2_5,
+        PIN_AN0,  /* event GPIO output */
+        PIN_INT0, /* alarm interrupt */
         MSU_DS1683_ADDRESS ) ; /* 0x6B as 7bit address */
+#endif
+
     ds1683->enterPW(0xFFFFFFFF) ;
+    tty->cls() ;
 }
 
 /* test Elapsed Time Counter */