1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
#ifndef PPMSUM_H #define PPMSUM_H #include <stdint.h> #include <timer/timer.h> #include <interrupt/interrupt.h> class PPMSum { friend void interrupt<Interrupt::TIM2>(); private: static PPMSum* self; uint8_t index; void irq(); public: PPMSum() { self = this; } bool synced; uint16_t channels[16]; void enable(); }; #endif