Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-schievink committed Jul 7, 2021
1 parent 3ea49b7 commit 9185196
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions nrf-hal-common/src/usbd.rs
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
use core::marker::PhantomData;

use crate::clocks::ExternalOscillator;
use crate::pac::USBD;
use crate::Clocks;

pub use nrf_usbd::Usbd;

#[allow(dead_code)] // fields are unused and only hold ownership
pub struct UsbPeripheral<'a> {
usbd: USBD,
clocks: &'a (),
_usbd: USBD,
_clocks: PhantomData<&'a ()>,
}

impl<'a> UsbPeripheral<'a> {
pub fn new<L, LSTAT>(usbd: USBD, _clocks: &'a Clocks<ExternalOscillator, L, LSTAT>) -> Self {
Self { usbd, clocks: &() }
Self {
_usbd: usbd,
_clocks: PhantomData,
}
}
}

Expand Down

0 comments on commit 9185196

Please sign in to comment.