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 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
#[doc = "Reader of register AIRCR"] pub type R = crate::R<u32, super::AIRCR>; #[doc = "Writer for register AIRCR"] pub type W = crate::W<u32, super::AIRCR>; #[doc = "Register AIRCR `reset()`'s with value 0"] impl crate::ResetValue for super::AIRCR { type Type = u32; #[inline(always)] fn reset_value() -> Self::Type { 0 } } #[doc = "Reader of field `VECTKEY`"] pub type VECTKEY_R = crate::R<u16, u16>; #[doc = "Write proxy for field `VECTKEY`"] pub struct VECTKEY_W<'a> { w: &'a mut W, } impl<'a> VECTKEY_W<'a> { #[doc = r"Writes raw bits to the field"] #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { self.w.bits = (self.w.bits & !(0xffff << 16)) | (((value as u32) & 0xffff) << 16); self.w } } #[doc = "Reader of field `ENDIANESS`"] pub type ENDIANESS_R = crate::R<bool, bool>; #[doc = "Reader of field `SYSRESETREQ`"] pub type SYSRESETREQ_R = crate::R<bool, bool>; #[doc = "Write proxy for field `SYSRESETREQ`"] pub struct SYSRESETREQ_W<'a> { w: &'a mut W, } impl<'a> SYSRESETREQ_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } #[doc = "Reader of field `VECTCLRACTIVE`"] pub type VECTCLRACTIVE_R = crate::R<bool, bool>; #[doc = "Write proxy for field `VECTCLRACTIVE`"] pub struct VECTCLRACTIVE_W<'a> { w: &'a mut W, } impl<'a> VECTCLRACTIVE_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } impl R { #[doc = "Bits 16:31 - Register key:\\n Reads as Unknown\\n On writes, write 0x05FA to VECTKEY, otherwise the write is ignored."] #[inline(always)] pub fn vectkey(&self) -> VECTKEY_R { VECTKEY_R::new(((self.bits >> 16) & 0xffff) as u16) } #[doc = "Bit 15 - Data endianness implemented:\\n 0 = Little-endian."] #[inline(always)] pub fn endianess(&self) -> ENDIANESS_R { ENDIANESS_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 2 - Writing 1 to this bit causes the SYSRESETREQ signal to the outer system to be asserted to request a reset. The intention is to force a large system reset of all major components except for debug. The C_HALT bit in the DHCSR is cleared as a result of the system reset requested. The debugger does not lose contact with the device."] #[inline(always)] pub fn sysresetreq(&self) -> SYSRESETREQ_R { SYSRESETREQ_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - Clears all active state information for fixed and configurable exceptions. This bit: is self-clearing, can only be set by the DAP when the core is halted. When set: clears all active exception status of the processor, forces a return to Thread mode, forces an IPSR of 0. A debugger must re-initialize the stack."] #[inline(always)] pub fn vectclractive(&self) -> VECTCLRACTIVE_R { VECTCLRACTIVE_R::new(((self.bits >> 1) & 0x01) != 0) } } impl W { #[doc = "Bits 16:31 - Register key:\\n Reads as Unknown\\n On writes, write 0x05FA to VECTKEY, otherwise the write is ignored."] #[inline(always)] pub fn vectkey(&mut self) -> VECTKEY_W { VECTKEY_W { w: self } } #[doc = "Bit 2 - Writing 1 to this bit causes the SYSRESETREQ signal to the outer system to be asserted to request a reset. The intention is to force a large system reset of all major components except for debug. The C_HALT bit in the DHCSR is cleared as a result of the system reset requested. The debugger does not lose contact with the device."] #[inline(always)] pub fn sysresetreq(&mut self) -> SYSRESETREQ_W { SYSRESETREQ_W { w: self } } #[doc = "Bit 1 - Clears all active state information for fixed and configurable exceptions. This bit: is self-clearing, can only be set by the DAP when the core is halted. When set: clears all active exception status of the processor, forces a return to Thread mode, forces an IPSR of 0. A debugger must re-initialize the stack."] #[inline(always)] pub fn vectclractive(&mut self) -> VECTCLRACTIVE_W { VECTCLRACTIVE_W { w: self } } }