動作確認済み

Dependents:   NewMD2 NewMD3

Revision:
0:010c6f6ac7c0
Child:
1:b85088467ae0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/GMD.hpp	Fri Jul 01 06:29:36 2016 +0000
@@ -0,0 +1,26 @@
+#ifndef INCLUDED_GMD_H
+#define INCLUDED_GMD_H
+
+#include "mbed.h"
+#include "FastPWM.h"
+
+class GMD {
+public:
+    GMD(PinName p0, PinName p1, PinName shut_down);
+    void set_frequency_kHz(float f_kHz);
+    
+    float operator=(float p);
+    float set(float p);
+    void release();
+    
+private:
+    static const float _frequency_to_tick_coeff;
+    static const uint32_t _default_frequency_kHz;
+    static const float _duty_upper_limit;
+    static const float _duty_lower_limit;
+
+    FastPWM* _pwm[2];
+    DigitalOut _shut_down;
+};
+
+#endif