動作確認済み

Dependents:   NewMD2 NewMD3

Committer:
inst
Date:
Thu Aug 11 04:19:27 2016 +0000
Revision:
8:554aecc04774
Parent:
7:c849d9255551
Child:
10:2fa9eeafd727
?????

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 0:010c6f6ac7c0 20
inst 0:010c6f6ac7c0 21 FastPWM* _pwm[2];
inst 0:010c6f6ac7c0 22 DigitalOut _shut_down;
inst 0:010c6f6ac7c0 23 };
inst 0:010c6f6ac7c0 24
inst 1:b85088467ae0 25 #include "GMD_impl.hpp"
inst 1:b85088467ae0 26
inst 5:b3c1c5db8489 27 typedef GMD<0, 95> basic_motor_driver;
inst 8:554aecc04774 28
inst 7:c849d9255551 29 #endif