diff options
| author | Hiroaki Yutani <[email protected]> | 2025-05-05 12:41:20 +0900 |
|---|---|---|
| committer | Hiroaki Yutani <[email protected]> | 2025-05-05 12:41:20 +0900 |
| commit | a97be9c7400cb6608ff94ef3c887ac7cc816e4ec (patch) | |
| tree | db886d775e5b3dbaf5d3d5996c5f5bcb1e007f27 /examples/rp235x | |
| parent | 9fee43f2bd57e7ce77321d001cdd287f0bd6fef2 (diff) | |
Handle negative value
Diffstat (limited to 'examples/rp235x')
| -rw-r--r-- | examples/rp235x/src/bin/pio_rotary_encoder_rxf.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/rp235x/src/bin/pio_rotary_encoder_rxf.rs b/examples/rp235x/src/bin/pio_rotary_encoder_rxf.rs index ccc601661..33499babb 100644 --- a/examples/rp235x/src/bin/pio_rotary_encoder_rxf.rs +++ b/examples/rp235x/src/bin/pio_rotary_encoder_rxf.rs | |||
| @@ -88,8 +88,8 @@ impl<'d, T: Instance, const SM: usize> PioEncoder<'d, T, SM> { | |||
| 88 | Self { sm } | 88 | Self { sm } |
| 89 | } | 89 | } |
| 90 | 90 | ||
| 91 | pub async fn read(&mut self) -> u32 { | 91 | pub async fn read(&mut self) -> i32 { |
| 92 | self.sm.get_rxf_entry(0) | 92 | self.sm.get_rxf_entry(0) as i32 |
| 93 | } | 93 | } |
| 94 | } | 94 | } |
| 95 | 95 | ||
