summaryrefslogtreecommitdiff
path: root/apps/examples/pwm/pwm.h
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-01-09 18:56:05 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-01-09 18:56:05 +0000
commited93fd7399d11571a4cf214fadcd671a8e2f5d50 (patch)
tree1d92beb75346937900f2fbaf4aeeada000e0720d /apps/examples/pwm/pwm.h
parent547156a0f3f375205e5302432598b83d26bed715 (diff)
downloadnuttx-ed93fd7399d11571a4cf214fadcd671a8e2f5d50.tar.gz
nuttx-ed93fd7399d11571a4cf214fadcd671a8e2f5d50.tar.bz2
nuttx-ed93fd7399d11571a4cf214fadcd671a8e2f5d50.zip
Add pulse count support to apps/examples/pwm
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4286 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/examples/pwm/pwm.h')
-rw-r--r--apps/examples/pwm/pwm.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/apps/examples/pwm/pwm.h b/apps/examples/pwm/pwm.h
index 83d87517c..e15b933fc 100644
--- a/apps/examples/pwm/pwm.h
+++ b/apps/examples/pwm/pwm.h
@@ -53,7 +53,11 @@
* CONFIG_EXAMPLES_PWM_FREQUENCY - The initial PWM frequency. Default: 100 Hz
* CONFIG_EXAMPLES_PWM_DUTYPCT - The initial PWM duty as a percentage. Default: 50%
* CONFIG_EXAMPLES_PWM_DURATION - The initial PWM pulse train duration in sectonds.
- * as a percentage. Default: 5 seconds
+ * as a percentage. Used only if the current pulse count is zero (pulse count
+ * is only supported if CONFIG_PWM_PULSECOUNT is defined). Default: 5 seconds
+ * CONFIG_EXAMPLES_PWM_COUNT - The initial PWM pulse count. This option is
+ * only available if CONFIG_PWM_PULSECOUNT is defined. Default: 0 (i.e., use
+ * the duration, not the count).
*/
#ifndef CONFIG_PWM
@@ -80,6 +84,10 @@
# define CONFIG_EXAMPLES_PWM_DURATION 5
#endif
+#ifndef CONFIG_EXAMPLES_PWM_COUNT
+# define CONFIG_EXAMPLES_PWM_COUNT 0
+#endif
+
/* Debug ********************************************************************/
#ifdef CONFIG_CPP_HAVE_VARARGS