Tuk tutoriail

Dependencies:   mbed lib_workshop_2019

Revision:
5:d99659a45cab
Parent:
4:bf5caf4c0c88
Child:
7:c7ff04228b11
diff -r bf5caf4c0c88 -r d99659a45cab src/test_motor/ft_run_motor.cpp
--- a/src/test_motor/ft_run_motor.cpp	Wed Oct 23 19:25:12 2019 +0000
+++ b/src/test_motor/ft_run_motor.cpp	Thu Oct 24 03:54:20 2019 +0000
@@ -1,6 +1,13 @@
 #include "mbed.h"
 #include "test_motor.h"
 
+/**********************************************************************/
+/**                         ft_run_motor                             **/
+/* Args :   - direction (e_direction): direction to turn the motor    */
+/*          - duty_cycle (double): duty cycle for the PWM             */
+/*          - pwm_mot (PwmOut): pin to set the PWM                    */
+/*          - dirA and dirB (DigitalOut): Pins to set the direction   */
+/**********************************************************************/
 void ft_run_motor(  e_direction direction, double duty_cycle,
                     PwmOut pwm_mot, DigitalOut  dirA, DigitalOut  dirB)
 {
@@ -18,5 +25,6 @@
         dirB = 1;  
     }
     
+    /* TO DO : apply duty cycle to pwm_mot */
     pwm_mot = duty_cycle;
 }