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

fix removed Tx::Write<u8> #541

Merged
merged 1 commit into from
Oct 18, 2022
Merged
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
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

### Added

- Serial Tx, Rx containing pins [#514] [#515]
- Serial Tx, Rx containing pins [#514] [#515] [#540]
- Implementation of From trait for Pin-to-PartiallyErasedPin [#507]
- Implementation of From trait for Pin-to-ErasedPin [#507]
- Implementation of From trait for PartiallyErasedPin-to-ErasedPin [#507]
Expand All @@ -58,6 +58,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
[#529]: https://github.com/stm32-rs/stm32f4xx-hal/pull/529
[#536]: https://github.com/stm32-rs/stm32f4xx-hal/pull/536
[#534]: https://github.com/stm32-rs/stm32f4xx-hal/pull/529
[#540]: https://github.com/stm32-rs/stm32f4xx-hal/pull/540

## [v0.13.2] - 2022-05-16

Expand Down
11 changes: 11 additions & 0 deletions src/serial/hal_02.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,17 @@ mod nb {
}
}

impl<USART: Instance> Write<u8> for Tx<USART, u8> {
type Error = Error;

fn write(&mut self, word: u8) -> nb::Result<(), Self::Error> {
self.write(word)
}
fn flush(&mut self) -> nb::Result<(), Self::Error> {
self.flush()
}
}

/// Writes 9-bit words to the UART/USART
///
/// If the UART/USART was configured with `WordLength::DataBits9`, the 9 least significant bits will
Expand Down