File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -112,15 +112,15 @@ fn main() -> ! {
112
112
let mut cycles = 0 ;
113
113
for _ in 0 ..10 {
114
114
cycles += {
115
- let start = DWT :: get_cycle_count ( ) ;
115
+ let start = DWT :: cycle_count ( ) ;
116
116
117
117
// Start block
118
118
transfer. start ( |_| { } ) ;
119
119
120
120
// Wait for transfer to complete
121
121
while !transfer. get_transfer_complete_flag ( ) { }
122
122
123
- DWT :: get_cycle_count ( ) - start
123
+ DWT :: cycle_count ( ) - start
124
124
} ;
125
125
}
126
126
Original file line number Diff line number Diff line change @@ -141,14 +141,14 @@ fn main() -> ! {
141
141
let mut buffer = [ 0u8 ; 5120 ] ;
142
142
143
143
cp. DWT . enable_cycle_counter ( ) ;
144
- let start = pac:: DWT :: get_cycle_count ( ) ;
144
+ let start = pac:: DWT :: cycle_count ( ) ;
145
145
146
146
for i in 0 ..10 {
147
147
// Read 10 blocks
148
148
sdmmc. read_blocks ( 10 * i, & mut buffer) . unwrap ( ) ;
149
149
}
150
150
151
- let end = pac:: DWT :: get_cycle_count ( ) ;
151
+ let end = pac:: DWT :: cycle_count ( ) ;
152
152
let duration = ( end - start) as f32 / ccdr. clocks . c_ck ( ) . 0 as f32 ;
153
153
154
154
info ! ( "Read 100 blocks at {} bytes/s" , 5120. / duration) ;
Original file line number Diff line number Diff line change @@ -273,6 +273,6 @@ pub struct Instant {
273
273
impl Instant {
274
274
/// Ticks elapsed since the `Instant` was created
275
275
pub fn elapsed ( & self ) -> u32 {
276
- DWT :: get_cycle_count ( ) . wrapping_sub ( self . now )
276
+ DWT :: cycle_count ( ) . wrapping_sub ( self . now )
277
277
}
278
278
}
You can’t perform that action at this time.
0 commit comments