動作確認済み

Dependents:   NewMD2 NewMD3

Committer:
inst
Date:
Thu Aug 25 04:59:47 2016 +0000
Revision:
10:2fa9eeafd727
Parent:
8:554aecc04774
????????????

Who changed what in which revision?

UserRevisionLine numberNew 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 1:b85088467ae0 7 template <size_t MIN, size_t MAX>
inst 0:010c6f6ac7c0 8 class GMD {
inst 0:010c6f6ac7c0 9 public:
inst 0:010c6f6ac7c0 10 GMD(PinName p0, PinName p1, PinName shut_down);
inst 0:010c6f6ac7c0 11 void set_frequency_kHz(float f_kHz);
inst 0:010c6f6ac7c0 12
inst 0:010c6f6ac7c0 13 float operator=(float p);
inst 0:010c6f6ac7c0 14 float set(float p);
inst 0:010c6f6ac7c0 15 void release();
inst 0:010c6f6ac7c0 16
inst 0:010c6f6ac7c0 17 private:
inst 0:010c6f6ac7c0 18 static const float _frequency_to_tick_coeff;
inst 0:010c6f6ac7c0 19 static const uint32_t _default_frequency_kHz;
inst 10:2fa9eeafd727 20 static const float _threshold;
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 1:b85088467ae0 26 #include "GMD_impl.hpp"
inst 1:b85088467ae0 27
inst 5:b3c1c5db8489 28 typedef GMD<0, 95> basic_motor_driver;
inst 8:554aecc04774 29
inst 7:c849d9255551 30 #endif