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

Marian Buschsieweke notifications at github.com
Fri Jul 9 16:36:43 CEST 2021

@maribu commented on this pull request.

> +void uart_poweron(uart_t uart)
+    uint32_t reset_bit_mask = (uart) ? RESETS_RESET_uart1_Msk : RESETS_RESET_uart0_Msk;
+    periph_reset(reset_bit_mask);
+    periph_reset_done(reset_bit_mask);
+void uart_poweroff(uart_t uart)
+    uart_deinit_pins(uart);
+    periph_reset((uart) ? RESETS_RESET_uart1_Msk : RESETS_RESET_uart0_Msk);

Those are again wonderfully underspecified APIs. IMO, we should just drop `uart_poweron()`. Assume a UART is first initialized, then powered off, then power on again: Should it resume operation in the state before power off? Why should the driver need to sacrifice RAM to back up the configuration, when the user of the UART exactly knows all configuration details?

IMO, we should drop `uart_poweron()`. `uart_init()` powers on and initialized the UART, `uart_poweroff()` powers it off again. There is no use case for `uart_poweron()`.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210709/ad318a82/attachment.htm>

More information about the notifications mailing list