Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: STM32L452_Nucleo_ticker
Fork of mbed-dev by
Diff: targets/TARGET_STM/TARGET_STM32L0/serial_device.c
- Revision:
- 177:d650f5d4c87a
- Parent:
- 170:19eb464bc2be
--- a/targets/TARGET_STM/TARGET_STM32L0/serial_device.c Wed Oct 25 14:53:38 2017 +0100
+++ b/targets/TARGET_STM/TARGET_STM32L0/serial_device.c Wed Nov 08 13:50:44 2017 +0000
@@ -673,9 +673,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;
}
@@ -749,7 +749,7 @@
// clear flags
__HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_PEF | UART_CLEAR_FEF | UART_CLEAR_OREF);
- volatile uint32_t tmpval = huart->Instance->RDR; // Clear RXNE flag
+ volatile uint32_t tmpval __attribute__((unused)) = huart->Instance->RDR; // Clear RXNE flag
// reset states
huart->RxXferCount = 0;
