[riot-notifications] [RIOT-OS/RIOT] drivers/dose: make use of start condition received interrupt (#16506)

Juergen Fitschen notifications at github.com
Mon Jul 26 12:52:46 CEST 2021


@jue89 requested changes on this pull request.

I think this will improve intelligibility for first-time readers stumbling over the this UART feature.

> @@ -21,6 +21,7 @@ config CPU_COMMON_SAM0
     select HAS_PERIPH_UART_MODECFG
     select HAS_PERIPH_UART_NONBLOCKING
     select HAS_PERIPH_UART_RECONFIGURE
+    select HAS_PERIPH_UART_RX_START

I think this is more descriptive:

```suggestion
    select HAS_PERIPH_UART_RXSTART_IRQ
```

> @@ -19,6 +19,7 @@ FEATURES_PROVIDED += periph_timer_periodic # implements timer_set_periodic()
 FEATURES_PROVIDED += periph_uart_modecfg
 FEATURES_PROVIDED += periph_uart_nonblocking
 FEATURES_PROVIDED += periph_uart_reconfigure
+FEATURES_PROVIDED += periph_uart_rx_start

I think this is more descriptive.

```suggestion
FEATURES_PROVIDED += periph_uart_rxstart_irq
```

> @@ -243,6 +254,36 @@ gpio_t uart_pin_tx(uart_t uart);
 #endif /* DOXYGEN */
 #endif /* MODULE_PERIPH_UART_RECONFIGURE */
 
+#if defined(MODULE_PERIPH_UART_RX_START) || DOXYGEN
+
+/**
+ * @brief   Configure the function that will be called when a start condition
+ *          is detected.
+ *
+ *          This will not enable / disable the generation of the RX start
+ *          interrupt.
+ *

```suggestion
 *
 * @note    You have to add the module `periph_uart_rxstart_irq` to your project
 *          to enable this function
 *
```

> +/**
+ * @brief   Configure the function that will be called when a start condition
+ *          is detected.
+ *
+ *          This will not enable / disable the generation of the RX start
+ *          interrupt.
+ *
+ * @param[in] uart      The device to configure
+ * @param[in] cb        The function called when a start condition is detected
+ * @param[in] arg       Optional function argument
+ */
+void uart_rxstart_configure(uart_t uart, uart_rxstart_cb_t cb, void *arg);
+
+/**
+ * @brief   Enable the RX start interrupt.
+ *

```suggestion
 *
 * @note    You have to add the module `periph_uart_rxstart_irq` to your project
 *          to enable this function
 *
```

> + * @param[in] uart      The device to configure
+ * @param[in] cb        The function called when a start condition is detected
+ * @param[in] arg       Optional function argument
+ */
+void uart_rxstart_configure(uart_t uart, uart_rxstart_cb_t cb, void *arg);
+
+/**
+ * @brief   Enable the RX start interrupt.
+ *
+ * @param[in] uart      The device to configure
+ */
+void uart_rxstart_enable(uart_t uart);
+
+/**
+ * @brief   Disable the RX start interrupt.
+ *

```suggestion
 *
 * @note    You have to add the module `periph_uart_rxstart_irq` to your project
 *          to enable this function
 *
```

-- 
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/16506#pullrequestreview-714696649
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210726/db19797e/attachment.htm>


More information about the notifications mailing list