diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-04-22 08:41:15 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-04-22 08:41:15 -0600 |
commit | 4c0502234f156d9d21bd7c6d20d1002908ef65ed (patch) | |
tree | 6a13bc4e717c3a286263044416c29408e4a95278 /apps/examples/serialrx | |
parent | df35eaf6baa09ada64775e6f759b74329f0bf908 (diff) | |
download | nuttx-4c0502234f156d9d21bd7c6d20d1002908ef65ed.tar.gz nuttx-4c0502234f156d9d21bd7c6d20d1002908ef65ed.tar.bz2 nuttx-4c0502234f156d9d21bd7c6d20d1002908ef65ed.zip |
examples/serialrx added by Bob Doison
Diffstat (limited to 'apps/examples/serialrx')
-rw-r--r-- | apps/examples/serialrx/Kconfig | 2 | ||||
-rw-r--r-- | apps/examples/serialrx/Makefile | 1 | ||||
-rw-r--r-- | apps/examples/serialrx/send.py | 1 | ||||
-rw-r--r-- | apps/examples/serialrx/serialrx_main.c | 12 |
4 files changed, 7 insertions, 9 deletions
diff --git a/apps/examples/serialrx/Kconfig b/apps/examples/serialrx/Kconfig index c88591b14..ddced0ee5 100644 --- a/apps/examples/serialrx/Kconfig +++ b/apps/examples/serialrx/Kconfig @@ -7,7 +7,7 @@ config EXAMPLES_SERIALRX bool "Serial Rx example" default n ---help--- - Enable the serial rx example + Enable the serial RX example if EXAMPLES_SERIALRX endif diff --git a/apps/examples/serialrx/Makefile b/apps/examples/serialrx/Makefile index 66617d456..d99fd44a5 100644 --- a/apps/examples/serialrx/Makefile +++ b/apps/examples/serialrx/Makefile @@ -107,4 +107,3 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep - diff --git a/apps/examples/serialrx/send.py b/apps/examples/serialrx/send.py index 54f07b621..366bd9da0 100644 --- a/apps/examples/serialrx/send.py +++ b/apps/examples/serialrx/send.py @@ -18,4 +18,3 @@ while(True): #sleep(0.050) sys.stdout.write(".") sys.stdout.flush() - diff --git a/apps/examples/serialrx/serialrx_main.c b/apps/examples/serialrx/serialrx_main.c index bd4207695..4ff672098 100644 --- a/apps/examples/serialrx/serialrx_main.c +++ b/apps/examples/serialrx/serialrx_main.c @@ -51,10 +51,15 @@ * Pre-processor Definitions ****************************************************************************/ +#undef BUFFERED_IO +#define CHUNK 960 + /**************************************************************************** * Private Data ****************************************************************************/ +static int count = 0; + /**************************************************************************** * Public Functions ****************************************************************************/ @@ -63,12 +68,9 @@ * serloop_main ****************************************************************************/ -//#define BUFFERED_IO -#define CHUNK 960 -static int count = 0; int serialrx_main(int argc, char *argv[]) { - FAR char *buf = (char *)malloc(CHUNK*3); + FAR char *buf = (FAR char *)malloc(CHUNK*3); FAR FILE *f; printf("Reading from %s\n", argv[1]); f = fopen(argv[1], "r"); @@ -89,7 +91,5 @@ int serialrx_main(int argc, char *argv[]) } free(buf); - return 0; } - |