mbed device driver for Toshiba TB6612FNG motor driver
Dependents: ROBot TB6612FNG_Sample TB6612FNG_Sample
Diff: TB6612FNG.cpp
- Revision:
- 1:8f562bdd5e93
- Parent:
- 0:1a07771ff613
--- a/TB6612FNG.cpp Sun Nov 24 21:47:54 2013 +0000
+++ b/TB6612FNG.cpp Mon Dec 02 03:58:48 2013 +0000
@@ -33,6 +33,12 @@
nStby = SIGNAL_LOW;
}
+void TB6612FNG::setPwmA(float fPeriod, float fPulsewidth)
+{
+ pwmA.period(fPeriod);
+ pwmA = fPulsewidth;
+}
+
void TB6612FNG::setPwmAperiod(float fPeriod)
{
pwmA.period(fPeriod);
@@ -43,6 +49,12 @@
pwmA = fPulsewidth;
}
+void TB6612FNG::setPwmB(float fPeriod, float fPulsewidth)
+{
+ pwmB.period(fPeriod);
+ pwmB = fPulsewidth;
+}
+
void TB6612FNG::setPwmBperiod(float fPeriod)
{
pwmB.period(fPeriod);
@@ -98,3 +110,4 @@
nStby = SIGNAL_HIGH;
}
+