Support Locked Anti-Phase PWM
Revision 1:727b2172d97c, committed 2016-01-19
- Comitter:
- tknara
- Date:
- Tue Jan 19 11:53:16 2016 +0000
- Parent:
- 0:0f53faf3b186
- Commit message:
- ok
Changed in this revision
| Motor.cpp | Show annotated file Show diff for this revision Revisions of this file |
| Motor.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/Motor.cpp Tue Jan 19 11:29:43 2016 +0000
+++ b/Motor.cpp Tue Jan 19 11:53:16 2016 +0000
@@ -2,7 +2,7 @@
#include "mbed.h"
-motor::motor(PinName PWM, PinName fwd, PinName rev ,float period ,int select):
+MOTOR::MOTOR(PinName PWM, PinName fwd, PinName rev ,float period ,int select):
pwm(PWM), cw(fwd), ccw(rev)
{
pwm.period(period);
@@ -17,7 +17,7 @@
}
}
-void motor::speed(float speed)
+void MOTOR::speed(float speed)
{
if(mode == 0) {
cw = (speed > 0.0);
--- a/Motor.h Tue Jan 19 11:29:43 2016 +0000
+++ b/Motor.h Tue Jan 19 11:53:16 2016 +0000
@@ -7,9 +7,9 @@
*
* with an H-bridge using a PwmOut and 2 DigitalOuts
*/
-class motor {
+class MOTOR {
public:
- motor(PinName PWM, PinName fwd, PinName rev,float period,int select);
+ MOTOR(PinName PWM, PinName fwd, PinName rev,float period,int select);
/** Set the mode of the Motor driver
*
*select>0 = LAP