Akinori Hashimoto / myTimer

Dependents:   DetectFreqAboveTH RN41

Revision:
6:4cb4eea64805
Parent:
5:c9304777ce1a
diff -r c9304777ce1a -r 4cb4eea64805 myTimer.cpp
--- a/myTimer.cpp	Tue Mar 29 10:50:26 2016 +0000
+++ b/myTimer.cpp	Fri Sep 29 06:46:31 2017 +0000
@@ -69,4 +69,14 @@
     if(_RESET)
         this->reset();
     return;
+}
+void myTimer::wait_us(int waitTime, bool _START, bool _RESET, bool _STOP)
+{
+    int wt= waitTime- this->read_us(_START, _RESET, _STOP);
+    if(wt <= 0)
+        return;
+    ::wait_us(wt);
+    if(_RESET)
+        this->reset();
+    return;
 }
\ No newline at end of file