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.
Fork of MotorLib by
Diff: motor.cpp
- Revision:
- 17:86e5af6f7628
- Parent:
- 16:d818c1a4dafb
- Child:
- 22:d2c742bdae16
diff -r d818c1a4dafb -r 86e5af6f7628 motor.cpp --- a/motor.cpp Wed Nov 28 09:44:34 2018 +0000 +++ b/motor.cpp Wed Nov 28 21:04:24 2018 +0000 @@ -1,11 +1,16 @@ #include "motor.h" + + // -------------------- MotStatus Helper --------------------------- + void MotStatus::set(motorCommands aCmd, motorDir aDir, int32_t aNSteps) { cmd = aCmd; dir = aDir; NSteps = aNSteps; }; + // -------------------- Motor Class --------------------------- + Motor::Motor(PinName _MPh[4]) { initialization( _MPh , MOTOR_STEP_TIME_DEFAULT_US); }