diff --git a/hal/src/gpio.rs b/hal/src/gpio.rs index 83f1c468fd..085db95786 100644 --- a/hal/src/gpio.rs +++ b/hal/src/gpio.rs @@ -202,6 +202,7 @@ pub(crate) mod sealed { macro_rules! af_trait { ($trt:ident, $method:ident) => { pub trait $trt { + #[allow(dead_code)] fn $method(&mut self, cs: &CriticalSection); } }; @@ -273,6 +274,7 @@ pub(crate) mod sealed { } /// Indicate a pin has any SPI NSS implementation. + #[allow(dead_code)] pub trait SpiNss {} /// Indicate a pin has any SPI SCK implementation. pub trait SpiSck {} diff --git a/hal/src/i2c.rs b/hal/src/i2c.rs index 703da71810..b3878e7ed9 100644 --- a/hal/src/i2c.rs +++ b/hal/src/i2c.rs @@ -76,15 +76,21 @@ macro_rules! busy_wait { } trait I2cBase { + #[allow(dead_code)] fn cr1(&self) -> &pac::i2c1::CR1; fn cr2(&self) -> &pac::i2c1::CR2; fn icr(&self) -> &pac::i2c1::ICR; fn isr(&self) -> &pac::i2c1::ISR; + #[allow(dead_code)] fn oar1(&self) -> &pac::i2c1::OAR1; + #[allow(dead_code)] fn oar2(&self) -> &pac::i2c1::OAR2; + #[allow(dead_code)] fn pecr(&self) -> &pac::i2c1::PECR; fn rxdr(&self) -> &pac::i2c1::RXDR; + #[allow(dead_code)] fn timeoutr(&self) -> &pac::i2c1::TIMEOUTR; + #[allow(dead_code)] fn timingr(&self) -> &pac::i2c1::TIMINGR; fn txdr(&self) -> &pac::i2c1::TXDR; diff --git a/hal/src/lptim/mod.rs b/hal/src/lptim/mod.rs index c0862773f8..434e1d8df8 100644 --- a/hal/src/lptim/mod.rs +++ b/hal/src/lptim/mod.rs @@ -108,7 +108,9 @@ pub(crate) mod sealed { fn autoreload(&self) -> u16; fn set_autoreload(&mut self, ar: u16); unsafe fn cnt() -> u16; + #[allow(dead_code)] fn set_or(&mut self, or: u32); + #[allow(dead_code)] fn set_rep(&mut self, rep: u8); }