Update comments for duty element in struct pwm_info_s
authorLokesh B V <lokesh.bv@partner.samsung.com>
Fri, 22 Sep 2017 11:22:24 +0000 (16:52 +0530)
committerLokesh B V <lokesh.bv@partner.samsung.com>
Fri, 22 Sep 2017 11:54:55 +0000 (17:24 +0530)
In PWM, 1 is always high and 0 is always low.
If we set a duty cycle to 100%, PWM should be 1 always.
If we set a duty cycle to 50%, PWM should be half 1 and half 0.
If we set a duty cycle to 0%, PWM should be 0 always.

Signed-off-by: Lokesh B V <lokesh.bv@partner.samsung.com>
os/include/tinyara/pwm.h

index 00d71d8..ad98754 100644 (file)
@@ -162,8 +162,9 @@ struct pwm_info_s {
 
 #else
        ub16_t duty;                            /* Duty of the pulse train, "1"-to-"0" duration.
-                                                                * Maximum: 65535/65536 (0x0000ffff)
-                                                                * Minimum:     1/65536 (0x00000001) */
+                                                                * Maximum value is b16ONE. (PWM makes always high)
+                                                                * Minimum value is 0. (PWM makes always low)
+                                                                * pulse width (duty cycle) 50% is b16HALF. (PWM repeats half high, half low) */
 #ifdef CONFIG_PWM_PULSECOUNT
        uint32_t count;                         /* The number of pulse to generate.  0 means to
                                                                 * generate an indefinite number of pulses */