Skip to content

Commit 6955467

Browse files
bors[bot]kalkyl
andauthored
Merge #329
329: Fix TWIS is_done() always returns true r=jonas-schievink a=kalkyl Noticed there was a mistake in the `Transfer` `is_done()` of the TWIS module, it always returns true. Co-authored-by: Henrik Alsér <[email protected]>
2 parents a03e521 + 2aff770 commit 6955467

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

CHANGELOG.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22

33
## Unreleased
44

5-
(no changes)
5+
### Fixes
6+
7+
- Fix TWIS transfer `is_done()` always returns true ([#329]).
8+
9+
[#329]: https://github.com/nrf-rs/nrf-hal/pull/329
610

711
## [0.12.2]
812

@@ -126,9 +130,9 @@
126130
- Also return owned `Pins` from `Usart::free()` ([#261]).
127131

128132
¹ _A trait can be sealed by making a private trait a supertrait. That way, no
129-
downstream crates can implement it (since they can't name the supertrait).
130-
This is just to make sure the trait isn't implemented by types that shouldn't
131-
implement it._
133+
downstream crates can implement it (since they can't name the supertrait).
134+
This is just to make sure the trait isn't implemented by types that shouldn't
135+
implement it._
132136

133137
### Internal Improvements
134138

nrf-hal-common/src/twis.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -518,8 +518,7 @@ impl<T: Instance, B> Transfer<T, B> {
518518
.inner
519519
.as_mut()
520520
.unwrap_or_else(|| unsafe { core::hint::unreachable_unchecked() });
521-
inner.twis.is_done();
522-
true
521+
inner.twis.is_done()
523522
}
524523
}
525524

@@ -561,4 +560,4 @@ mod _twis1 {
561560
impl Instance for TWIS1 {
562561
const INTERRUPT: Interrupt = Interrupt::SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1;
563562
}
564-
}
563+
}

0 commit comments

Comments
 (0)