aboutsummaryrefslogtreecommitdiffstats
path: root/demos/STM8L-STM8L152-DISCOVERY-STVD/demo/main.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-11-11 18:51:10 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-11-11 18:51:10 +0000
commit27654c1bb64c74f7b5b5516945b24e1793ed8c12 (patch)
treecb1cd10ba93432509ef53e7c5dee8c1828d46368 /demos/STM8L-STM8L152-DISCOVERY-STVD/demo/main.c
parent009e8d28c38ef6b6797318aee29ca90910753988 (diff)
downloadChibiOS-27654c1bb64c74f7b5b5516945b24e1793ed8c12.tar.gz
ChibiOS-27654c1bb64c74f7b5b5516945b24e1793ed8c12.tar.bz2
ChibiOS-27654c1bb64c74f7b5b5516945b24e1793ed8c12.zip
STM8L platform support (not tested yet).
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2347 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos/STM8L-STM8L152-DISCOVERY-STVD/demo/main.c')
-rw-r--r--demos/STM8L-STM8L152-DISCOVERY-STVD/demo/main.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/demos/STM8L-STM8L152-DISCOVERY-STVD/demo/main.c b/demos/STM8L-STM8L152-DISCOVERY-STVD/demo/main.c
index c8c8e44fe..522499fcc 100644
--- a/demos/STM8L-STM8L152-DISCOVERY-STVD/demo/main.c
+++ b/demos/STM8L-STM8L152-DISCOVERY-STVD/demo/main.c
@@ -29,9 +29,13 @@ static msg_t Thread1(void *arg) {
(void)arg;
while (TRUE) {
-// palClearPad(GPIOD, PD_LD10);
+ palClearPad(GPIOC, PC_LED4);
chThdSleepMilliseconds(500);
-// palSetPad(GPIOD, PD_LD10);
+ palSetPad(GPIOC, PC_LED4);
+ chThdSleepMilliseconds(500);
+ palClearPad(GPIOE, PE_LED3);
+ chThdSleepMilliseconds(500);
+ palSetPad(GPIOE, PE_LED3);
chThdSleepMilliseconds(500);
}
return 0;
@@ -55,7 +59,7 @@ void main(void) {
/*
* Activates the serial driver 1 using the driver default configuration.
*/
-// sdStart(&SD2, NULL);
+ sdStart(&SD1, NULL);
/*
* Creates the blinker thread.
@@ -66,10 +70,8 @@ void main(void) {
* Normal main() thread activity.
*/
while (TRUE) {
-// if (palReadPad(GPIOG, 0) == PAL_LOW)
-// TestThread(&SD2);
-// if (palReadPad(GPIOG, 1) == PAL_LOW)
-// sdWriteTimeout(&SD2, "Hello World!\r\n", 14, TIME_INFINITE);
+ if (palReadPad(GPIOC, PC_BUTTON) == PAL_LOW)
+ TestThread(&SD1);
chThdSleepMilliseconds(1000);
}
}