aboutsummaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-09-03 13:21:10 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-09-03 13:21:10 +0000
commitfa8b45cc5be41840b99d4a5468108568f93513c1 (patch)
treee04eb67455a6ad3ec6450e1cc446339060b6d44a /demos
parented4c276d6e9abd145b2a21afb12d58df61876a97 (diff)
downloadChibiOS-fa8b45cc5be41840b99d4a5468108568f93513c1.tar.gz
ChibiOS-fa8b45cc5be41840b99d4a5468108568f93513c1.tar.bz2
ChibiOS-fa8b45cc5be41840b99d4a5468108568f93513c1.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6255 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos')
-rw-r--r--demos/nil/NIL-STM32F051-DISCOVERY/Makefile2
-rw-r--r--demos/nil/NIL-STM32F051-DISCOVERY/main.c19
-rw-r--r--demos/nil/NIL-STM32F051-DISCOVERY/nilconf.h4
3 files changed, 12 insertions, 13 deletions
diff --git a/demos/nil/NIL-STM32F051-DISCOVERY/Makefile b/demos/nil/NIL-STM32F051-DISCOVERY/Makefile
index 47e3d2f8c..efa0f7d96 100644
--- a/demos/nil/NIL-STM32F051-DISCOVERY/Makefile
+++ b/demos/nil/NIL-STM32F051-DISCOVERY/Makefile
@@ -64,7 +64,7 @@ CHIBIOS = ../../..
#include $(CHIBIOS)/os/hal/ports/STM32F0xx/platform.mk
include $(CHIBIOS)/os/nil/nil.mk
#include $(CHIBIOS)/os/rt/osal/osal.mk
-include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f0xx.mk
+include $(CHIBIOS)/os/nil/ports/ARMCMx/compilers/GCC/mk/port_stm32f0xx.mk
#include $(CHIBIOS)/test/test.mk
# Define linker script file here
diff --git a/demos/nil/NIL-STM32F051-DISCOVERY/main.c b/demos/nil/NIL-STM32F051-DISCOVERY/main.c
index 5fcf9da8c..f601b10a4 100644
--- a/demos/nil/NIL-STM32F051-DISCOVERY/main.c
+++ b/demos/nil/NIL-STM32F051-DISCOVERY/main.c
@@ -18,20 +18,19 @@
*/
#include "nil.h"
-#include "hwinit.h"
/*
* Thread 1.
*/
-NIL_WORKING_AREA(waThread1, 128);
-NIL_THREAD(Thread1, arg) {
+THD_WORKING_AREA(waThread1, 128);
+THD_FUNCTION(Thread1, arg) {
(void)arg;
while (true) {
- gpioSetPad(GPIOC, GPIOC_LED4);
+// gpioSetPad(GPIOC, GPIOC_LED4);
nilThdSleepMilliseconds(500);
- gpioClearPad(GPIOC, GPIOC_LED4);
+// gpioClearPad(GPIOC, GPIOC_LED4);
nilThdSleepMilliseconds(500);
}
}
@@ -39,15 +38,15 @@ NIL_THREAD(Thread1, arg) {
/*
* Thread 2.
*/
-NIL_WORKING_AREA(waThread2, 128);
-NIL_THREAD(Thread2, arg) {
+THD_WORKING_AREA(waThread2, 128);
+THD_FUNCTION(Thread2, arg) {
(void)arg;
while (true) {
- gpioSetPad(GPIOC, GPIOC_LED3);
+// gpioSetPad(GPIOC, GPIOC_LED3);
nilThdSleepMilliseconds(250);
- gpioClearPad(GPIOC, GPIOC_LED3);
+// gpioClearPad(GPIOC, GPIOC_LED3);
nilThdSleepMilliseconds(250);
}
}
@@ -71,7 +70,7 @@ int main(void) {
* - HW specific initialization.
* - Nil RTOS initialization.
*/
- hwInit();
+// hwInit();
nilSysInit();
/* This is now the idle thread loop, you may perform here a low priority
diff --git a/demos/nil/NIL-STM32F051-DISCOVERY/nilconf.h b/demos/nil/NIL-STM32F051-DISCOVERY/nilconf.h
index d6d73fad8..30016395f 100644
--- a/demos/nil/NIL-STM32F051-DISCOVERY/nilconf.h
+++ b/demos/nil/NIL-STM32F051-DISCOVERY/nilconf.h
@@ -41,7 +41,7 @@
/**
* @brief System tick frequency.
*/
-#define NIL_CFG_FREQUENCY 50000
+#define NIL_CFG_FREQUENCY 1000
/**
* @brief Time delta constant for the tick-less mode.
@@ -51,7 +51,7 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
-#define NIL_CFG_TIMEDELTA 2
+#define NIL_CFG_TIMEDELTA 0
/**
* @brief System assertions.