James Bartholomew / Clock3
Revision:
1:bb3ab1744634
Parent:
0:293ea2789df6
--- a/clock.cpp	Thu Apr 11 22:17:06 2019 +0000
+++ b/clock.cpp	Mon Apr 15 14:48:44 2019 +0000
@@ -1,8 +1,9 @@
 #include "mbed.h"
 #include "clock.h"
     bool istick;
+    bool istickdisp;
     Ticker ticker; //class, instance of class
-
+    Ticker tickerDisp;
 void tick()
 {
     istick=true;
@@ -22,4 +23,24 @@
     }
     return false;
 }
+
+
+void tickdisp()
+{
+    istickdisp=true;
+}
+
+void set_tick_disp(float set_tickdisp) //constructor
+{   //used to setup the clock
+    tickerDisp.attach(&tickdisp, set_tickdisp);
+}
     
+bool tockdisp()
+{   //used to run the code 
+    if (istickdisp)
+    {
+    istickdisp =false;
+    return true;
+    }
+    return false;
+}