![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
a
Dependencies: mbed
Fork of GIMBAL_SAMPLE4_PPM by
PPM/PPMIn.h@0:f0b20f502059, 2018-05-24 (annotated)
- Committer:
- halusis
- Date:
- Thu May 24 10:19:44 2018 +0000
- Revision:
- 0:f0b20f502059
AA
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
halusis | 0:f0b20f502059 | 1 | #ifndef CH_PPM_IN |
halusis | 0:f0b20f502059 | 2 | #define CH_PPM_IN |
halusis | 0:f0b20f502059 | 3 | |
halusis | 0:f0b20f502059 | 4 | class PpmIn |
halusis | 0:f0b20f502059 | 5 | { |
halusis | 0:f0b20f502059 | 6 | public: |
halusis | 0:f0b20f502059 | 7 | |
halusis | 0:f0b20f502059 | 8 | static const uint8_t CHANNELS = 8; |
halusis | 0:f0b20f502059 | 9 | |
halusis | 0:f0b20f502059 | 10 | uint16_t period; |
halusis | 0:f0b20f502059 | 11 | uint16_t channels[CHANNELS+2]; |
halusis | 0:f0b20f502059 | 12 | bool state; |
halusis | 0:f0b20f502059 | 13 | |
halusis | 0:f0b20f502059 | 14 | PpmIn(PinName pin); |
halusis | 0:f0b20f502059 | 15 | |
halusis | 0:f0b20f502059 | 16 | uint16_t* getPpm(); |
halusis | 0:f0b20f502059 | 17 | void rise(); |
halusis | 0:f0b20f502059 | 18 | |
halusis | 0:f0b20f502059 | 19 | |
halusis | 0:f0b20f502059 | 20 | protected: |
halusis | 0:f0b20f502059 | 21 | InterruptIn ppm; |
halusis | 0:f0b20f502059 | 22 | //Serial pc_com; |
halusis | 0:f0b20f502059 | 23 | Timer timer; |
halusis | 0:f0b20f502059 | 24 | uint8_t current_channel; |
halusis | 0:f0b20f502059 | 25 | |
halusis | 0:f0b20f502059 | 26 | |
halusis | 0:f0b20f502059 | 27 | }; |
halusis | 0:f0b20f502059 | 28 | |
halusis | 0:f0b20f502059 | 29 | #endif |