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 <peter.bigot@nordicsemi.no>
This commit is contained in:
parent
204612b3b2
commit
a4337bde28
1 changed files with 3 additions and 3 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue