aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32F0xx/UART
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-06-23 17:59:28 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-06-23 17:59:28 +0000
commit3a49e742c6a1f2875cc98053236b0c23936a7c45 (patch)
treeddb4da6349ef4cba903b7ac9d951264db80d0fad /testhal/STM32F0xx/UART
parentae3db0129bf8fe34a660388e5066fb1328ba9e8a (diff)
downloadChibiOS-3a49e742c6a1f2875cc98053236b0c23936a7c45.tar.gz
ChibiOS-3a49e742c6a1f2875cc98053236b0c23936a7c45.tar.bz2
ChibiOS-3a49e742c6a1f2875cc98053236b0c23936a7c45.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4335 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/STM32F0xx/UART')
-rw-r--r--testhal/STM32F0xx/UART/main.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/testhal/STM32F0xx/UART/main.c b/testhal/STM32F0xx/UART/main.c
index 65f834672..7bb7a9fd2 100644
--- a/testhal/STM32F0xx/UART/main.c
+++ b/testhal/STM32F0xx/UART/main.c
@@ -35,7 +35,7 @@ static void restart(void *p) {
static void ledoff(void *p) {
(void)p;
- palClearPad(GPIOB, GPIOB_LED4);
+ palClearPad(GPIOC, GPIOC_LED4);
}
/*
@@ -45,7 +45,7 @@ static void ledoff(void *p) {
static void txend1(UARTDriver *uartp) {
(void)uartp;
- palSetPad(GPIOB, GPIOB_LED4);
+ palSetPad(GPIOC, GPIOC_LED4);
}
/*
@@ -54,7 +54,7 @@ static void txend1(UARTDriver *uartp) {
static void txend2(UARTDriver *uartp) {
(void)uartp;
- palClearPad(GPIOB, GPIOB_LED4);
+ palClearPad(GPIOC, GPIOC_LED4);
chSysLockFromIsr();
if (chVTIsArmedI(&vt1))
chVTResetI(&vt1);
@@ -81,7 +81,7 @@ static void rxchar(UARTDriver *uartp, uint16_t c) {
(void)uartp;
(void)c;
/* Flashing the LED each time a character is received.*/
- palSetPad(GPIOB, GPIOB_LED4);
+ palSetPad(GPIOC, GPIOC_LED4);
chSysLockFromIsr();
if (chVTIsArmedI(&vt2))
chVTResetI(&vt2);
@@ -131,8 +131,8 @@ int main(void) {
* Activates the serial driver 1, PA9 and PA10 are routed to USART1.
*/
uartStart(&UARTD1, &uart_cfg_1);
- palSetPadMode(GPIOA, 9, PAL_MODE_ALTERNATE(7));
- palSetPadMode(GPIOA, 10, PAL_MODE_ALTERNATE(7));
+ palSetPadMode(GPIOC, 9, PAL_MODE_ALTERNATE(1)); /* USART1 TX. */
+ palSetPadMode(GPIOC, 10, PAL_MODE_ALTERNATE(1)); /* USART1 RX. */
/*
* Starts the transmission, it will be handled entirely in background.