summaryrefslogtreecommitdiff
path: root/ppmsum.h
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2011-07-03 17:11:47 +0200
committerVegard Storheil Eriksen <zyp@jvnv.net>2011-07-03 17:11:47 +0200
commit865a74dd0f02b46c6cc37a5c33314baaf90fa6e2 (patch)
tree85ead7b9ae9dbbf476b587a31328530183550688 /ppmsum.h
parent4cdc0c7e9827b06ccb6ee96784b71d54b27017b3 (diff)
Moved peripheral classes to seperate files.
Diffstat (limited to 'ppmsum.h')
-rw-r--r--ppmsum.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/ppmsum.h b/ppmsum.h
new file mode 100644
index 0000000..3c4ce79
--- /dev/null
+++ b/ppmsum.h
@@ -0,0 +1,26 @@
+#ifndef PPMSUM_H
+#define PPMSUM_H
+
+#include <stdint.h>
+#include "interrupt.h"
+
+class PPMSum {
+ friend void interrupt<Interrupt::TIM4>();
+
+ private:
+ static PPMSum* self;
+
+ uint8_t index;
+ uint16_t channels[16];
+
+ void irq();
+
+ public:
+ PPMSum() {
+ self = this;
+ }
+
+ void enable();
+};
+
+#endif