examples/serialrx added by Bob Doison
This commit is contained in:
parent
46158be917
commit
c907a27469
@ -892,5 +892,5 @@
|
||||
(2014-4-21).
|
||||
* apps/nshlib: malloc/free IOBUFFER for 'cat' and 'hexdump' commands
|
||||
instead of using the stack. From Bob Doiron (2014-4-21).
|
||||
* apps/examples/cpuhog and serialblaster: Stress test examples added
|
||||
by Bob Doiron (2014-4-22).
|
||||
* apps/examples/cpuhog, serialblaster, and serialrx: Stress test
|
||||
examples added by Bob Doiron (2014-4-22).
|
||||
|
@ -51,6 +51,7 @@ source "$APPSDIR/examples/rgmp/Kconfig"
|
||||
source "$APPSDIR/examples/romfs/Kconfig"
|
||||
source "$APPSDIR/examples/sendmail/Kconfig"
|
||||
source "$APPSDIR/examples/serialblaster/Kconfig"
|
||||
source "$APPSDIR/examples/serialrx/Kconfig"
|
||||
source "$APPSDIR/examples/serloop/Kconfig"
|
||||
source "$APPSDIR/examples/slcd/Kconfig"
|
||||
source "$APPSDIR/examples/flash_test/Kconfig"
|
||||
|
@ -230,6 +230,10 @@ ifeq ($(CONFIG_EXAMPLES_SERIALBLASTER),y)
|
||||
CONFIGURED_APPS += examples/serialblaster
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_EXAMPLES_SERIALRX),y)
|
||||
CONFIGURED_APPS += examples/serialrx
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_EXAMPLES_SERLOOP),y)
|
||||
CONFIGURED_APPS += examples/serloop
|
||||
endif
|
||||
|
@ -42,8 +42,8 @@ SUBDIRS += flash_test ftpc ftpd hello helloxx hidkbd igmp i2schar json
|
||||
SUBDIRS += keypadtest lcdrw mm modbus mount mtdpart nettest nrf24l01_term
|
||||
SUBDIRS += nsh null nx nxconsole nxffs nxflat nxhello nximage nxlines
|
||||
SUBDIRS += nxtext ostest pashello pipe poll posix_spawn pwm qencoder random
|
||||
SUBDIRS += relays rgmp romfs sendmail serialblaster serloop slcd smart
|
||||
SUBDIRS += smart_test tcpecho telnetd thttpd tiff touchscreen udp uip
|
||||
SUBDIRS += relays rgmp romfs sendmail serialblaster serloop serialrx slcd
|
||||
SUBDIRS += smart smart_test tcpecho telnetd thttpd tiff touchscreen udp uip
|
||||
SUBDIRS += usbserial usbterm watchdog wget wgetjson xmlrpc
|
||||
|
||||
|
||||
@ -57,8 +57,9 @@ ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
|
||||
CNTXTDIRS += adc can cc3000 cpuhog cxxtest dhcpd discover flash_test ftpd
|
||||
CNTXTDIRS += hello helloxx i2schar json keypadtestmodbus lcdrw mtdpart
|
||||
CNTXTDIRS += nettest nx nxhello nximage nxlines nxtext nrf24l01_term
|
||||
CNTXTDIRS += ostest random relays qencoder serialblasterslcd smart_test
|
||||
CNTXTDIRS += tcpecho telnetd tiff touchscreen usbterm watchdog wgetjson
|
||||
CNTXTDIRS += ostest random relays qencoder serialblasterslcd serialrx
|
||||
CNTXTDIRS += smart_test tcpecho telnetd tiff touchscreen usbterm watchdog
|
||||
CNTXTDIRS += wgetjson
|
||||
endif
|
||||
|
||||
all: nothing
|
||||
|
@ -1452,7 +1452,14 @@ examples/sendmail
|
||||
examples/serialblaster
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Sends a repeating pattern (the alphabet) out a serial por continuously.
|
||||
Sends a repeating pattern (the alphabet) out a serial port continuously.
|
||||
This may be useful if you are trying run down other problems that you
|
||||
think might only occur when the serial port usage is high.
|
||||
|
||||
examples/serialrx
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
Constant receives serial data. This is the complement to serialblaster.
|
||||
This may be useful if you are trying run down other problems that you
|
||||
think might only occur when the serial port usage is high.
|
||||
|
||||
|
@ -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
|
||||
|
@ -107,4 +107,3 @@ distclean: clean
|
||||
$(call DELFILE, .depend)
|
||||
|
||||
-include Make.dep
|
||||
|
||||
|
@ -18,4 +18,3 @@ while(True):
|
||||
#sleep(0.050)
|
||||
sys.stdout.write(".")
|
||||
sys.stdout.flush()
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user