Skip to content

Commit 9938d06

Browse files
committed
Use variant for usb
1 parent eb9ad5f commit 9938d06

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/usb.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ unsafe impl UsbPeripheral for Peripheral {
3434

3535
cortex_m::interrupt::free(|_| {
3636
// Enable USB peripheral
37-
rcc.apb1enr.modify(|_, w| w.usben().set_bit());
37+
rcc.apb1enr.modify(|_, w| w.usben().enabled());
3838

3939
// Reset USB peripheral
40-
rcc.apb1rstr.modify(|_, w| w.usbrst().set_bit());
40+
rcc.apb1rstr.modify(|_, w| w.usbrst().reset());
4141
rcc.apb1rstr.modify(|_, w| w.usbrst().clear_bit());
4242
});
4343
}

0 commit comments

Comments
 (0)