diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-09-05 14:54:24 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-09-05 14:54:24 +0000 |
commit | 15a54ae359d342b296b7740dcfaf0580d606b3c6 (patch) | |
tree | b385117ee6197a6f9efcdfe82ad687c801c61bed /demos | |
parent | 986a9d1db14a5d2d4621bd44ece5fd2cfb3482cf (diff) | |
download | ChibiOS-15a54ae359d342b296b7740dcfaf0580d606b3c6.tar.gz ChibiOS-15a54ae359d342b296b7740dcfaf0580d606b3c6.tar.bz2 ChibiOS-15a54ae359d342b296b7740dcfaf0580d606b3c6.zip |
Nil working on M3/M4.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6265 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos')
-rw-r--r-- | demos/nil/NIL-STM32F051-DISCOVERY/main.c | 6 | ||||
-rw-r--r-- | demos/nil/NIL-STM32F051-DISCOVERY/nilconf.h | 7 | ||||
-rw-r--r-- | demos/nil/NIL-STM32F303-DISCOVERY/main.c | 10 | ||||
-rw-r--r-- | demos/nil/NIL-STM32F303-DISCOVERY/nilconf.h | 7 |
4 files changed, 18 insertions, 12 deletions
diff --git a/demos/nil/NIL-STM32F051-DISCOVERY/main.c b/demos/nil/NIL-STM32F051-DISCOVERY/main.c index b27cd5911..d4c17e90a 100644 --- a/demos/nil/NIL-STM32F051-DISCOVERY/main.c +++ b/demos/nil/NIL-STM32F051-DISCOVERY/main.c @@ -79,9 +79,9 @@ THD_FUNCTION(Thread3, arg) { * match NIL_CFG_NUM_THREADS.
*/
THD_TABLE_BEGIN
- THD_TABLE_ENTRY("blinker1", Thread1, NULL, waThread1, sizeof(waThread1))
- THD_TABLE_ENTRY("blinker2", Thread2, NULL, waThread2, sizeof(waThread2))
- THD_TABLE_ENTRY("hello", Thread3, NULL, waThread3, sizeof(waThread3))
+ THD_TABLE_ENTRY(waThread1, "blinker1", Thread1, NULL)
+ THD_TABLE_ENTRY(waThread2, "blinker2", Thread2, NULL)
+ THD_TABLE_ENTRY(waThread3, "hello", Thread3, NULL)
THD_TABLE_END
/*
diff --git a/demos/nil/NIL-STM32F051-DISCOVERY/nilconf.h b/demos/nil/NIL-STM32F051-DISCOVERY/nilconf.h index 2805beb50..5276a3f2a 100644 --- a/demos/nil/NIL-STM32F051-DISCOVERY/nilconf.h +++ b/demos/nil/NIL-STM32F051-DISCOVERY/nilconf.h @@ -59,9 +59,7 @@ *
* @note The default is @p TRUE.
*/
-#if !defined(NIL_CFG_USE_EVENTS) || defined(__DOXYGEN__)
#define NIL_CFG_USE_EVENTS TRUE
-#endif
/**
* @brief System assertions.
@@ -69,6 +67,11 @@ #define NIL_CFG_ENABLE_ASSERTS FALSE
/**
+ * @brief Stack check.
+ */
+#define NIL_CFG_ENABLE_STACK_CHECK FALSE
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
diff --git a/demos/nil/NIL-STM32F303-DISCOVERY/main.c b/demos/nil/NIL-STM32F303-DISCOVERY/main.c index 245e31226..36c3793e0 100644 --- a/demos/nil/NIL-STM32F303-DISCOVERY/main.c +++ b/demos/nil/NIL-STM32F303-DISCOVERY/main.c @@ -65,8 +65,8 @@ THD_FUNCTION(Thread3, arg) { * PA9 and PA10 are routed to USART1.
*/
sdStart(&SD1, NULL);
- palSetPadMode(GPIOA, 9, PAL_MODE_ALTERNATE(1)); /* USART1 TX. */
- palSetPadMode(GPIOA, 10, PAL_MODE_ALTERNATE(1)); /* USART1 RX. */
+ palSetPadMode(GPIOA, 9, PAL_MODE_ALTERNATE(7)); /* USART1 TX. */
+ palSetPadMode(GPIOA, 10, PAL_MODE_ALTERNATE(7)); /* USART1 RX. */
while (true) {
chnWrite(&SD1, (const uint8_t *)"Hello World!\r\n", 14);
@@ -79,9 +79,9 @@ THD_FUNCTION(Thread3, arg) { * match NIL_CFG_NUM_THREADS.
*/
THD_TABLE_BEGIN
- THD_TABLE_ENTRY("blinker1", Thread1, NULL, waThread1, sizeof(waThread1))
- THD_TABLE_ENTRY("blinker2", Thread2, NULL, waThread2, sizeof(waThread2))
- THD_TABLE_ENTRY("hello", Thread3, NULL, waThread3, sizeof(waThread3))
+ THD_TABLE_ENTRY(waThread1, "blinker1", Thread1, NULL)
+ THD_TABLE_ENTRY(waThread2, "blinker2", Thread2, NULL)
+ THD_TABLE_ENTRY(waThread3, "hello", Thread3, NULL)
THD_TABLE_END
/*
diff --git a/demos/nil/NIL-STM32F303-DISCOVERY/nilconf.h b/demos/nil/NIL-STM32F303-DISCOVERY/nilconf.h index 2805beb50..5276a3f2a 100644 --- a/demos/nil/NIL-STM32F303-DISCOVERY/nilconf.h +++ b/demos/nil/NIL-STM32F303-DISCOVERY/nilconf.h @@ -59,9 +59,7 @@ *
* @note The default is @p TRUE.
*/
-#if !defined(NIL_CFG_USE_EVENTS) || defined(__DOXYGEN__)
#define NIL_CFG_USE_EVENTS TRUE
-#endif
/**
* @brief System assertions.
@@ -69,6 +67,11 @@ #define NIL_CFG_ENABLE_ASSERTS FALSE
/**
+ * @brief Stack check.
+ */
+#define NIL_CFG_ENABLE_STACK_CHECK FALSE
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
|