Skip to content

Commit

Permalink
Use variant for usb
Browse files Browse the repository at this point in the history
  • Loading branch information
Sh3Rm4n committed Dec 27, 2019
1 parent eb9ad5f commit 9938d06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/usb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ unsafe impl UsbPeripheral for Peripheral {

cortex_m::interrupt::free(|_| {
// Enable USB peripheral
rcc.apb1enr.modify(|_, w| w.usben().set_bit());
rcc.apb1enr.modify(|_, w| w.usben().enabled());

// Reset USB peripheral
rcc.apb1rstr.modify(|_, w| w.usbrst().set_bit());
rcc.apb1rstr.modify(|_, w| w.usbrst().reset());
rcc.apb1rstr.modify(|_, w| w.usbrst().clear_bit());
});
}
Expand Down

0 comments on commit 9938d06

Please sign in to comment.