diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2016-03-04 14:25:48 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2016-03-04 14:25:48 +0000 |
commit | 572f22cd20c155c6a75485335892a5ab8a27903c (patch) | |
tree | f838318fc09f09264b79cb124096131911d2bd3c /demos | |
parent | 81b60dab38bad8213a7167d016eb49318ad7df16 (diff) | |
download | ChibiOS-572f22cd20c155c6a75485335892a5ab8a27903c.tar.gz ChibiOS-572f22cd20c155c6a75485335892a5ab8a27903c.tar.bz2 ChibiOS-572f22cd20c155c6a75485335892a5ab8a27903c.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9010 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos')
-rw-r--r-- | demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/Makefile | 2 | ||||
-rw-r--r-- | demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/main.c | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/Makefile b/demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/Makefile index 87ddba648..8a4a876f1 100644 --- a/demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/Makefile +++ b/demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/Makefile @@ -98,7 +98,7 @@ include $(CHIBIOS)/os/hal/osal/rt/osal.mk include $(CHIBIOS)/os/rt/rt.mk
include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
# Other files (optional).
-include $(CHIBIOS)/test/rt/test.mk
+include $(CHIBIOS)/test/nasa_osal/test.mk
include $(CHIBIOS)/os/common/abstractions/nasa_osal/nasa_osal.mk
# Define linker script file here
diff --git a/demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/main.c b/demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/main.c index ba102be73..c17109ff1 100644 --- a/demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/main.c +++ b/demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/main.c @@ -15,6 +15,7 @@ */
#include "hal.h"
+#include "ch_test.h"
#include "osapi.h"
/*
@@ -62,9 +63,10 @@ int main(void) { /* In the ChibiOS/RT OSAL implementation the main() function is an
usable thread with priority 128 (NORMALPRIO), here we just sleep
- in a loop printing a message on the serial port.*/
+ waiting for a button event, then the test suite is executed.*/
while (true) {
- sdWrite(&SD2, (uint8_t *)"Hello World!\r\n", 14);
+ if (palReadLine(LINE_BUTTON))
+ test_execute((BaseSequentialStream *)&SD2);
OS_TaskDelay(500);
}
}
|