a
Dependencies: mbed
Diff: PPM/PPMIn.h
- Revision:
- 0:f0b20f502059
diff -r 000000000000 -r f0b20f502059 PPM/PPMIn.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/PPM/PPMIn.h Thu May 24 10:19:44 2018 +0000 @@ -0,0 +1,29 @@ +#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