diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-03-03 09:10:09 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-03-03 09:10:09 +0000 |
commit | b08ccd70bfe29352067250ae981320c2df500f8f (patch) | |
tree | c88be84ff5e4af75cb8296e91350855e767c74b6 | |
parent | 033585af1abc8f609f3104419023457dec1cfd72 (diff) | |
download | ChibiOS-b08ccd70bfe29352067250ae981320c2df500f8f.tar.gz ChibiOS-b08ccd70bfe29352067250ae981320c2df500f8f.tar.bz2 ChibiOS-b08ccd70bfe29352067250ae981320c2df500f8f.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5346 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r-- | demos/ARMCM4-STM32F373-STM32373C_EVAL/main.c | 47 | ||||
-rw-r--r-- | demos/ARMCM4-STM32F373-STM32373C_EVAL/mcuconf.h | 4 |
2 files changed, 18 insertions, 33 deletions
diff --git a/demos/ARMCM4-STM32F373-STM32373C_EVAL/main.c b/demos/ARMCM4-STM32F373-STM32373C_EVAL/main.c index dc35b4c70..e8e2f37ec 100644 --- a/demos/ARMCM4-STM32F373-STM32373C_EVAL/main.c +++ b/demos/ARMCM4-STM32F373-STM32373C_EVAL/main.c @@ -31,30 +31,18 @@ static msg_t Thread1(void *arg) { (void)arg;
chRegSetThreadName("blinker");
while (TRUE) {
- palSetPad(GPIOE, GPIOE_LED3_RED);
- chThdSleepMilliseconds(125);
- palClearPad(GPIOE, GPIOE_LED3_RED);
- palSetPad(GPIOE, GPIOE_LED5_ORANGE);
- chThdSleepMilliseconds(125);
- palClearPad(GPIOE, GPIOE_LED5_ORANGE);
- palSetPad(GPIOE, GPIOE_LED7_GREEN);
- chThdSleepMilliseconds(125);
- palClearPad(GPIOE, GPIOE_LED7_GREEN);
- palSetPad(GPIOE, GPIOE_LED9_BLUE);
- chThdSleepMilliseconds(125);
- palClearPad(GPIOE, GPIOE_LED9_BLUE);
- palSetPad(GPIOE, GPIOE_LED10_RED);
- chThdSleepMilliseconds(125);
- palClearPad(GPIOE, GPIOE_LED10_RED);
- palSetPad(GPIOE, GPIOE_LED8_ORANGE);
- chThdSleepMilliseconds(125);
- palClearPad(GPIOE, GPIOE_LED8_ORANGE);
- palSetPad(GPIOE, GPIOE_LED6_GREEN);
- chThdSleepMilliseconds(125);
- palClearPad(GPIOE, GPIOE_LED6_GREEN);
- palSetPad(GPIOE, GPIOE_LED4_BLUE);
- chThdSleepMilliseconds(125);
- palClearPad(GPIOE, GPIOE_LED4_BLUE);
+ palSetPad(GPIOE, GPIOC_LED1);
+ chThdSleepMilliseconds(250);
+ palClearPad(GPIOE, GPIOC_LED1);
+ palSetPad(GPIOE, GPIOC_LED2);
+ chThdSleepMilliseconds(250);
+ palClearPad(GPIOE, GPIOC_LED2);
+ palSetPad(GPIOE, GPIOC_LED3);
+ chThdSleepMilliseconds(250);
+ palClearPad(GPIOE, GPIOC_LED3);
+ palSetPad(GPIOE, GPIOC_LED4);
+ chThdSleepMilliseconds(250);
+ palClearPad(GPIOE, GPIOC_LED4);
}
}
@@ -74,12 +62,9 @@ int main(void) { chSysInit();
/*
- * Activates the serial driver 1 using the driver default configuration.
- * PA9(TX) and PA10(RX) are routed to USART1.
+ * Activates the serial driver 2 using. pins are pre-configured in board.h.
*/
- sdStart(&SD1, NULL);
- palSetPadMode(GPIOA, 9, PAL_MODE_ALTERNATE(7));
- palSetPadMode(GPIOA, 10, PAL_MODE_ALTERNATE(7));
+ sdStart(&SD2, NULL);
/*
* Creates the example thread.
@@ -92,8 +77,8 @@ int main(void) { * pressed the test procedure is launched.
*/
while (TRUE) {
- if (palReadPad(GPIOA, GPIOA_BUTTON))
- TestThread(&SD1);
+ if (palReadPad(GPIOA, GPIOA_WKUP_BUTTON))
+ TestThread(&SD2);
chThdSleepMilliseconds(500);
}
}
diff --git a/demos/ARMCM4-STM32F373-STM32373C_EVAL/mcuconf.h b/demos/ARMCM4-STM32F373-STM32373C_EVAL/mcuconf.h index 59e0975ff..9e12dc944 100644 --- a/demos/ARMCM4-STM32F373-STM32373C_EVAL/mcuconf.h +++ b/demos/ARMCM4-STM32F373-STM32373C_EVAL/mcuconf.h @@ -132,8 +132,8 @@ /*
* SERIAL driver system settings.
*/
-#define STM32_SERIAL_USE_USART1 TRUE
-#define STM32_SERIAL_USE_USART2 FALSE
+#define STM32_SERIAL_USE_USART1 FALSE
+#define STM32_SERIAL_USE_USART2 TRUE
#define STM32_SERIAL_USE_USART3 FALSE
#define STM32_SERIAL_USE_UART4 FALSE
#define STM32_SERIAL_USE_UART5 FALSE
|