[riot-notifications] [RIOT-OS/RIOT] RFC: UART enhanced settings (#10743)

Yegor Yefremov notifications at github.com
Tue Jan 22 10:25:32 CET 2019


yegorich commented on this pull request.



> +#if defined(USART_CR1_M1)
+static inline void uart_stop(uart_t uart)
+{
+    uint32_t cr1;
+
+    cr1 = dev(uart)->CR1;
+
+    /* disbale transmit */
+    cr1 &= USART_CR1_TE;
+    dev(uart)->CR1 = cr1;
+
+    /* wait for transmission completion */
+    while (!(dev(uart)->ISR & USART_ISR_TC)) {}
+
+    /* disable UART */
+    cr1 &= USART_CR1_UE;

ACK

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/10743#discussion_r249698050
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190122/19fb3900/attachment.html>


More information about the notifications mailing list