summaryrefslogtreecommitdiff
path: root/ppmsum.h
blob: 3c4ce79ec761c1cc211c21b9b9ea8fcafb30f8e4 (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
#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