diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-02-15 19:12:19 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-02-15 19:12:19 +0000 |
commit | a19935519175396ad04c034a97af3bbcde3dfc51 (patch) | |
tree | b0c0e8da816add9497ffcdf42c3cb423fe238388 /apps/examples/qencoder/qe.h | |
parent | 8b265a45d9b5d840b563321941c632bd3b2c3963 (diff) | |
download | nuttx-a19935519175396ad04c034a97af3bbcde3dfc51.tar.gz nuttx-a19935519175396ad04c034a97af3bbcde3dfc51.tar.bz2 nuttx-a19935519175396ad04c034a97af3bbcde3dfc51.zip |
Extend the Quad Encoder test
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4396 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/examples/qencoder/qe.h')
-rw-r--r-- | apps/examples/qencoder/qe.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/apps/examples/qencoder/qe.h b/apps/examples/qencoder/qe.h index 8b9035604..1571da7b2 100644 --- a/apps/examples/qencoder/qe.h +++ b/apps/examples/qencoder/qe.h @@ -55,6 +55,10 @@ * and this value is ignored. Otherwise, this number of samples is * collected and the program terminates. Default: Samples are collected * indefinitely. + * CONFIG_EXAMPLES_QENCODER_DELAY - This value provides the delay (in + * milliseonds) between each sample. If CONFIG_NSH_BUILTIN_APPS + * is defined, then this value is the default delay if no other delay is + * provided on the command line. Default: 100 milliseconds */ #ifndef CONFIG_QENCODER @@ -65,6 +69,10 @@ # define CONFIG_EXAMPLES_QENCODER_DEVPATH "/dev/qe0" #endif +#ifndef CONFIG_EXAMPLES_QENCODER_DELAY +# define CONFIG_EXAMPLES_QENCODER_DELAY 100 +#endif + /* Debug ********************************************************************/ #ifdef CONFIG_CPP_HAVE_VARARGS @@ -92,8 +100,9 @@ #ifdef CONFIG_NSH_BUILTIN_APPS struct qe_example_s { - bool reset; - int nloops; + bool reset; /* True: set the count back to zero */ + unsigned int nloops; /* Collect this number of samples */ + unsigned int delay; /* Delay this number of seconds between samples */ }; #endif |