#[doc = "Register `PPFC` reader"] pub struct R(crate::R); impl core::ops::Deref for R { type Target = crate::R; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } impl From> for R { #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `PPFC` reader - Pre-programmed factory code present."] pub type PPFC_R = crate::FieldReader; #[doc = "Pre-programmed factory code present.\n\nValue on reset: 255"] #[derive(Clone, Copy, Debug, PartialEq)] #[repr(u8)] pub enum PPFC_A { #[doc = "255: Not present."] NOT_PRESENT = 255, #[doc = "0: Present."] PRESENT = 0, } impl From for u8 { #[inline(always)] fn from(variant: PPFC_A) -> Self { variant as _ } } impl PPFC_R { #[doc = "Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> Option { match self.bits { 255 => Some(PPFC_A::NOT_PRESENT), 0 => Some(PPFC_A::PRESENT), _ => None, } } #[doc = "Checks if the value of the field is `NOT_PRESENT`"] #[inline(always)] pub fn is_not_present(&self) -> bool { *self == PPFC_A::NOT_PRESENT } #[doc = "Checks if the value of the field is `PRESENT`"] #[inline(always)] pub fn is_present(&self) -> bool { *self == PPFC_A::PRESENT } } impl R { #[doc = "Bits 0:7 - Pre-programmed factory code present."] #[inline(always)] pub fn ppfc(&self) -> PPFC_R { PPFC_R::new((self.bits & 0xff) as u8) } } #[doc = "Pre-programmed factory code present.\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ppfc](index.html) module"] pub struct PPFC_SPEC; impl crate::RegisterSpec for PPFC_SPEC { type Ux = u32; } #[doc = "`read()` method returns [ppfc::R](R) reader structure"] impl crate::Readable for PPFC_SPEC { type Reader = R; } #[doc = "`reset()` method sets PPFC to value 0xffff_ffff"] impl crate::Resettable for PPFC_SPEC { #[inline(always)] fn reset_value() -> Self::Ux { 0xffff_ffff } }