mbed library sources. Supersedes mbed-src.

Dependents:   BREAK_SENSOR_LED

Fork of mbed-dev by mbed official

Revision:
177:d650f5d4c87a
Parent:
170:19eb464bc2be
--- a/targets/TARGET_STM/TARGET_STM32F7/serial_device.c	Wed Oct 25 14:53:38 2017 +0100
+++ b/targets/TARGET_STM/TARGET_STM32F7/serial_device.c	Wed Nov 08 13:50:44 2017 +0000
@@ -763,9 +763,9 @@
     HAL_UART_IRQHandler(huart);
     
     // Abort if an error occurs
-    if (return_event & SERIAL_EVENT_RX_PARITY_ERROR ||
-            return_event & SERIAL_EVENT_RX_FRAMING_ERROR ||
-            return_event & SERIAL_EVENT_RX_OVERRUN_ERROR) {
+    if ((return_event & SERIAL_EVENT_RX_PARITY_ERROR) ||
+        (return_event & SERIAL_EVENT_RX_FRAMING_ERROR) ||
+        (return_event & SERIAL_EVENT_RX_OVERRUN_ERROR)) {
         return return_event;
     }
     
@@ -838,7 +838,7 @@
     __HAL_UART_DISABLE_IT(huart, UART_IT_ERR);
     
     // clear flags
-    volatile uint32_t tmpval = huart->Instance->RDR; // Clear RXNE
+    volatile uint32_t tmpval __attribute__((unused)) = huart->Instance->RDR; // Clear RXNE
     __HAL_UART_CLEAR_IT(huart, UART_CLEAR_PEF);
     __HAL_UART_CLEAR_IT(huart, UART_CLEAR_FEF);
     __HAL_UART_CLEAR_IT(huart, UART_CLEAR_NEF);