[riot-notifications] [RIOT-OS/RIOT] cpu/rpx0xx: port RIOT to the Raspberry Pi RP2040 MCU (#16609)

benpicco notifications at github.com
Fri Jul 9 13:06:15 CEST 2021


@benpicco commented on this pull request.



> +    uart_poweron(uart);
+    _set_symbolrate(uart, baud);
+
+    if (uart_mode(uart, UART_DATA_BITS_8, UART_PARITY_NONE, UART_STOP_BITS_1) != UART_OK) {
+        return UART_NOMODE;
+    }
+
+    /* enable UART */
+    uint32_t enable_mask = UART0_UARTCR_UARTEN_Msk | UART0_UARTCR_TXE_Msk;
+    if (rx_cb != NULL) {
+        enable_mask |= UART0_UARTCR_RXE_Msk;
+    }
+    io_reg_atomic_set(&dev->UARTCR.reg, enable_mask);
+    uart_init_pins(uart);
+
+    _irq_enable(uart);

Now you can move this to `if (rx_cb != NULL) {`

-- 
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/16609#pullrequestreview-702938233
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210709/2bb3e64b/attachment-0001.htm>


More information about the notifications mailing list