From a4337bde28c8b0f79d8cc2882bbf872c90a11a9a Mon Sep 17 00:00:00 2001 From: Peter Bigot Date: Mon, 25 May 2020 08:39:59 -0500 Subject: [PATCH] drivers: pwm: clarify behavior As written the specification when both period and pulse are zero is inconsistent: allowed behavior would be to drive the pin at constant active or constant inactive, depending on which condition was checked first. Clarify that driving constant active level requres a non-zero pulse equal to period. Signed-off-by: Peter Bigot --- include/drivers/pwm.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/drivers/pwm.h b/include/drivers/pwm.h index 2a0f01dbfac..b2e29530708 100644 --- a/include/drivers/pwm.h +++ b/include/drivers/pwm.h @@ -60,10 +60,10 @@ __subsystem struct pwm_driver_api { /** * @brief Set the period and pulse width for a single PWM output. * - * Passing 0 to the @p pulse will cause the pin to be driven to a constant + * Passing 0 as @p pulse will cause the pin to be driven to a constant * inactive level. - * Passing a @p pulse equal @p period will cause the pin to be driven - * to a constant active level. + * Passing a non-zero @p pulse equal to @p period will cause the pin + * to be driven to a constant active level. * * @param dev Pointer to the device structure for the driver instance. * @param pwm PWM pin.