diff options
Diffstat (limited to 'demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/main.c')
-rw-r--r-- | demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/main.c | 6 |
1 files changed, 4 insertions, 2 deletions
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);
}
}
|