diff options
| author | dragonn <[email protected]> | 2025-01-08 14:55:37 +0100 |
|---|---|---|
| committer | dragonn <[email protected]> | 2025-01-08 14:55:37 +0100 |
| commit | 5102b50be71888364dff366d650b406d7ae1f50e (patch) | |
| tree | 6ab087ab55d5908ad4c960d58ffd2bb25f269298 /embassy-nrf/src | |
| parent | 0316ef86cbda80f3f724b126c4e7860571b91d8a (diff) | |
remove self from check_errorsrc to make it work in async_wait
Diffstat (limited to 'embassy-nrf/src')
| -rw-r--r-- | embassy-nrf/src/twim.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/embassy-nrf/src/twim.rs b/embassy-nrf/src/twim.rs index 687f53311..708a69082 100644 --- a/embassy-nrf/src/twim.rs +++ b/embassy-nrf/src/twim.rs | |||
| @@ -257,7 +257,7 @@ impl<'d, T: Instance> Twim<'d, T> { | |||
| 257 | } | 257 | } |
| 258 | 258 | ||
| 259 | /// Get Error instance, if any occurred. | 259 | /// Get Error instance, if any occurred. |
| 260 | fn check_errorsrc(&self) -> Result<(), Error> { | 260 | fn check_errorsrc() -> Result<(), Error> { |
| 261 | let r = T::regs(); | 261 | let r = T::regs(); |
| 262 | 262 | ||
| 263 | let err = r.errorsrc().read(); | 263 | let err = r.errorsrc().read(); |
| @@ -347,7 +347,7 @@ impl<'d, T: Instance> Twim<'d, T> { | |||
| 347 | if r.events_error().read() != 0 { | 347 | if r.events_error().read() != 0 { |
| 348 | r.events_error().write_value(0); | 348 | r.events_error().write_value(0); |
| 349 | r.tasks_stop().write_value(1); | 349 | r.tasks_stop().write_value(1); |
| 350 | if let Err(e) = self.check_errorsrc() { | 350 | if let Err(e) = Self::check_errorsrc() { |
| 351 | return Poll::Ready(Err(e)); | 351 | return Poll::Ready(Err(e)); |
| 352 | } else { | 352 | } else { |
| 353 | return Poll::Ready(Err(Error::Bus)); | 353 | return Poll::Ready(Err(Error::Bus)); |
| @@ -510,7 +510,7 @@ impl<'d, T: Instance> Twim<'d, T> { | |||
| 510 | 510 | ||
| 511 | fn check_operations(&mut self, operations: &[Operation<'_>]) -> Result<(), Error> { | 511 | fn check_operations(&mut self, operations: &[Operation<'_>]) -> Result<(), Error> { |
| 512 | compiler_fence(SeqCst); | 512 | compiler_fence(SeqCst); |
| 513 | self.check_errorsrc()?; | 513 | Self::check_errorsrc()?; |
| 514 | 514 | ||
| 515 | assert!(operations.len() == 1 || operations.len() == 2); | 515 | assert!(operations.len() == 1 || operations.len() == 2); |
| 516 | match operations { | 516 | match operations { |
