動作確認済み
GMD.hpp@0:010c6f6ac7c0, 2016-07-01 (annotated)
- Committer:
- inst
- Date:
- Fri Jul 01 06:29:36 2016 +0000
- Revision:
- 0:010c6f6ac7c0
??
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
inst | 0:010c6f6ac7c0 | 1 | #ifndef INCLUDED_GMD_H |
inst | 0:010c6f6ac7c0 | 2 | #define INCLUDED_GMD_H |
inst | 0:010c6f6ac7c0 | 3 | |
inst | 0:010c6f6ac7c0 | 4 | #include "mbed.h" |
inst | 0:010c6f6ac7c0 | 5 | #include "FastPWM.h" |
inst | 0:010c6f6ac7c0 | 6 | |
inst | 0:010c6f6ac7c0 | 7 | class GMD { |
inst | 0:010c6f6ac7c0 | 8 | public: |
inst | 0:010c6f6ac7c0 | 9 | GMD(PinName p0, PinName p1, PinName shut_down); |
inst | 0:010c6f6ac7c0 | 10 | void set_frequency_kHz(float f_kHz); |
inst | 0:010c6f6ac7c0 | 11 | |
inst | 0:010c6f6ac7c0 | 12 | float operator=(float p); |
inst | 0:010c6f6ac7c0 | 13 | float set(float p); |
inst | 0:010c6f6ac7c0 | 14 | void release(); |
inst | 0:010c6f6ac7c0 | 15 | |
inst | 0:010c6f6ac7c0 | 16 | private: |
inst | 0:010c6f6ac7c0 | 17 | static const float _frequency_to_tick_coeff; |
inst | 0:010c6f6ac7c0 | 18 | static const uint32_t _default_frequency_kHz; |
inst | 0:010c6f6ac7c0 | 19 | static const float _duty_upper_limit; |
inst | 0:010c6f6ac7c0 | 20 | static const float _duty_lower_limit; |
inst | 0:010c6f6ac7c0 | 21 | |
inst | 0:010c6f6ac7c0 | 22 | FastPWM* _pwm[2]; |
inst | 0:010c6f6ac7c0 | 23 | DigitalOut _shut_down; |
inst | 0:010c6f6ac7c0 | 24 | }; |
inst | 0:010c6f6ac7c0 | 25 | |
inst | 0:010c6f6ac7c0 | 26 | #endif |