mirror of
https://github.com/embassy-rs/embassy.git
synced 2025-10-01 14:20:33 +00:00
Merge pull request #4168 from yutannihilation/fix/rotary-encoder-rxf-negative-value
Fix `rotary_encoder_rfx` example to handle negative values
This commit is contained in:
commit
aa8703360e
@ -88,8 +88,8 @@ impl<'d, T: Instance, const SM: usize> PioEncoder<'d, T, SM> {
|
|||||||
Self { sm }
|
Self { sm }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn read(&mut self) -> u32 {
|
pub async fn read(&mut self) -> i32 {
|
||||||
self.sm.get_rxf_entry(0)
|
self.sm.get_rxf_entry(0) as i32
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user