Skip to content

Commit 99b34a0

Browse files
bors[bot]burrbull
andauthored
Merge #541
541: fix removed Tx::Write<u8> r=therealprof a=burrbull Fix #528 . Restore implementation accidentally removed in #514 Co-authored-by: Andrey Zgarbul <[email protected]>
2 parents 11befcb + d129479 commit 99b34a0

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
3434

3535
### Added
3636

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

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

src/serial/hal_02.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,17 @@ mod nb {
5151
}
5252
}
5353

54+
impl<USART: Instance> Write<u8> for Tx<USART, u8> {
55+
type Error = Error;
56+
57+
fn write(&mut self, word: u8) -> nb::Result<(), Self::Error> {
58+
self.write(word)
59+
}
60+
fn flush(&mut self) -> nb::Result<(), Self::Error> {
61+
self.flush()
62+
}
63+
}
64+
5465
/// Writes 9-bit words to the UART/USART
5566
///
5667
/// If the UART/USART was configured with `WordLength::DataBits9`, the 9 least significant bits will

0 commit comments

Comments
 (0)