Skip to content

Commit 2cf6553

Browse files
committed
Pick up a depreciation warning from cortex-m v0.7.4
1 parent be64eb7 commit 2cf6553

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

examples/mdma_bursts.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,15 +112,15 @@ fn main() -> ! {
112112
let mut cycles = 0;
113113
for _ in 0..10 {
114114
cycles += {
115-
let start = DWT::get_cycle_count();
115+
let start = DWT::cycle_count();
116116

117117
// Start block
118118
transfer.start(|_| {});
119119

120120
// Wait for transfer to complete
121121
while !transfer.get_transfer_complete_flag() {}
122122

123-
DWT::get_cycle_count() - start
123+
DWT::cycle_count() - start
124124
};
125125
}
126126

examples/sdmmc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,14 +141,14 @@ fn main() -> ! {
141141
let mut buffer = [0u8; 5120];
142142

143143
cp.DWT.enable_cycle_counter();
144-
let start = pac::DWT::get_cycle_count();
144+
let start = pac::DWT::cycle_count();
145145

146146
for i in 0..10 {
147147
// Read 10 blocks
148148
sdmmc.read_blocks(10 * i, &mut buffer).unwrap();
149149
}
150150

151-
let end = pac::DWT::get_cycle_count();
151+
let end = pac::DWT::cycle_count();
152152
let duration = (end - start) as f32 / ccdr.clocks.c_ck().0 as f32;
153153

154154
info!("Read 100 blocks at {} bytes/s", 5120. / duration);

src/time.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,6 @@ pub struct Instant {
273273
impl Instant {
274274
/// Ticks elapsed since the `Instant` was created
275275
pub fn elapsed(&self) -> u32 {
276-
DWT::get_cycle_count().wrapping_sub(self.now)
276+
DWT::cycle_count().wrapping_sub(self.now)
277277
}
278278
}

0 commit comments

Comments
 (0)