From be67ba527fb3ff881e715e19d40ec1e40be4d523 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 22 Apr 2014 10:38:08 -0600 Subject: Misc changes to get a clean compilation after incorporating all of Bob Doison's changes --- apps/examples/cpuhog/Kconfig | 11 ++++++++++- apps/examples/cpuhog/Makefile | 7 +++++-- apps/examples/serialblaster/serialblaster_main.c | 9 ++++++--- apps/examples/serialrx/Kconfig | 9 +++++++++ apps/examples/serialrx/Makefile | 7 +++++-- 5 files changed, 35 insertions(+), 8 deletions(-) (limited to 'apps/examples') diff --git a/apps/examples/cpuhog/Kconfig b/apps/examples/cpuhog/Kconfig index a74074537..a632c4c7d 100644 --- a/apps/examples/cpuhog/Kconfig +++ b/apps/examples/cpuhog/Kconfig @@ -4,10 +4,19 @@ # config EXAMPLES_CPUHOG - bool "CPU Hog" + bool "CPU hog" default n ---help--- Enable the cpuhog example if EXAMPLES_CPUHOG + +config EXAMPLES_CPUHOG_STACKSIZE + int "CPU hog stack size" + default 2048 + +config EXAMPLES_CPUHOG_PRIORITY + int "CPU hog task priority" + default 50 + endif diff --git a/apps/examples/cpuhog/Makefile b/apps/examples/cpuhog/Makefile index 995380b0e..ae3977d13 100644 --- a/apps/examples/cpuhog/Makefile +++ b/apps/examples/cpuhog/Makefile @@ -62,9 +62,12 @@ ROOTDEPPATH = --dep-path . # Built-in application info +ONFIG_EXAMPLES_CPUHOG_PRIORITY ?= 50 +CONFIG_EXAMPLES_CPUHOG_STACKSIZE ?= 2048 + APPNAME = cpuhog -PRIORITY = SCHED_PRIORITY_LOW -STACKSIZE = 1024 +PRIORITY = $(CONFIG_EXAMPLES_CPUHOG_PRIORITY) +STACKSIZE = $(CONFIG_EXAMPLES_CPUHOG_STACKSIZE) # Common build diff --git a/apps/examples/serialblaster/serialblaster_main.c b/apps/examples/serialblaster/serialblaster_main.c index b4421e984..8889c2e30 100644 --- a/apps/examples/serialblaster/serialblaster_main.c +++ b/apps/examples/serialblaster/serialblaster_main.c @@ -68,13 +68,16 @@ static const char s[] = "abcdefghijklmnopqrstuvwxyz"; int serialblaster_main(int argc, char *argv[]) { - while(1) + int ret; + + while (1) { #ifdef BUFFERED_IO - int ret = fputs(s, stdout); + ret = fputs(s, stdout); #else - int ret = write(1, s, sizeof(s)-1); + ret = write(1, s, sizeof(s)-1); #endif + UNUSED(ret); } return 0; diff --git a/apps/examples/serialrx/Kconfig b/apps/examples/serialrx/Kconfig index ddced0ee5..25b3f39e1 100644 --- a/apps/examples/serialrx/Kconfig +++ b/apps/examples/serialrx/Kconfig @@ -10,4 +10,13 @@ config EXAMPLES_SERIALRX Enable the serial RX example if EXAMPLES_SERIALRX + +config EXAMPLES_SERIALRX_STACKSIZE + int "Serial Rx stack size" + default 2048 + +config EXAMPLES_SERIALRX_PRIORITY + int "Serial Rx task priority" + default 50 + endif diff --git a/apps/examples/serialrx/Makefile b/apps/examples/serialrx/Makefile index 66d485b8d..f184f3e2e 100644 --- a/apps/examples/serialrx/Makefile +++ b/apps/examples/serialrx/Makefile @@ -62,9 +62,12 @@ ROOTDEPPATH = --dep-path . # Built-in application info +CONFIG_EXAMPLES_SERIALRX_PRIORITY ?= 50 +CONFIG_EXAMPLES_SERIALRX_STACKSIZE ?= 2048 + APPNAME = serialrx -PRIORITY = SCHED_PRIORITY_LOW -STACKSIZE = 2048 +PRIORITY = $(CONFIG_EXAMPLES_SERIALRX_PRIORITY) +STACKSIZE = $(CONFIG_EXAMPLES_SERIALRX_STACKSIZE) # Common build -- cgit v1.2.3