stm32f1_staging/stm32f100/tim16/
bdtr.rs1pub type R = crate::R<BDTRrs>;
3pub type W = crate::W<BDTRrs>;
5pub type DTG_R = crate::FieldReader;
7pub type DTG_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
9pub type LOCK_R = crate::FieldReader;
11pub type LOCK_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
13pub type OSSI_R = crate::BitReader;
15pub type OSSI_W<'a, REG> = crate::BitWriter<'a, REG>;
17pub type OSSR_R = crate::BitReader;
19pub type OSSR_W<'a, REG> = crate::BitWriter<'a, REG>;
21pub type BKE_R = crate::BitReader;
23pub type BKE_W<'a, REG> = crate::BitWriter<'a, REG>;
25pub type BKP_R = crate::BitReader;
27pub type BKP_W<'a, REG> = crate::BitWriter<'a, REG>;
29pub type AOE_R = crate::BitReader;
31pub type AOE_W<'a, REG> = crate::BitWriter<'a, REG>;
33pub type MOE_R = crate::BitReader;
35pub type MOE_W<'a, REG> = crate::BitWriter<'a, REG>;
37impl R {
38 #[inline(always)]
40 pub fn dtg(&self) -> DTG_R {
41 DTG_R::new((self.bits & 0xff) as u8)
42 }
43 #[inline(always)]
45 pub fn lock(&self) -> LOCK_R {
46 LOCK_R::new(((self.bits >> 8) & 3) as u8)
47 }
48 #[inline(always)]
50 pub fn ossi(&self) -> OSSI_R {
51 OSSI_R::new(((self.bits >> 10) & 1) != 0)
52 }
53 #[inline(always)]
55 pub fn ossr(&self) -> OSSR_R {
56 OSSR_R::new(((self.bits >> 11) & 1) != 0)
57 }
58 #[inline(always)]
60 pub fn bke(&self) -> BKE_R {
61 BKE_R::new(((self.bits >> 12) & 1) != 0)
62 }
63 #[inline(always)]
65 pub fn bkp(&self) -> BKP_R {
66 BKP_R::new(((self.bits >> 13) & 1) != 0)
67 }
68 #[inline(always)]
70 pub fn aoe(&self) -> AOE_R {
71 AOE_R::new(((self.bits >> 14) & 1) != 0)
72 }
73 #[inline(always)]
75 pub fn moe(&self) -> MOE_R {
76 MOE_R::new(((self.bits >> 15) & 1) != 0)
77 }
78}
79impl core::fmt::Debug for R {
80 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
81 f.debug_struct("BDTR")
82 .field("moe", &self.moe())
83 .field("aoe", &self.aoe())
84 .field("bkp", &self.bkp())
85 .field("bke", &self.bke())
86 .field("ossr", &self.ossr())
87 .field("ossi", &self.ossi())
88 .field("lock", &self.lock())
89 .field("dtg", &self.dtg())
90 .finish()
91 }
92}
93impl W {
94 #[inline(always)]
96 pub fn dtg(&mut self) -> DTG_W<BDTRrs> {
97 DTG_W::new(self, 0)
98 }
99 #[inline(always)]
101 pub fn lock(&mut self) -> LOCK_W<BDTRrs> {
102 LOCK_W::new(self, 8)
103 }
104 #[inline(always)]
106 pub fn ossi(&mut self) -> OSSI_W<BDTRrs> {
107 OSSI_W::new(self, 10)
108 }
109 #[inline(always)]
111 pub fn ossr(&mut self) -> OSSR_W<BDTRrs> {
112 OSSR_W::new(self, 11)
113 }
114 #[inline(always)]
116 pub fn bke(&mut self) -> BKE_W<BDTRrs> {
117 BKE_W::new(self, 12)
118 }
119 #[inline(always)]
121 pub fn bkp(&mut self) -> BKP_W<BDTRrs> {
122 BKP_W::new(self, 13)
123 }
124 #[inline(always)]
126 pub fn aoe(&mut self) -> AOE_W<BDTRrs> {
127 AOE_W::new(self, 14)
128 }
129 #[inline(always)]
131 pub fn moe(&mut self) -> MOE_W<BDTRrs> {
132 MOE_W::new(self, 15)
133 }
134}
135pub struct BDTRrs;
141impl crate::RegisterSpec for BDTRrs {
142 type Ux = u32;
143}
144impl crate::Readable for BDTRrs {}
146impl crate::Writable for BDTRrs {
148 type Safety = crate::Unsafe;
149}
150impl crate::Resettable for BDTRrs {}