Skip to content

Commit

Permalink
drivers/periph/uart: add periph_uart_tx_ondemand feature
Browse files Browse the repository at this point in the history
  • Loading branch information
benpicco committed Dec 14, 2023
1 parent 138cbb8 commit fc9669b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
18 changes: 18 additions & 0 deletions drivers/include/periph/uart.h
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,24 @@ void uart_poweron(uart_t uart);
*/
void uart_poweroff(uart_t uart);

/**
* @brief Enable the TX line one the given UART
*
* @note requires the `periph_uart_tx_ondemand` feature
*
* @param[in] uart the UART device start TX on
*/
void uart_enable_tx(uart_t uart);

/**
* @brief Disable the TX line one the given UART
*
* @note requires the `periph_uart_tx_ondemand` feature
*
* @param[in] uart the UART device to stop TX on
*/
void uart_disable_tx(uart_t uart);

#ifdef __cplusplus
}
#endif
Expand Down
5 changes: 5 additions & 0 deletions kconfigs/Kconfig.features
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,11 @@ config HAS_PERIPH_UART_MODECFG
help
Indicates that the UART peripheral allows mode configuration.

config HAS_PERIPH_UART_TX_ONDEMAND
bool
help
Indicates that the UART peripheral can enable the TX line on demmand.

config HAS_PERIPH_UART_NONBLOCKING
bool
help
Expand Down

0 comments on commit fc9669b

Please sign in to comment.