mbed library sources

Dependents:   Encrypted my_mbed lklk CyaSSL_DTLS_Cellular ... more

Superseded

This library was superseded by mbed-dev - https://os.mbed.com/users/mbed_official/code/mbed-dev/.

Development branch of the mbed library sources. This library is kept in synch with the latest changes from the mbed SDK and it is not guaranteed to work.

If you are looking for a stable and tested release, please import one of the official mbed library releases:

Import librarymbed

The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Revision:
632:7687fb9c4f91
Parent:
508:4f5903e025e6
Child:
634:ac7d6880524d
--- a/targets/hal/TARGET_STM/TARGET_STM32F3/serial_api.c	Mon Sep 28 13:00:10 2015 +0100
+++ b/targets/hal/TARGET_STM/TARGET_STM32F3/serial_api.c	Mon Sep 28 14:00:11 2015 +0100
@@ -94,11 +94,13 @@
         __HAL_RCC_USART2_CONFIG(RCC_USART2CLKSOURCE_SYSCLK);
         obj->index = 1;
     }
+#if defined(UART3_BASE)
     if (obj->uart == UART_3) {
         __USART3_CLK_ENABLE();
         __HAL_RCC_USART3_CONFIG(RCC_USART3CLKSOURCE_SYSCLK);
         obj->index = 2;
     }
+#endif
 #if defined(UART4_BASE)
     if (obj->uart == UART_4) {
         __UART4_CLK_ENABLE();
@@ -155,11 +157,13 @@
         __USART2_RELEASE_RESET();
         __USART2_CLK_DISABLE();
     }
+#if defined(UART3_BASE)
     if (obj->uart == UART_3) {
         __USART3_FORCE_RESET();
         __USART3_RELEASE_RESET();
         __USART3_CLK_DISABLE();
     }
+#endif
 #if defined(UART4_BASE)
     if (obj->uart == UART_4) {
         __UART4_FORCE_RESET();
@@ -248,10 +252,12 @@
     uart_irq(UART_2, 1);
 }
 
+#if defined(UART3_BASE)
 static void uart3_irq(void)
 {
     uart_irq(UART_3, 2);
 }
+#endif
 
 #if defined(UART4_BASE)
 static void uart4_irq(void)
@@ -290,10 +296,12 @@
         vector = (uint32_t)&uart2_irq;
     }
 
+#if defined(UART3_BASE)
     if (obj->uart == UART_3) {
         irq_n = USART3_IRQn;
         vector = (uint32_t)&uart3_irq;
     }
+#endif
 
 #if defined(UART4_BASE)
     if (obj->uart == UART_4) {