Skip to content

Commit 342043c

Browse files
committed
fix
1 parent 631bfb2 commit 342043c

File tree

2 files changed

+5
-26
lines changed

2 files changed

+5
-26
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
99

10+
### Added
11+
12+
- initial `embedded-io` support [#725]
13+
1014
### Changed
1115

1216
- Use `stm32f4-staging` until `stm32f4` is released [#706]
1317

1418
[#706]: https://github.com/stm32-rs/stm32f4xx-hal/pull/706
19+
[#725]: https://github.com/stm32-rs/stm32f4xx-hal/pull/725
1520

1621
## [v0.21.0] - 2024-05-30
1722

src/serial/hal_1.rs

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -126,32 +126,6 @@ mod io {
126126
<USART as Instance>::RegisterBlock: RegisterBlockImpl,
127127
USART: Deref<Target = <USART as Instance>::RegisterBlock>,
128128
{
129-
/*
130-
fn write(&mut self, bytes: &[u8]) -> Result<usize, Self::Error> {
131-
let mut iter = bytes.iter();
132-
let Some(first) = iter.next() else {
133-
return Ok(0);
134-
};
135-
// block for first byte
136-
self.usart.write_u8(*first)?;
137-
let mut i = 1;
138-
139-
// write more bytes if it's possible
140-
for byte in iter {
141-
match self.usart.write_u8(*byte) {
142-
Ok(_) => {
143-
i += 1;
144-
}
145-
Err(nb::Error::WouldBlock) => {
146-
return Ok(i);
147-
}
148-
Err(nb::Error::Other(e)) => {
149-
return Err(e);
150-
}
151-
}
152-
}
153-
Ok(i)
154-
}*/
155129
fn write(&mut self, bytes: &[u8]) -> Result<usize, Self::Error> {
156130
let mut i = 0;
157131
for byte in bytes.iter() {

0 commit comments

Comments
 (0)