Fix unused field warnings

This commit is contained in:
Rukai
2021-05-17 20:23:04 +10:00
parent 149ddf2f29
commit 3e83acc1cb
6 changed files with 15 additions and 32 deletions

View File

@ -26,7 +26,6 @@ pub enum Prescaler {
/// Interface to the UARTE peripheral
pub struct Pwm<'d, T: Instance> {
peri: T,
phantom: PhantomData<&'d mut T>,
}
@ -41,13 +40,13 @@ impl<'d, T: Instance> Pwm<'d, T> {
/// or [`receive`](Pwm::receive).
#[allow(unused_unsafe)]
pub fn new(
pwm: impl Unborrow<Target = T> + 'd,
_pwm: impl Unborrow<Target = T> + 'd,
ch0: impl Unborrow<Target = impl GpioOptionalPin> + 'd,
ch1: impl Unborrow<Target = impl GpioOptionalPin> + 'd,
ch2: impl Unborrow<Target = impl GpioOptionalPin> + 'd,
ch3: impl Unborrow<Target = impl GpioOptionalPin> + 'd,
) -> Self {
unborrow!(pwm, ch0, ch1, ch2, ch3);
unborrow!(ch0, ch1, ch2, ch3);
let r = T::regs();
let s = T::state();
@ -97,7 +96,6 @@ impl<'d, T: Instance> Pwm<'d, T> {
r.loop_.write(|w| w.cnt().disabled());
Self {
peri: pwm,
phantom: PhantomData,
}
}