X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=src%2Fstm32l0%2Fao_serial_stm.c;fp=src%2Fstm32l0%2Fao_serial_stm.c;h=650f2f1f636c335f80e8c27068948b42c65a1cfc;hp=ac745d9709387d7aec07b45ba3cc0d5019487822;hb=2d4484e1577edc66c52bcb260329387f93123a6d;hpb=5b3a457f232e39977a437fc52256fc15c612b377 diff --git a/src/stm32l0/ao_serial_stm.c b/src/stm32l0/ao_serial_stm.c index ac745d97..650f2f1f 100644 --- 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 { - usart->reg->cr1 &= ~(1 << STM_USART_CR1_RXNEIE); + usart->reg->cr1 &= ~(1UL << 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)) - usart->reg->cr1 &= ~(1<< STM_USART_CR1_TXEIE); + usart->reg->cr1 &= ~(1UL << STM_USART_CR1_TXEIE); if (usart->reg->isr & (1 << STM_USART_ISR_TC)) { usart->tx_running = 0; - usart->reg->cr1 &= ~(1 << STM_USART_CR1_TCIE); + usart->reg->cr1 &= ~(1UL << STM_USART_CR1_TCIE); if (usart->draining) { usart->draining = 0; ao_wakeup(&usart->tx_fifo);