From 4ff96215eddade6e541f1a97af5364e754ccee7c Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 17 Sep 2011 08:45:43 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3323 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/ARMCM3-STM32L152-DISCOVERY/main.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'demos') 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); } } -- cgit v1.2.3