Modified version of the mbed library for use with the Nucleo boards.

Dependents:   EEPROMWrite Full-Project

Fork of mbed-src by mbed official

Files at this revision

API Documentation at this revision

Comitter:
ptcrews
Date:
Mon Nov 02 19:22:36 2015 +0000
Parent:
635:a11c0372f0ba
Commit message:
Changed serial_api.c for Nucleo L1 boards. Changed define conditionals from USART4 and USART5 to UART4 and UART5.

Changed in this revision

targets/hal/TARGET_STM/TARGET_STM32L1/serial_api.c Show annotated file Show diff for this revision Revisions of this file
--- a/targets/hal/TARGET_STM/TARGET_STM32L1/serial_api.c	Wed Sep 30 17:00:09 2015 +0100
+++ b/targets/hal/TARGET_STM/TARGET_STM32L1/serial_api.c	Mon Nov 02 19:22:36 2015 +0000
@@ -95,13 +95,13 @@
         obj->index = 2;
     }
 
-#if defined(USART4_BASE)
+#if defined(UART4_BASE)
     if (obj->uart == UART_4) {
         __UART4_CLK_ENABLE();
         obj->index = 3;
     }
 #endif
-#if defined(USART5_BASE)
+#if defined(UART5_BASE)
     if (obj->uart == UART_5) {
         __UART5_CLK_ENABLE();
         obj->index = 4;
@@ -156,14 +156,14 @@
         __USART3_CLK_DISABLE();
     }
 
-#if defined(USART4_BASE)
+#if defined(UART4_BASE)
     if (obj->uart == UART_4) {
         __UART4_FORCE_RESET();
         __UART4_RELEASE_RESET();
         __UART4_CLK_DISABLE();
     }
 #endif
-#if defined(USART5_BASE)
+#if defined(UART5_BASE)
     if (obj->uart == UART_5) {
         __UART5_FORCE_RESET();
         __UART5_RELEASE_RESET();
@@ -249,14 +249,14 @@
     uart_irq(UART_3, 2);
 }
 
-#if defined(USART4_BASE)
+#if defined(UART4_BASE)
 static void uart4_irq(void)
 {
     uart_irq(UART_4, 3);
 }
 #endif
 
-#if defined(USART5_BASE)
+#if defined(UART5_BASE)
 static void uart5_irq(void)
 {
     uart_irq(UART_5, 4);
@@ -291,14 +291,14 @@
         vector = (uint32_t)&uart3_irq;
     }
 
-#if defined(USART4_BASE)
+#if defined(UART4_BASE)
     if (obj->uart == UART_4) {
         irq_n = UART4_IRQn;
         vector = (uint32_t)&uart4_irq;
     }
 #endif
 
-#if defined(USART5_BASE)
+#if defined(UART5_BASE)
     if (obj->uart == UART_5) {
         irq_n = UART5_IRQn;
         vector = (uint32_t)&uart5_irq;