aboutsummaryrefslogtreecommitdiffstats
path: root/demos/ARMCM3-STM32L152-DISCOVERY
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-09-17 08:45:43 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-09-17 08:45:43 +0000
commit4ff96215eddade6e541f1a97af5364e754ccee7c (patch)
tree28b310e8dc99a8a4714d59cd8b73327ef66c3054 /demos/ARMCM3-STM32L152-DISCOVERY
parenteea844796a2cdbea9f4ddf51f9766ff3964984b6 (diff)
downloadChibiOS-4ff96215eddade6e541f1a97af5364e754ccee7c.tar.gz
ChibiOS-4ff96215eddade6e541f1a97af5364e754ccee7c.tar.bz2
ChibiOS-4ff96215eddade6e541f1a97af5364e754ccee7c.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3323 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos/ARMCM3-STM32L152-DISCOVERY')
-rw-r--r--demos/ARMCM3-STM32L152-DISCOVERY/main.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/demos/ARMCM3-STM32L152-DISCOVERY/main.c b/demos/ARMCM3-STM32L152-DISCOVERY/main.c
index 3eaddc5fc..a21d12dae 100644
--- a/demos/ARMCM3-STM32L152-DISCOVERY/main.c
+++ b/demos/ARMCM3-STM32L152-DISCOVERY/main.c
@@ -60,16 +60,19 @@ int main(void) {
/*
* Activates the serial driver 1 using the driver default configuration.
+ * PA9 and PA10 are routed to USART1.
*/
sdStart(&SD1, NULL);
+ palSetPadMode(GPIOA, 9, PAL_MODE_ALT_OUTPUT_PUSHPULL(7));
+ palSetPadMode(GPIOA, 10, PAL_MODE_ALT_INPUT(7));
/*
* If the user button is pressed after the reset then the test suite is
* executed immediately before activating the various device drivers in
* order to not alter the benchmark scores.
*/
-// if (palReadPad(GPIOA, GPIOA_BUTTON))
-// TestThread(&SD1);
+ if (palReadPad(GPIOA, GPIOA_BUTTON))
+ TestThread(&SD1);
/*
* Initializes the SPI driver 1.
@@ -106,8 +109,8 @@ int main(void) {
* driver 1.
*/
while (TRUE) {
-// if (palReadPad(GPIOA, GPIOA_BUTTON))
-// TestThread(&SD1);
+ if (palReadPad(GPIOA, GPIOA_BUTTON))
+ TestThread(&SD1);
chThdSleepMilliseconds(500);
}
}