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

UART: Make the tx_fifo_count and is_tx_idle UART functions public #2887

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions esp-hal/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- I2C: Replaced potential panics with errors. (#2831)
- UART: Make `AtCmdConfig` and `ConfigError` non-exhaustive (#2851)
- UART: Make `AtCmdConfig` use builder-lite pattern (#2851)
- UART: Make `is_tx_idle` and `tx_fifo_count` public (#2887)

### Fixed

Expand Down
4 changes: 2 additions & 2 deletions esp-hal/src/uart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ where
#[allow(clippy::useless_conversion)]
/// Returns the number of bytes currently in the TX FIFO for this UART
/// instance.
fn tx_fifo_count(&self) -> u16 {
pub fn tx_fifo_count(&self) -> u16 {
self.register_block()
.status()
.read()
Expand All @@ -708,7 +708,7 @@ where
///
/// Returns `true` if the transmit line is idle, meaning no data is
/// currently being transmitted.
fn is_tx_idle(&self) -> bool {
pub fn is_tx_idle(&self) -> bool {
#[cfg(esp32)]
let status = self.register_block().status();
#[cfg(not(esp32))]
Expand Down
Loading