Used to read incoming PWM signals from RC channels

Dependents:   A-Quad

Revision:
3:c98b23d53e42
diff -r 4abac72addb7 -r c98b23d53e42 RC.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/RC.h	Tue Aug 27 09:32:34 2013 +0000
@@ -0,0 +1,24 @@
+#ifndef RC_H
+#define RC_H
+
+#include "mbed.h"
+ 
+class RC
+{
+    public:
+        RC(PinName p);
+        int read(void);
+       
+    private:
+         
+        void rise(void); 
+        void fall(void); 
+        
+        InterruptIn _k;
+        Timer t; 
+        volatile uint16_t _value;
+
+};
+ 
+#endif
+