diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-07-23 13:51:02 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-07-23 13:51:02 +0000 |
commit | fa64f08fc1ad45d0984828695697f6abde7e8ffd (patch) | |
tree | 6d7c116760540a13a3e87c2b512dff4618de196f /demos | |
parent | 30895b26766443c620dfe5a5aabc90fc8c53c7f8 (diff) | |
download | ChibiOS-fa64f08fc1ad45d0984828695697f6abde7e8ffd.tar.gz ChibiOS-fa64f08fc1ad45d0984828695697f6abde7e8ffd.tar.bz2 ChibiOS-fa64f08fc1ad45d0984828695697f6abde7e8ffd.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6024 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos')
-rw-r--r-- | demos/ARMCM4-STM32F303-DISCOVERY/chconf.h | 8 | ||||
-rw-r--r-- | demos/ARMCM4-STM32F303-DISCOVERY/main.c | 31 |
2 files changed, 34 insertions, 5 deletions
diff --git a/demos/ARMCM4-STM32F303-DISCOVERY/chconf.h b/demos/ARMCM4-STM32F303-DISCOVERY/chconf.h index 087f18295..a2fa7a697 100644 --- a/demos/ARMCM4-STM32F303-DISCOVERY/chconf.h +++ b/demos/ARMCM4-STM32F303-DISCOVERY/chconf.h @@ -414,12 +414,12 @@ * @details If enabled then a field is added to the @p thread_t structure that
* counts the system ticks occurred while executing the thread.
*
- * @note The default is @p TRUE.
- * @note This debug option is defaulted to TRUE because it is required by
- * some test cases into the test suite.
+ * @note The default is @p FALSE.
+ * @note This debug option is not currently compatible with the
+ * tickless mode.
*/
#if !defined(CH_DBG_THREADS_PROFILING) || defined(__DOXYGEN__)
-#define CH_DBG_THREADS_PROFILING TRUE
+#define CH_DBG_THREADS_PROFILING FALSE
#endif
/** @} */
diff --git a/demos/ARMCM4-STM32F303-DISCOVERY/main.c b/demos/ARMCM4-STM32F303-DISCOVERY/main.c index a72c1a72c..ed10165af 100644 --- a/demos/ARMCM4-STM32F303-DISCOVERY/main.c +++ b/demos/ARMCM4-STM32F303-DISCOVERY/main.c @@ -18,6 +18,7 @@ #include "hal.h"
#include "test.h"
+#if 0
/*
* This is a periodic thread that does absolutely nothing except flashing LEDs.
*/
@@ -53,6 +54,33 @@ static msg_t Thread1(void *arg) { palClearPad(GPIOE, GPIOE_LED4_BLUE);
}
}
+#endif
+
+static WORKING_AREA(waThread1, 128);
+static msg_t Thread1(void *arg) {
+
+ (void)arg;
+ chRegSetThreadName("blinker1");
+ while (TRUE) {
+ palSetPad(GPIOE, GPIOE_LED3_RED);
+ chThdSleepMilliseconds(250);
+ palClearPad(GPIOE, GPIOE_LED3_RED);
+ chThdSleepMilliseconds(250);
+ }
+}
+
+static WORKING_AREA(waThread2, 128);
+static msg_t Thread2(void *arg) {
+
+ (void)arg;
+ chRegSetThreadName("blinker2");
+ while (TRUE) {
+ palSetPad(GPIOE, GPIOE_LED4_BLUE);
+ chThdSleepMilliseconds(500);
+ palClearPad(GPIOE, GPIOE_LED4_BLUE);
+ chThdSleepMilliseconds(500);
+ }
+}
/*
* Application entry point.
@@ -80,7 +108,8 @@ int main(void) { /*
* Creates the example thread.
*/
- chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
+ chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO+1, Thread1, NULL);
+ chThdCreateStatic(waThread2, sizeof(waThread2), NORMALPRIO+2, Thread2, NULL);
/*
* Normal main() thread activity, in this demo it does nothing except
|