diff options
| author | Dion Dokter <[email protected]> | 2023-10-20 10:41:39 +0200 |
|---|---|---|
| committer | Dion Dokter <[email protected]> | 2023-10-20 10:41:39 +0200 |
| commit | 6f2995cd4c70a2b6c977f553a2d5efcd8216bba7 (patch) | |
| tree | f83efe25a091310eb0bd733f7d76dada741d3980 /embassy-stm32/src/timer/mod.rs | |
| parent | a9dc887060244403a1fe65611a1210f506e2858a (diff) | |
Invert assert
Diffstat (limited to 'embassy-stm32/src/timer/mod.rs')
| -rw-r--r-- | embassy-stm32/src/timer/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/embassy-stm32/src/timer/mod.rs b/embassy-stm32/src/timer/mod.rs index 755c27806..15eaf3536 100644 --- a/embassy-stm32/src/timer/mod.rs +++ b/embassy-stm32/src/timer/mod.rs | |||
| @@ -88,7 +88,7 @@ pub(crate) mod sealed { | |||
| 88 | let timer_enabled = Self::regs().cr1().read().cen(); | 88 | let timer_enabled = Self::regs().cr1().read().cen(); |
| 89 | // Changing from edge aligned to center aligned (and vice versa) is not allowed while the timer is running. | 89 | // Changing from edge aligned to center aligned (and vice versa) is not allowed while the timer is running. |
| 90 | // Changing direction is discouraged while the timer is running. | 90 | // Changing direction is discouraged while the timer is running. |
| 91 | assert!(timer_enabled); | 91 | assert!(!timer_enabled); |
| 92 | 92 | ||
| 93 | Self::regs_gp16().cr1().modify(|r| r.set_dir(dir)); | 93 | Self::regs_gp16().cr1().modify(|r| r.set_dir(dir)); |
| 94 | Self::regs_gp16().cr1().modify(|r| r.set_cms(cms)) | 94 | Self::regs_gp16().cr1().modify(|r| r.set_cms(cms)) |
