Skip to content

Commit

Permalink
Ignore new dead_code warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
newAM committed May 11, 2024
1 parent 69c9fd6 commit 1a01b68
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hal/src/gpio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
};
Expand Down Expand Up @@ -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 {}
Expand Down
6 changes: 6 additions & 0 deletions hal/src/i2c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 2 additions & 0 deletions hal/src/lptim/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 1a01b68

Please sign in to comment.