Akinori Hashimoto / myTimer

Dependents:   DetectFreqAboveTH RN41

Revision:
5:c9304777ce1a
Parent:
4:2f7a8e62597a
Child:
6:4cb4eea64805
--- a/myTimer.cpp	Thu Nov 05 04:02:28 2015 +0000
+++ b/myTimer.cpp	Tue Mar 29 10:50:26 2016 +0000
@@ -43,6 +43,22 @@
 
     return ans;
 }
+int myTimer::read_us(bool _START, bool _RESET, bool _STOP)
+{
+    int ans= 0;
+    if(_STOP)
+        this->stop();
+
+    ans= this->timer.read_us();
+
+    if(_RESET)
+        this->reset();
+
+    if(_START)
+        this->start();
+
+    return ans;
+}
 
 void myTimer::wait_ms(int waitTime, bool _START, bool _RESET, bool _STOP)
 {