Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers/periph/uart: add periph_uart_tx_ondemand feature #20108

Merged
merged 4 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
drivers/periph/uart: add periph_uart_tx_ondemand feature
  • Loading branch information
benpicco committed Dec 14, 2023
commit fc9669bcfd233dbd45ef1000a0c7a0deeabe2f8a
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