![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
a
Dependencies: mbed
Fork of GIMBAL_SAMPLE4_PPM by
Diff: PPM/PPMIn.h
- Revision:
- 0:f0b20f502059
--- /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