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