projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos/stm32l0: Add casts to reduce -Wconversion warnings
[fw/altos]
/
src
/
stm32l0
/
ao_serial_stm.c
diff --git
a/src/stm32l0/ao_serial_stm.c
b/src/stm32l0/ao_serial_stm.c
index ac745d9709387d7aec07b45ba3cc0d5019487822..650f2f1f636c335f80e8c27068948b42c65a1cfc 100644
(file)
--- a/
src/stm32l0/ao_serial_stm.c
+++ b/
src/stm32l0/ao_serial_stm.c
@@
-66,7
+66,7
@@
_ao_usart_rx(struct ao_stm_usart *usart, int is_stdin)
}
#endif
} else {
}
#endif
} else {
- usart->reg->cr1 &= ~(1 << STM_USART_CR1_RXNEIE);
+ usart->reg->cr1 &= ~(1
UL
<< STM_USART_CR1_RXNEIE);
}
}
}
}
}
}
@@
-77,11
+77,11
@@
ao_usart_isr(struct ao_stm_usart *usart, int is_stdin)
_ao_usart_rx(usart, is_stdin);
if (!_ao_usart_tx_start(usart))
_ao_usart_rx(usart, is_stdin);
if (!_ao_usart_tx_start(usart))
- usart->reg->cr1 &= ~(1<< STM_USART_CR1_TXEIE);
+ usart->reg->cr1 &= ~(1
UL
<< STM_USART_CR1_TXEIE);
if (usart->reg->isr & (1 << STM_USART_ISR_TC)) {
usart->tx_running = 0;
if (usart->reg->isr & (1 << STM_USART_ISR_TC)) {
usart->tx_running = 0;
- usart->reg->cr1 &= ~(1 << STM_USART_CR1_TCIE);
+ usart->reg->cr1 &= ~(1
UL
<< STM_USART_CR1_TCIE);
if (usart->draining) {
usart->draining = 0;
ao_wakeup(&usart->tx_fifo);
if (usart->draining) {
usart->draining = 0;
ao_wakeup(&usart->tx_fifo);