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:
Ulf Lilleengen 2025-05-09 12:39:37 +02:00 committed by GitHub
commit aa8703360e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -88,8 +88,8 @@ impl<'d, T: Instance, const SM: usize> PioEncoder<'d, T, SM> {
Self { sm }
}
pub async fn read(&mut self) -> u32 {
self.sm.get_rxf_entry(0)
pub async fn read(&mut self) -> i32 {
self.sm.get_rxf_entry(0) as i32
}
}