stm32f2/stm32f215/dbgmcu/
cr.rs1pub type R = crate::R<CRrs>;
3pub type W = crate::W<CRrs>;
5pub type DBG_SLEEP_R = crate::BitReader;
7pub type DBG_SLEEP_W<'a, REG> = crate::BitWriter<'a, REG>;
9pub type DBG_STOP_R = crate::BitReader;
11pub type DBG_STOP_W<'a, REG> = crate::BitWriter<'a, REG>;
13pub type DBG_STANDBY_R = crate::BitReader;
15pub type DBG_STANDBY_W<'a, REG> = crate::BitWriter<'a, REG>;
17pub type TRACE_IOEN_R = crate::BitReader;
19pub type TRACE_IOEN_W<'a, REG> = crate::BitWriter<'a, REG>;
21pub type TRACE_MODE_R = crate::FieldReader;
23pub type TRACE_MODE_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
25impl R {
26 #[inline(always)]
28 pub fn dbg_sleep(&self) -> DBG_SLEEP_R {
29 DBG_SLEEP_R::new((self.bits & 1) != 0)
30 }
31 #[inline(always)]
33 pub fn dbg_stop(&self) -> DBG_STOP_R {
34 DBG_STOP_R::new(((self.bits >> 1) & 1) != 0)
35 }
36 #[inline(always)]
38 pub fn dbg_standby(&self) -> DBG_STANDBY_R {
39 DBG_STANDBY_R::new(((self.bits >> 2) & 1) != 0)
40 }
41 #[inline(always)]
43 pub fn trace_ioen(&self) -> TRACE_IOEN_R {
44 TRACE_IOEN_R::new(((self.bits >> 5) & 1) != 0)
45 }
46 #[inline(always)]
48 pub fn trace_mode(&self) -> TRACE_MODE_R {
49 TRACE_MODE_R::new(((self.bits >> 6) & 3) as u8)
50 }
51}
52impl core::fmt::Debug for R {
53 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
54 f.debug_struct("CR")
55 .field("dbg_sleep", &self.dbg_sleep())
56 .field("dbg_stop", &self.dbg_stop())
57 .field("dbg_standby", &self.dbg_standby())
58 .field("trace_ioen", &self.trace_ioen())
59 .field("trace_mode", &self.trace_mode())
60 .finish()
61 }
62}
63impl W {
64 #[inline(always)]
66 pub fn dbg_sleep(&mut self) -> DBG_SLEEP_W<CRrs> {
67 DBG_SLEEP_W::new(self, 0)
68 }
69 #[inline(always)]
71 pub fn dbg_stop(&mut self) -> DBG_STOP_W<CRrs> {
72 DBG_STOP_W::new(self, 1)
73 }
74 #[inline(always)]
76 pub fn dbg_standby(&mut self) -> DBG_STANDBY_W<CRrs> {
77 DBG_STANDBY_W::new(self, 2)
78 }
79 #[inline(always)]
81 pub fn trace_ioen(&mut self) -> TRACE_IOEN_W<CRrs> {
82 TRACE_IOEN_W::new(self, 5)
83 }
84 #[inline(always)]
86 pub fn trace_mode(&mut self) -> TRACE_MODE_W<CRrs> {
87 TRACE_MODE_W::new(self, 6)
88 }
89}
90pub struct CRrs;
96impl crate::RegisterSpec for CRrs {
97 type Ux = u32;
98}
99impl crate::Readable for CRrs {}
101impl crate::Writable for CRrs {
103 type Safety = crate::Unsafe;
104}
105impl crate::Resettable for CRrs {}