2012-04-06 18:33:17 +02:00
|
|
|
#
|
|
|
|
# For a description of the syntax of this configuration file,
|
2015-06-28 16:14:53 +02:00
|
|
|
# see the file kconfig-language.txt in the NuttX tools repository.
|
2012-04-06 18:33:17 +02:00
|
|
|
#
|
2012-04-13 04:14:09 +02:00
|
|
|
|
|
|
|
config EXAMPLES_PWM
|
2018-09-03 17:29:56 +02:00
|
|
|
tristate "Pulse width modulation (PWM) example"
|
2012-04-13 04:14:09 +02:00
|
|
|
default n
|
2016-12-05 21:55:41 +01:00
|
|
|
depends on PWM && NSH_BUILTIN_APPS
|
2012-04-13 04:14:09 +02:00
|
|
|
---help---
|
|
|
|
Enable the Pulse width modulation (PWM) example
|
|
|
|
|
|
|
|
if EXAMPLES_PWM
|
2012-04-16 00:31:05 +02:00
|
|
|
|
|
|
|
config EXAMPLES_PWM_DEVPATH
|
|
|
|
string "PWM device path"
|
|
|
|
default "/dev/pwm0"
|
|
|
|
---help---
|
2015-11-01 23:14:18 +01:00
|
|
|
The path to the PWM device. Default: /dev/pwm0
|
2012-04-16 00:31:05 +02:00
|
|
|
|
|
|
|
config EXAMPLES_PWM_FREQUENCY
|
2015-11-01 23:14:18 +01:00
|
|
|
int "Default PWM frequency"
|
2012-04-16 00:31:05 +02:00
|
|
|
default 100
|
|
|
|
---help---
|
|
|
|
The default PWM frequency. Default: 100 Hz
|
|
|
|
|
|
|
|
config EXAMPLES_PWM_DURATION
|
|
|
|
int "Default PWM duration"
|
2013-09-06 02:30:39 +02:00
|
|
|
default 5
|
2012-04-16 00:31:05 +02:00
|
|
|
---help---
|
|
|
|
The default PWM pulse train duration in seconds. Used only if the current
|
2013-09-06 02:30:39 +02:00
|
|
|
pulse count is zero (pulse count is only supported if PWM_PULSECOUNT
|
2015-11-01 23:14:18 +01:00
|
|
|
is not defined). Default: 5 seconds
|
|
|
|
|
|
|
|
if PWM_MULTICHAN
|
|
|
|
|
|
|
|
config EXAMPLES_PWM_DUTYPCT1
|
|
|
|
int "First PWM duty percentage"
|
|
|
|
default 50
|
|
|
|
range 1 99
|
|
|
|
---help---
|
|
|
|
The first PWM duty as a percentage. Default: 50%
|
|
|
|
|
|
|
|
config EXAMPLES_PWM_CHANNEL1
|
|
|
|
int "First PWM channel number"
|
|
|
|
default 1
|
2017-03-09 11:52:37 +01:00
|
|
|
range 1 6
|
2015-11-01 23:14:18 +01:00
|
|
|
---help---
|
|
|
|
The first PWM channel number. Default: 1
|
|
|
|
|
2017-03-09 11:52:37 +01:00
|
|
|
if PWM_NCHANNELS = 2 || PWM_NCHANNELS = 3 || PWM_NCHANNELS = 4 || PWM_NCHANNELS = 5 || PWM_NCHANNELS = 6
|
2015-11-01 23:14:18 +01:00
|
|
|
|
|
|
|
config EXAMPLES_PWM_DUTYPCT2
|
|
|
|
int "Second PWM duty percentage"
|
|
|
|
default 50
|
|
|
|
range 1 99
|
|
|
|
---help---
|
|
|
|
The second PWM duty as a percentage. Default: 50%
|
|
|
|
|
|
|
|
config EXAMPLES_PWM_CHANNEL2
|
|
|
|
int "Second PWM channel number"
|
|
|
|
default 2
|
2017-03-09 11:52:37 +01:00
|
|
|
range 1 6
|
2015-11-01 23:14:18 +01:00
|
|
|
---help---
|
|
|
|
The second PWM channel number. Default: 2
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
2017-03-09 11:52:37 +01:00
|
|
|
if PWM_NCHANNELS = 3 || PWM_NCHANNELS = 4 || PWM_NCHANNELS = 5 || PWM_NCHANNELS = 6
|
2015-11-01 23:14:18 +01:00
|
|
|
|
|
|
|
config EXAMPLES_PWM_DUTYPCT3
|
|
|
|
int "Third PWM duty percentage"
|
|
|
|
default 50
|
|
|
|
range 1 99
|
|
|
|
---help---
|
|
|
|
The third PWM duty as a percentage. Default: 50%
|
|
|
|
|
|
|
|
config EXAMPLES_PWM_CHANNEL3
|
|
|
|
int "Third PWM channel number"
|
|
|
|
default 3
|
2017-03-09 11:52:37 +01:00
|
|
|
range 1 6
|
2015-11-01 23:14:18 +01:00
|
|
|
---help---
|
|
|
|
The third PWM channel number. Default: 3
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
2017-03-09 11:52:37 +01:00
|
|
|
if PWM_NCHANNELS = 4 || PWM_NCHANNELS = 5 || PWM_NCHANNELS = 6
|
2015-11-01 23:14:18 +01:00
|
|
|
|
|
|
|
config EXAMPLES_PWM_DUTYPCT4
|
|
|
|
int "Fourth PWM duty percentage"
|
|
|
|
default 50
|
|
|
|
range 1 99
|
|
|
|
---help---
|
|
|
|
The fourth PWM duty as a percentage. Default: 50%
|
|
|
|
|
|
|
|
config EXAMPLES_PWM_CHANNEL4
|
|
|
|
int "Fourth PWM channel number"
|
|
|
|
default 4
|
2017-03-09 11:52:37 +01:00
|
|
|
range 1 6
|
2015-11-01 23:14:18 +01:00
|
|
|
---help---
|
|
|
|
The fourth PWM channel number. Default: 4
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
2017-03-09 11:52:37 +01:00
|
|
|
if PWM_NCHANNELS = 5 || PWM_NCHANNELS = 6
|
|
|
|
|
|
|
|
config EXAMPLES_PWM_DUTYPCT5
|
|
|
|
int "Fifth PWM duty percentage"
|
|
|
|
default 50
|
|
|
|
range 1 99
|
|
|
|
---help---
|
|
|
|
The fifth PWM duty as a percentage. Default: 50%
|
|
|
|
|
|
|
|
config EXAMPLES_PWM_CHANNEL5
|
|
|
|
int "Fifth PWM channel number"
|
|
|
|
default 5
|
|
|
|
range 1 6
|
|
|
|
---help---
|
|
|
|
The fifth PWM channel number. Default: 5
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
if PWM_NCHANNELS = 6
|
|
|
|
|
|
|
|
config EXAMPLES_PWM_DUTYPCT6
|
|
|
|
int "Sixth PWM duty percentage"
|
|
|
|
default 50
|
|
|
|
range 1 99
|
|
|
|
---help---
|
|
|
|
The sixth PWM duty as a percentage. Default: 50%
|
|
|
|
|
|
|
|
config EXAMPLES_PWM_CHANNEL5
|
|
|
|
int "Sixth PWM channel number"
|
|
|
|
default 6
|
|
|
|
range 1 6
|
|
|
|
---help---
|
|
|
|
The sixth PWM channel number. Default: 6
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
2015-11-01 23:14:18 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
if !PWM_MULTICHAN
|
|
|
|
|
|
|
|
config EXAMPLES_PWM_DUTYPCT
|
|
|
|
int "Default PWM duty percentage"
|
|
|
|
default 50
|
|
|
|
range 1 99
|
|
|
|
---help---
|
|
|
|
The default PWM duty as a percentage. Default: 50%
|
2012-04-16 00:31:05 +02:00
|
|
|
|
|
|
|
config EXAMPLES_PWM_PULSECOUNT
|
|
|
|
int "Default pulse count"
|
|
|
|
default 0
|
2013-09-06 02:30:39 +02:00
|
|
|
depends on PWM_PULSECOUNT
|
2012-04-16 00:31:05 +02:00
|
|
|
---help---
|
2013-09-06 02:30:39 +02:00
|
|
|
The initial PWM pulse count. This option is only available if
|
2015-11-01 23:14:18 +01:00
|
|
|
PWM_PULSECOUNT is defined. Default: 0 (i.e., use the duration, not
|
2013-09-06 02:30:39 +02:00
|
|
|
the count).
|
2012-04-16 00:31:05 +02:00
|
|
|
|
2012-04-13 04:14:09 +02:00
|
|
|
endif
|
2015-11-01 23:14:18 +01:00
|
|
|
|
|
|
|
endif
|