aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/STM32/LLD
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-09-28 08:24:30 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-09-28 08:24:30 +0000
commitc822cd9ad142dbc409847c7d987d4090858400a2 (patch)
treeece23942f5c47868af533266b5f7999d5c0bec01 /os/hal/ports/STM32/LLD
parent9c182920f12fb72ff89d03c336dab733ef8349d0 (diff)
downloadChibiOS-c822cd9ad142dbc409847c7d987d4090858400a2.tar.gz
ChibiOS-c822cd9ad142dbc409847c7d987d4090858400a2.tar.bz2
ChibiOS-c822cd9ad142dbc409847c7d987d4090858400a2.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7329 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/ports/STM32/LLD')
-rw-r--r--os/hal/ports/STM32/LLD/USARTv2/uart_lld.c6
-rw-r--r--os/hal/ports/STM32/LLD/can_lld.c9
2 files changed, 12 insertions, 3 deletions
diff --git a/os/hal/ports/STM32/LLD/USARTv2/uart_lld.c b/os/hal/ports/STM32/LLD/USARTv2/uart_lld.c
index 3af72803e..c998dddce 100644
--- a/os/hal/ports/STM32/LLD/USARTv2/uart_lld.c
+++ b/os/hal/ports/STM32/LLD/USARTv2/uart_lld.c
@@ -99,7 +99,7 @@ static uartflags_t translate_errors(uint32_t isr) {
sts |= UART_FRAMING_ERROR;
if (isr & USART_ISR_NE)
sts |= UART_NOISE_ERROR;
- if (isr & USART_ISR_LBD)
+ if (isr & USART_ISR_LBDF)
sts |= UART_BREAK_DETECTED;
return sts;
}
@@ -270,8 +270,8 @@ static void serve_usart_irq(UARTDriver *uartp) {
isr = u->ISR;
u->ICR = isr;
- if (isr & (USART_ISR_LBD | USART_ISR_ORE | USART_ISR_NE |
- USART_ISR_FE | USART_ISR_PE)) {
+ if (isr & (USART_ISR_LBDF | USART_ISR_ORE | USART_ISR_NE |
+ USART_ISR_FE | USART_ISR_PE)) {
if (uartp->config->rxerr_cb != NULL)
uartp->config->rxerr_cb(uartp, translate_errors(isr));
}
diff --git a/os/hal/ports/STM32/LLD/can_lld.c b/os/hal/ports/STM32/LLD/can_lld.c
index ad9752d96..b19a9fd8d 100644
--- a/os/hal/ports/STM32/LLD/can_lld.c
+++ b/os/hal/ports/STM32/LLD/can_lld.c
@@ -30,6 +30,15 @@
/* Driver local definitions. */
/*===========================================================================*/
+/*
+ * Addressing differences in the headers, they seem unable to agree on names.
+ */
+#if STM32_CAN_USE_CAN1
+#if !defined(CAN1)
+#define CAN1 CAN
+#endif
+#endif
+
/*===========================================================================*/
/* Driver exported variables. */
/*===========================================================================*/