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

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


The following commit(s) were added to refs/heads/master by this push:
     new 99b99c8c5 pwm: update channel range with support of 0 and -1
99b99c8c5 is described below

commit 99b99c8c5ea72e927819a0ebdda38ae22a24a4c5
Author: Michal Lenc <michall...@seznam.cz>
AuthorDate: Mon Feb 27 09:30:12 2023 +0100

    pwm: update channel range with support of 0 and -1
    
    PWM drivers support channel numbers 0 (skip the channel) and -1 (skip this
    channel and all following channels). This commit enables usage of this
    numbers in PWM example application.
    
    Signed-off-by: Michal Lenc <michall...@seznam.cz>
---
 examples/pwm/Kconfig | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/examples/pwm/Kconfig b/examples/pwm/Kconfig
index 3b406e3ab..9378003f2 100644
--- a/examples/pwm/Kconfig
+++ b/examples/pwm/Kconfig
@@ -44,7 +44,7 @@ config EXAMPLES_PWM_DUTYPCT1
 config EXAMPLES_PWM_CHANNEL1
        int "First PWM channel number"
        default 1
-       range 1 6
+       range -1 6
        ---help---
                The first PWM channel number.  Default: 1
 
@@ -60,7 +60,7 @@ config EXAMPLES_PWM_DUTYPCT2
 config EXAMPLES_PWM_CHANNEL2
        int "Second PWM channel number"
        default 2
-       range 1 6
+       range -1 6
        ---help---
                The second PWM channel number.  Default: 2
 
@@ -78,7 +78,7 @@ config EXAMPLES_PWM_DUTYPCT3
 config EXAMPLES_PWM_CHANNEL3
        int "Third PWM channel number"
        default 3
-       range 1 6
+       range -1 6
        ---help---
                The third PWM channel number.  Default: 3
 
@@ -96,7 +96,7 @@ config EXAMPLES_PWM_DUTYPCT4
 config EXAMPLES_PWM_CHANNEL4
        int "Fourth PWM channel number"
        default 4
-       range 1 6
+       range -1 6
        ---help---
                The fourth PWM channel number.  Default: 4
 
@@ -114,7 +114,7 @@ config EXAMPLES_PWM_DUTYPCT5
 config EXAMPLES_PWM_CHANNEL5
        int "Fifth PWM channel number"
        default 5
-       range 1 6
+       range -1 6
        ---help---
                The fifth PWM channel number.  Default: 5
 
@@ -129,10 +129,10 @@ config EXAMPLES_PWM_DUTYPCT6
        ---help---
                The sixth PWM duty as a percentage.  Default: 50%
 
-config EXAMPLES_PWM_CHANNEL5
+config EXAMPLES_PWM_CHANNEL6
        int "Sixth PWM channel number"
        default 6
-       range 1 6
+       range -1 6
        ---help---
                The sixth PWM channel number.  Default: 6
 

Reply via email to