driver for incremental encoder

Revision:
1:017efde7ab29
Parent:
0:c3a05fe15b84
Child:
2:b82d31306c4b
--- a/decoder.cpp	Tue Jan 08 17:10:13 2019 +0000
+++ b/decoder.cpp	Tue Jan 08 17:29:43 2019 +0000
@@ -82,3 +82,20 @@
     
 }
 
+/**
+* @brief    reset()
+* @details  function to reset all internal counting and directional variables
+* @param    NA
+* @return   
+* @warning  
+* 
+*/
+
+void decoder :: reset(){
+    
+    _oldCount = 0;
+    _count = 0;
+    _direction = 0; 
+       
+}
+