動作確認済み
Embed:
(wiki syntax)
Show/hide line numbers
GMD.hpp
00001 #ifndef INCLUDED_GMD_H 00002 #define INCLUDED_GMD_H 00003 00004 #include "mbed.h" 00005 #include "FastPWM.h" 00006 00007 template <size_t MIN, size_t MAX> 00008 class GMD { 00009 public: 00010 GMD(PinName p0, PinName p1, PinName shut_down); 00011 void set_frequency_kHz(float f_kHz); 00012 00013 float operator=(float p); 00014 float set(float p); 00015 void release(); 00016 00017 private: 00018 static const float _frequency_to_tick_coeff; 00019 static const uint32_t _default_frequency_kHz; 00020 static const float _threshold; 00021 00022 FastPWM* _pwm[2]; 00023 DigitalOut _shut_down; 00024 }; 00025 00026 #include "GMD_impl.hpp" 00027 00028 typedef GMD<0, 95> basic_motor_driver; 00029 00030 #endif
Generated on Tue Jul 12 2022 21:31:37 by 1.7.2