summaryrefslogtreecommitdiff
path: root/ppmsum.h
diff options
context:
space:
mode:
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