diff options
| author | Peter Kövesdi <[email protected]> | 2024-04-29 22:31:16 +0200 |
|---|---|---|
| committer | Peter Kövesdi <[email protected]> | 2024-04-29 22:31:16 +0200 |
| commit | b6f9dbfb5b66190cd8d798ec0f99a7f3cdeb8ea0 (patch) | |
| tree | 032ef2c0c4b7a6438eb8fd582a93123afbd5ae79 | |
| parent | 679160a1c573709ccf2c54755e69ea9e1b5a209e (diff) | |
fixed: example loops crashing after 256 passes
| -rw-r--r-- | examples/stm32f1/src/bin/can.rs | 4 | ||||
| -rw-r--r-- | examples/stm32f4/src/bin/can.rs | 2 | ||||
| -rw-r--r-- | examples/stm32f4/src/bin/wdt.rs | 2 | ||||
| -rw-r--r-- | examples/stm32g4/src/bin/can.rs | 4 | ||||
| -rw-r--r-- | examples/stm32h5/src/bin/can.rs | 2 | ||||
| -rw-r--r-- | examples/stm32h7/src/bin/can.rs | 2 | ||||
| -rw-r--r-- | examples/stm32u0/src/bin/wdt.rs | 2 |
7 files changed, 9 insertions, 9 deletions
diff --git a/examples/stm32f1/src/bin/can.rs b/examples/stm32f1/src/bin/can.rs index 1c13d623d..ad0c8a5a5 100644 --- a/examples/stm32f1/src/bin/can.rs +++ b/examples/stm32f1/src/bin/can.rs | |||
| @@ -85,7 +85,7 @@ async fn main(_spawner: Spawner) { | |||
| 85 | defmt::println!("Error {}", err); | 85 | defmt::println!("Error {}", err); |
| 86 | } | 86 | } |
| 87 | } | 87 | } |
| 88 | i += 1; | 88 | i = i.wrapping_add(1); |
| 89 | } | 89 | } |
| 90 | 90 | ||
| 91 | */ | 91 | */ |
| @@ -135,6 +135,6 @@ async fn main(_spawner: Spawner) { | |||
| 135 | defmt::println!("Error {}", err); | 135 | defmt::println!("Error {}", err); |
| 136 | } | 136 | } |
| 137 | } | 137 | } |
| 138 | i += 1; | 138 | i = i.wrapping_add(1); |
| 139 | } | 139 | } |
| 140 | } | 140 | } |
diff --git a/examples/stm32f4/src/bin/can.rs b/examples/stm32f4/src/bin/can.rs index cedc057a7..8e3beee24 100644 --- a/examples/stm32f4/src/bin/can.rs +++ b/examples/stm32f4/src/bin/can.rs | |||
| @@ -63,6 +63,6 @@ async fn main(_spawner: Spawner) { | |||
| 63 | envelope.frame.data()[0], | 63 | envelope.frame.data()[0], |
| 64 | latency.as_micros() | 64 | latency.as_micros() |
| 65 | ); | 65 | ); |
| 66 | i += 1; | 66 | i = i.wrapping_add(1); |
| 67 | } | 67 | } |
| 68 | } | 68 | } |
diff --git a/examples/stm32f4/src/bin/wdt.rs b/examples/stm32f4/src/bin/wdt.rs index ea27ebce0..430898b40 100644 --- a/examples/stm32f4/src/bin/wdt.rs +++ b/examples/stm32f4/src/bin/wdt.rs | |||
| @@ -36,6 +36,6 @@ async fn main(_spawner: Spawner) { | |||
| 36 | wdt.pet(); | 36 | wdt.pet(); |
| 37 | } | 37 | } |
| 38 | 38 | ||
| 39 | i += 1; | 39 | i = i.wrapping_add(1); |
| 40 | } | 40 | } |
| 41 | } | 41 | } |
diff --git a/examples/stm32g4/src/bin/can.rs b/examples/stm32g4/src/bin/can.rs index 7836334af..90004f874 100644 --- a/examples/stm32g4/src/bin/can.rs +++ b/examples/stm32g4/src/bin/can.rs | |||
| @@ -192,7 +192,7 @@ async fn main(_spawner: Spawner) { | |||
| 192 | 192 | ||
| 193 | Timer::after_millis(250).await; | 193 | Timer::after_millis(250).await; |
| 194 | 194 | ||
| 195 | i += 1; | 195 | i = i.wrapping_add(1); |
| 196 | } | 196 | } |
| 197 | } else { | 197 | } else { |
| 198 | static TX_BUF: StaticCell<can::TxBuf<8>> = StaticCell::new(); | 198 | static TX_BUF: StaticCell<can::TxBuf<8>> = StaticCell::new(); |
| @@ -228,7 +228,7 @@ async fn main(_spawner: Spawner) { | |||
| 228 | 228 | ||
| 229 | Timer::after_millis(250).await; | 229 | Timer::after_millis(250).await; |
| 230 | 230 | ||
| 231 | i += 1; | 231 | i = i.wrapping_add(1); |
| 232 | } | 232 | } |
| 233 | } | 233 | } |
| 234 | } | 234 | } |
diff --git a/examples/stm32h5/src/bin/can.rs b/examples/stm32h5/src/bin/can.rs index dc77ec3bf..194239d47 100644 --- a/examples/stm32h5/src/bin/can.rs +++ b/examples/stm32h5/src/bin/can.rs | |||
| @@ -93,6 +93,6 @@ async fn main(_spawner: Spawner) { | |||
| 93 | 93 | ||
| 94 | Timer::after_millis(250).await; | 94 | Timer::after_millis(250).await; |
| 95 | 95 | ||
| 96 | i += 1; | 96 | i = i.wrapping_add(1); |
| 97 | } | 97 | } |
| 98 | } | 98 | } |
diff --git a/examples/stm32h7/src/bin/can.rs b/examples/stm32h7/src/bin/can.rs index a889d5860..0af11ef3e 100644 --- a/examples/stm32h7/src/bin/can.rs +++ b/examples/stm32h7/src/bin/can.rs | |||
| @@ -93,6 +93,6 @@ async fn main(_spawner: Spawner) { | |||
| 93 | 93 | ||
| 94 | Timer::after_millis(250).await; | 94 | Timer::after_millis(250).await; |
| 95 | 95 | ||
| 96 | i += 1; | 96 | i = i.wrapping_add(1); |
| 97 | } | 97 | } |
| 98 | } | 98 | } |
diff --git a/examples/stm32u0/src/bin/wdt.rs b/examples/stm32u0/src/bin/wdt.rs index f6276e2e9..8f9ea516d 100644 --- a/examples/stm32u0/src/bin/wdt.rs +++ b/examples/stm32u0/src/bin/wdt.rs | |||
| @@ -36,6 +36,6 @@ async fn main(_spawner: Spawner) { | |||
| 36 | wdt.pet(); | 36 | wdt.pet(); |
| 37 | } | 37 | } |
| 38 | 38 | ||
| 39 | i += 1; | 39 | i = i.wrapping_add(1); |
| 40 | } | 40 | } |
| 41 | } | 41 | } |
