From 5acfb20d0275b5d55a864c3578f678b06a0d763f Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Tue, 12 Dec 2023 20:25:39 +0100 Subject: [PATCH] drivers/periph/uart: add functions to query RTS/CTS pins --- drivers/include/periph/uart.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/drivers/include/periph/uart.h b/drivers/include/periph/uart.h index 7f80461fba..d72725c3e3 100644 --- a/drivers/include/periph/uart.h +++ b/drivers/include/periph/uart.h @@ -255,6 +255,31 @@ gpio_t uart_pin_rx(uart_t uart); gpio_t uart_pin_tx(uart_t uart); #endif /* DOXYGEN */ + +/** + * @brief Get the CTS pin of the given UART. + * + * @param[in] uart The device to query + * + * @note Until this is implemented on all platforms, this requires the + * periph_uart_reconfigure feature to be used. + * + * @return The GPIO used for the UART CTS line. + */ +gpio_t uart_pin_cts(uart_t uart); + +/** + * @brief Get the RTS pin of the given UART. + * + * @param[in] uart The device to query + * + * @note Until this is implemented on all platforms, this requires the + * periph_uart_reconfigure feature to be used. + * + * @return The GPIO used for the UART RTS line. + */ +gpio_t uart_pin_rts(uart_t uart); + #endif /* MODULE_PERIPH_UART_RECONFIGURE */ #if defined(MODULE_PERIPH_UART_RXSTART_IRQ) || DOXYGEN