aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-02-10 13:29:29 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-02-10 13:29:29 +0000
commit12a2f695cfb4de204b5114a958e31689f961b98c (patch)
tree6faac79f3c796a15cf5cf8701f9adffd94f72a92
parentc082a87062ebb9414ec223e9bf7ea8959a717488 (diff)
downloadChibiOS-12a2f695cfb4de204b5114a958e31689f961b98c.tar.gz
ChibiOS-12a2f695cfb4de204b5114a958e31689f961b98c.tar.bz2
ChibiOS-12a2f695cfb4de204b5114a958e31689f961b98c.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6695 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r--demos/nil/NIL-STM32F303-DISCOVERY/main.c12
-rw-r--r--test/nil/test_sequence_000.c2
2 files changed, 10 insertions, 4 deletions
diff --git a/demos/nil/NIL-STM32F303-DISCOVERY/main.c b/demos/nil/NIL-STM32F303-DISCOVERY/main.c
index a6f22dc35..db842415f 100644
--- a/demos/nil/NIL-STM32F303-DISCOVERY/main.c
+++ b/demos/nil/NIL-STM32F303-DISCOVERY/main.c
@@ -19,6 +19,7 @@
#include "hal.h"
#include "nil.h"
+#include "ch_test.h"
/*
* Blinker thread #1.
@@ -92,9 +93,14 @@ THD_FUNCTION(Thread3, arg) {
palSetPadMode(GPIOA, 9, PAL_MODE_ALTERNATE(7)); /* USART1 TX. */
palSetPadMode(GPIOA, 10, PAL_MODE_ALTERNATE(7)); /* USART1 RX. */
+ /* Welcome message.*/
+ chnWrite(&SD1, (const uint8_t *)"Hello World!\r\n", 14);
+
+ /* Waiting for button push and activation of the test suite.*/
while (true) {
- chnWrite(&SD1, (const uint8_t *)"Hello World!\r\n", 14);
- chThdSleepMilliseconds(2000);
+ if (palReadPad(GPIOA, GPIOA_BUTTON))
+ test_execute((BaseSequentialStream *)&SD1);
+ chThdSleepMilliseconds(500);
}
}
@@ -105,7 +111,7 @@ THD_FUNCTION(Thread3, arg) {
THD_TABLE_BEGIN
THD_TABLE_ENTRY(waThread1, "blinker1", Thread1, NULL)
THD_TABLE_ENTRY(waThread2, "blinker2", Thread2, NULL)
- THD_TABLE_ENTRY(waThread3, "hello", Thread3, NULL)
+ THD_TABLE_ENTRY(waThread3, "tester", Thread3, NULL)
THD_TABLE_END
/*
diff --git a/test/nil/test_sequence_000.c b/test/nil/test_sequence_000.c
index 7b56a3908..a61ce4108 100644
--- a/test/nil/test_sequence_000.c
+++ b/test/nil/test_sequence_000.c
@@ -129,7 +129,7 @@ static void test_000_001_execute(void) {
test_set_step(3);
{
time = chVTGetSystemTimeX();
- chThdSleepMicroseconds(100);
+ chThdSleepMilliseconds(100);
test_assert_time_window(time + MS2ST(100),
time + MS2ST(100) + 1,
"out of time window");