summaryrefslogtreecommitdiff
path: root/drivers/ppmsum.h
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2011-11-19 20:02:14 +0100
committerVegard Storheil Eriksen <zyp@jvnv.net>2011-11-19 20:02:14 +0100
commit307cfe164910eccc70c086c083595d637c7fb987 (patch)
treef9845dc9647518840faf469580f581cf65d9fced /drivers/ppmsum.h
parentc265553652444293f90189c7481fb7eb16f28115 (diff)
Moved driver related files to a subdirectory.
Diffstat (limited to 'drivers/ppmsum.h')
-rw-r--r--drivers/ppmsum.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/drivers/ppmsum.h b/drivers/ppmsum.h
new file mode 100644
index 0000000..90bb860
--- /dev/null
+++ b/drivers/ppmsum.h
@@ -0,0 +1,29 @@
+#ifndef PPMSUM_H
+#define PPMSUM_H
+
+#include <stdint.h>
+#include "interrupt.h"
+
+class PPMSum {
+ friend void interrupt<Interrupt::TIM1_UP>();
+ friend void interrupt<Interrupt::TIM1_CC>();
+
+ private:
+ static PPMSum* self;
+
+ uint8_t index;
+
+ void irq();
+
+ public:
+ PPMSum() {
+ self = this;
+ }
+
+ bool synced;
+ uint16_t channels[16];
+
+ void enable();
+};
+
+#endif