Skip to content

Commit

Permalink
fix otg_fs method
Browse files Browse the repository at this point in the history
  • Loading branch information
ryankurte committed Jun 28, 2020
1 parent 7827992 commit b096bde
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/otg_fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ unsafe impl UsbPeripheral for USB {
const HIGH_SPEED: bool = false;
const FIFO_DEPTH_WORDS: usize = 320;

fn try_enable() -> Result<(), Infallible> {
fn enable() {
let rcc = unsafe { &*stm32::RCC::ptr() };

cortex_m::interrupt::free(|_| {
Expand All @@ -40,8 +40,6 @@ unsafe impl UsbPeripheral for USB {
rcc.ahb2rstr.modify(|_, w| w.otgfsrst().set_bit());
rcc.ahb2rstr.modify(|_, w| w.otgfsrst().clear_bit());
});

Ok(())
}
}

Expand Down

0 comments on commit b096bde

Please sign in to comment.