remove dead code when v1

This commit is contained in:
jrmoulton 2024-06-18 11:17:15 -06:00
parent bec0eac5ab
commit 8b50f2a58b
No known key found for this signature in database
2 changed files with 9 additions and 6 deletions

View File

@ -46,12 +46,6 @@ impl From<u16> for Address {
}
}
impl Address {
pub(super) fn add_mode(&self) -> stm32_metapac::i2c::vals::Addmode {
match self {
Address::SevenBit(_) => stm32_metapac::i2c::vals::Addmode::BIT7,
Address::TenBit(_) => stm32_metapac::i2c::vals::Addmode::BIT10,
}
}
/// Get the inner address as a u16.
///
/// For 7 bit addresses, the u8 that was used to store the address is returned as a u16.

View File

@ -27,6 +27,15 @@ impl From<AddrMask> for Oamsk {
}
}
impl Address {
pub(super) fn add_mode(&self) -> stm32_metapac::i2c::vals::Addmode {
match self {
Address::SevenBit(_) => stm32_metapac::i2c::vals::Addmode::BIT7,
Address::TenBit(_) => stm32_metapac::i2c::vals::Addmode::BIT10,
}
}
}
pub(crate) unsafe fn on_interrupt<T: Instance>() {
let regs = T::info().regs;
let isr = regs.isr().read();