This is an automated email from the ASF dual-hosted git repository.

raiden00 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new c4d8bbd190 pwm.h: add comment regarding possible channel numbers
c4d8bbd190 is described below

commit c4d8bbd1907deef7836840dc5996cfdb1bd24eac
Author: Michal Lenc <michall...@seznam.cz>
AuthorDate: Fri Mar 10 20:59:47 2023 +0100

    pwm.h: add comment regarding possible channel numbers
    
    PWM drivers use channel numbers 0 and -1 to skip the channel and/or
    all following channels. This situation is well established in the drivers
    however it was not mentioned in pwm.h file. This commit adds a comment
    mentioning it.
    
    Signed-off-by: Michal Lenc <michall...@seznam.cz>
---
 include/nuttx/timers/pwm.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/include/nuttx/timers/pwm.h b/include/nuttx/timers/pwm.h
index e560117b31..e18b9600d4 100644
--- a/include/nuttx/timers/pwm.h
+++ b/include/nuttx/timers/pwm.h
@@ -64,6 +64,14 @@
  *   debug the PWM driver.
  */
 
+/* Channel Numbers **********************************************************/
+
+/* PWM channels should use numbers from 1 to CONFIG_PWM_NCHANNELS. Channel
+ * number 0 indicates the channel not used and therefore is skipped by
+ * the driver (its output remains at the value defined by the peripheral),
+ * number -1 indicates the channel and all following channels are not used.
+ */
+
 /* IOCTL Commands ***********************************************************/
 
 /* The PWM module uses a standard character driver framework.  However, since

Reply via email to