aboutsummaryrefslogtreecommitdiffstats
path: root/demos/STM32
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2015-03-26 14:09:20 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2015-03-26 14:09:20 +0000
commitfeafc419f94f765b6f17a60bed64b6bb042326a0 (patch)
treefc5c70509d85caaa486698307086e2c3301d98ec /demos/STM32
parent168c39a1b2a5514488c8b62ca1a6e36405fc3087 (diff)
downloadChibiOS-feafc419f94f765b6f17a60bed64b6bb042326a0.tar.gz
ChibiOS-feafc419f94f765b6f17a60bed64b6bb042326a0.tar.bz2
ChibiOS-feafc419f94f765b6f17a60bed64b6bb042326a0.zip
OS-less HAL demo working.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7813 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos/STM32')
-rw-r--r--demos/STM32/HAL-STM32F407-DISCOVERY/main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/demos/STM32/HAL-STM32F407-DISCOVERY/main.c b/demos/STM32/HAL-STM32F407-DISCOVERY/main.c
index a59c0b8ff..b9359ee4c 100644
--- a/demos/STM32/HAL-STM32F407-DISCOVERY/main.c
+++ b/demos/STM32/HAL-STM32F407-DISCOVERY/main.c
@@ -29,6 +29,11 @@ int main(void) {
halInit();
/*
+ * Enabling interrupts, initialization done.
+ */
+ osalSysEnable();
+
+ /*
* Activates the serial driver 2 using the driver default configuration.
* PA2(TX) and PA3(RX) are routed to USART2.
*/
@@ -41,6 +46,8 @@ int main(void) {
* a shell respawn upon its termination.
*/
while (true) {
+ chnWriteTimeout(&SD2, (uint8_t *)"Hello World!\r\n", 14, TIME_INFINITE);
+
palSetPad(GPIOD, GPIOD_LED3); /* Orange. */
osalThreadSleepMilliseconds(500);
palClearPad(GPIOD, GPIOD_LED3); /* Orange. */