summaryrefslogtreecommitdiff
path: root/ppmsum.h
blob: efc7287aebb9b8d98821d6762a05d36cbefcfe44 (plain)
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
#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;
		
		void irq();
	
	public:
		PPMSum() {
			self = this;
		}
		
		bool synced;
		uint16_t channels[16];
		
		void enable();
};

#endif