Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
TB6569.h
00001 // 00002 // TB6569.h 00003 // 00004 // ... Y.Kuroda 00005 // 00006 // 2012.2.1 ... Originally written by Y.Kuroda 00007 // 00008 // 00009 #ifndef _TB6569_H 00010 #define _TB6569_H 00011 00012 class TB6569 00013 { 00014 public: 00015 TB6569(PinName pwm, PinName in1, PinName in2, PinName vref=NC, PinName alert=NC); 00016 00017 void output(void); 00018 void output(int _power); // -100 ... 100 00019 void output(float _power); // -1 ... 1 00020 void short_break(void); 00021 void stop(void); 00022 void reset(void); 00023 void period_us(int usec) { 00024 _pwm.period_us(usec); 00025 }; 00026 void period_ms(int msec) { 00027 _pwm.period_ms(msec); 00028 }; 00029 void current_control(float vref); 00030 int alert(void) { 00031 return _alert; 00032 }; 00033 00034 public: 00035 00036 PwmOut _pwm; // p21, should be one of the following pins p21-p26 00037 DigitalOut _in1; 00038 DigitalOut _in2; 00039 AnalogOut _vref; 00040 DigitalIn _alert; 00041 }; 00042 00043 00044 00045 #endif //_TB6569_H
Generated on Thu Jul 28 2022 01:12:51 by
1.7.2