Read modify and generate PPM
Fork of PPM by
Diff: PPMIn.h
- Revision:
- 1:3649456c67ef
diff -r ab42e541f04d -r 3649456c67ef PPMIn.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/PPMIn.h Fri Jun 09 08:34:42 2017 +0000 @@ -0,0 +1,31 @@ +#ifndef CH_PPM_IN +#define CH_PPM_IN + + + +class PpmIn +{ + public: + + static const uint8_t CHANNELS = 8; + + uint16_t period; + uint16_t channels[CHANNELS+2]; + bool state; + + PpmIn(PinName pin); + + uint16_t* getPpm(); + void rise(); + + + protected: + InterruptIn ppm; + Serial pc_com; + Timer timer; + uint8_t current_channel; + + +}; + +#endif \ No newline at end of file