#[doc = "Register `CCR` 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 = "Unaligned accesses generates a Hard Fault\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum UNALIGN_TRP_A { #[doc = "0: Do not trap unaligned halfword and word accesses"] VALUE_0 = 0, #[doc = "1: Trap unaligned halfword and word accesses"] VALUE_1 = 1, } impl From for bool { #[inline(always)] fn from(variant: UNALIGN_TRP_A) -> Self { variant as u8 != 0 } } #[doc = "Field `UNALIGN_TRP` reader - Unaligned accesses generates a Hard Fault"] pub struct UNALIGN_TRP_R(crate::FieldReader); impl UNALIGN_TRP_R { pub(crate) fn new(bits: bool) -> Self { UNALIGN_TRP_R(crate::FieldReader::new(bits)) } #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> UNALIGN_TRP_A { match self.bits { false => UNALIGN_TRP_A::VALUE_0, true => UNALIGN_TRP_A::VALUE_1, } } #[doc = "Checks if the value of the field is `VALUE_0`"] #[inline(always)] pub fn is_value_0(&self) -> bool { **self == UNALIGN_TRP_A::VALUE_0 } #[doc = "Checks if the value of the field is `VALUE_1`"] #[inline(always)] pub fn is_value_1(&self) -> bool { **self == UNALIGN_TRP_A::VALUE_1 } } impl core::ops::Deref for UNALIGN_TRP_R { type Target = crate::FieldReader; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } #[doc = "Stack 8-byte aligned on exception entry\n\nValue on reset: 1"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum STKALIGN_A { #[doc = "0: 4-byte aligned"] VALUE_0 = 0, #[doc = "1: 8-byte aligned"] VALUE_1 = 1, } impl From for bool { #[inline(always)] fn from(variant: STKALIGN_A) -> Self { variant as u8 != 0 } } #[doc = "Field `STKALIGN` reader - Stack 8-byte aligned on exception entry"] pub struct STKALIGN_R(crate::FieldReader); impl STKALIGN_R { pub(crate) fn new(bits: bool) -> Self { STKALIGN_R(crate::FieldReader::new(bits)) } #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> STKALIGN_A { match self.bits { false => STKALIGN_A::VALUE_0, true => STKALIGN_A::VALUE_1, } } #[doc = "Checks if the value of the field is `VALUE_0`"] #[inline(always)] pub fn is_value_0(&self) -> bool { **self == STKALIGN_A::VALUE_0 } #[doc = "Checks if the value of the field is `VALUE_1`"] #[inline(always)] pub fn is_value_1(&self) -> bool { **self == STKALIGN_A::VALUE_1 } } impl core::ops::Deref for STKALIGN_R { type Target = crate::FieldReader; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } impl R { #[doc = "Bit 3 - Unaligned accesses generates a Hard Fault"] #[inline(always)] pub fn unalign_trp(&self) -> UNALIGN_TRP_R { UNALIGN_TRP_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 9 - Stack 8-byte aligned on exception entry"] #[inline(always)] pub fn stkalign(&self) -> STKALIGN_R { STKALIGN_R::new(((self.bits >> 9) & 0x01) != 0) } } #[doc = "Configuration and Control Register\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 [ccr](index.html) module"] pub struct CCR_SPEC; impl crate::RegisterSpec for CCR_SPEC { type Ux = u32; } #[doc = "`read()` method returns [ccr::R](R) reader structure"] impl crate::Readable for CCR_SPEC { type Reader = R; } #[doc = "`reset()` method sets CCR to value 0x0204"] impl crate::Resettable for CCR_SPEC { #[inline(always)] fn reset_value() -> Self::Ux { 0x0204 } }