aboutsummaryrefslogtreecommitdiffstats
path: root/demos/KINETIS/RT-FREEDOM-K20D50M
diff options
context:
space:
mode:
authorutzig <utzig@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-08-07 02:44:09 +0000
committerutzig <utzig@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-08-07 02:44:09 +0000
commit3ff810e5eea0387733022bf5304d4f94265439b0 (patch)
tree479391fc1bccb853b0ca01d79532250a655525c7 /demos/KINETIS/RT-FREEDOM-K20D50M
parent6d80d25b7660cf899829cefc640b6871e7adad02 (diff)
downloadChibiOS-3ff810e5eea0387733022bf5304d4f94265439b0.tar.gz
ChibiOS-3ff810e5eea0387733022bf5304d4f94265439b0.tar.bz2
ChibiOS-3ff810e5eea0387733022bf5304d4f94265439b0.zip
[KINETIS] Add serial support to K20D50M demo + TestThread
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7150 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos/KINETIS/RT-FREEDOM-K20D50M')
-rw-r--r--demos/KINETIS/RT-FREEDOM-K20D50M/halconf.h2
-rw-r--r--demos/KINETIS/RT-FREEDOM-K20D50M/main.c7
-rw-r--r--demos/KINETIS/RT-FREEDOM-K20D50M/mcuconf.h2
3 files changed, 9 insertions, 2 deletions
diff --git a/demos/KINETIS/RT-FREEDOM-K20D50M/halconf.h b/demos/KINETIS/RT-FREEDOM-K20D50M/halconf.h
index 2dfb553e0..2a80fb1f2 100644
--- a/demos/KINETIS/RT-FREEDOM-K20D50M/halconf.h
+++ b/demos/KINETIS/RT-FREEDOM-K20D50M/halconf.h
@@ -125,7 +125,7 @@
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#define HAL_USE_SERIAL TRUE
#endif
/**
diff --git a/demos/KINETIS/RT-FREEDOM-K20D50M/main.c b/demos/KINETIS/RT-FREEDOM-K20D50M/main.c
index 6921a7289..f08b3dbd2 100644
--- a/demos/KINETIS/RT-FREEDOM-K20D50M/main.c
+++ b/demos/KINETIS/RT-FREEDOM-K20D50M/main.c
@@ -16,6 +16,7 @@
#include "ch.h"
#include "hal.h"
+#include "test.h"
static THD_WORKING_AREA(waThread1, 64);
static THD_FUNCTION(Thread1, arg) {
@@ -72,12 +73,18 @@ int main(void) {
chSysInit();
/*
+ * Activates serial 1 (UART0) using the driver default configuration.
+ */
+ sdStart(&SD1, NULL);
+
+ /*
* Creates the blinker threads.
*/
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
chThdCreateStatic(waThread2, sizeof(waThread2), NORMALPRIO, Thread2, NULL);
chThdCreateStatic(waThread3, sizeof(waThread3), NORMALPRIO, Thread3, NULL);
+ TestThread(&SD1);
while (1) {
chThdSleepMilliseconds(500);
}
diff --git a/demos/KINETIS/RT-FREEDOM-K20D50M/mcuconf.h b/demos/KINETIS/RT-FREEDOM-K20D50M/mcuconf.h
index 952b36e62..b9870b60f 100644
--- a/demos/KINETIS/RT-FREEDOM-K20D50M/mcuconf.h
+++ b/demos/KINETIS/RT-FREEDOM-K20D50M/mcuconf.h
@@ -54,4 +54,4 @@
/*
* SERIAL driver system settings.
*/
-#define KINETIS_SERIAL_USE_UART0 FALSE
+#define KINETIS_SERIAL_USE_UART0 TRUE