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 @@ -98,6 +98,6 @@ fn main() -> ! {
98
98
_ => { }
99
99
}
100
100
101
- led. set_low ( ) ; // Turn off
101
+ led. set_low ( ) . ok ( ) ; // Turn off
102
102
}
103
103
}
Original file line number Diff line number Diff line change @@ -102,12 +102,12 @@ impl MonoTimer {
102
102
}
103
103
104
104
/// Returns the frequency at which the monotonic timer is operating at
105
- pub fn frequency ( & self ) -> Hertz {
105
+ pub fn frequency ( self ) -> Hertz {
106
106
self . frequency
107
107
}
108
108
109
109
/// Returns an `Instant` corresponding to "now"
110
- pub fn now ( & self ) -> Instant {
110
+ pub fn now ( self ) -> Instant {
111
111
Instant {
112
112
now : DWT :: get_cycle_count ( ) ,
113
113
}
@@ -122,7 +122,7 @@ pub struct Instant {
122
122
123
123
impl Instant {
124
124
/// Ticks elapsed since the `Instant` was created
125
- pub fn elapsed ( & self ) -> u32 {
125
+ pub fn elapsed ( self ) -> u32 {
126
126
DWT :: get_cycle_count ( ) . wrapping_sub ( self . now )
127
127
}
128
128
}
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ unsafe impl UsbPeripheral for Peripheral {
30
30
const EP_MEMORY_SIZE : usize = 1024 ;
31
31
32
32
fn enable ( ) {
33
- let rcc = unsafe { ( & * RCC :: ptr ( ) ) } ;
33
+ let rcc = unsafe { & * RCC :: ptr ( ) } ;
34
34
35
35
cortex_m:: interrupt:: free ( |_| {
36
36
// Enable USB peripheral
You can’t perform that action at this time.
0 commit comments