1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
#[doc = "Reader of register VERID"] pub type R = crate::R<u32, super::VERID>; #[doc = "Feature Identification Number\n\nValue on reset: 3"] #[derive(Clone, Copy, Debug, PartialEq)] #[repr(u16)] pub enum FEATURE_A { #[doc = "1: Standard feature set."] FEATURE_1 = 1, #[doc = "3: Standard feature set with MODEM/IrDA support."] FEATURE_3 = 3, } impl From<FEATURE_A> for u16 { #[inline(always)] fn from(variant: FEATURE_A) -> Self { variant as _ } } #[doc = "Reader of field `FEATURE`"] pub type FEATURE_R = crate::R<u16, FEATURE_A>; impl FEATURE_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> crate::Variant<u16, FEATURE_A> { use crate::Variant::*; match self.bits { 1 => Val(FEATURE_A::FEATURE_1), 3 => Val(FEATURE_A::FEATURE_3), i => Res(i), } } #[doc = "Checks if the value of the field is `FEATURE_1`"] #[inline(always)] pub fn is_feature_1(&self) -> bool { *self == FEATURE_A::FEATURE_1 } #[doc = "Checks if the value of the field is `FEATURE_3`"] #[inline(always)] pub fn is_feature_3(&self) -> bool { *self == FEATURE_A::FEATURE_3 } } #[doc = "Reader of field `MINOR`"] pub type MINOR_R = crate::R<u8, u8>; #[doc = "Reader of field `MAJOR`"] pub type MAJOR_R = crate::R<u8, u8>; impl R { #[doc = "Bits 0:15 - Feature Identification Number"] #[inline(always)] pub fn feature(&self) -> FEATURE_R { FEATURE_R::new((self.bits & 0xffff) as u16) } #[doc = "Bits 16:23 - Minor Version Number"] #[inline(always)] pub fn minor(&self) -> MINOR_R { MINOR_R::new(((self.bits >> 16) & 0xff) as u8) } #[doc = "Bits 24:31 - Major Version Number"] #[inline(always)] pub fn major(&self) -> MAJOR_R { MAJOR_R::new(((self.bits >> 24) & 0xff) as u8) } }