We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ea91f18 commit 20a0007Copy full SHA for 20a0007
CHANGELOG.md
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
7
8
## [Unreleased]
9
10
+### Added
11
+
12
+- Added `DWT.set_cycle_count` (#347).
13
14
## [v0.7.3] - 2021-07-03
15
16
### Fixed
src/peripheral/dwt.rs
@@ -85,6 +85,13 @@ impl DWT {
85
unsafe { (*Self::ptr()).cyccnt.read() }
86
}
87
88
+ /// Set the cycle count
89
+ #[cfg(not(armv6m))]
90
+ #[inline]
91
+ pub fn set_cycle_count(&mut self, count: u32) {
92
+ unsafe { self.cyccnt.write(count) }
93
+ }
94
95
/// Removes the software lock on the DWT
96
///
97
/// Some devices, like the STM32F7, software lock the DWT after a power cycle.
0 commit comments