1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
//! Valid `BMP180` device ID. /// Valid `BMP180` device ID. #[repr(u8)] #[cfg_attr(feature = "impl-defmt-format", derive(defmt::Format))] #[cfg_attr(feature = "impl-debug", derive(core::fmt::Debug))] pub enum Id { /// Valid device ID. Valid = 0x55, } impl Id { /// Check if the device ID is valid. pub fn is_valid(id: u8) -> bool { id == Id::Valid as u8 } }