py32f0/py32f002b/tim14/
sr.rs1pub struct R(crate::R<SR_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<SR_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<SR_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<SR_SPEC>) -> Self {
13 R(reader)
14 }
15}
16pub struct W(crate::W<SR_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<SR_SPEC>;
20 #[inline(always)]
21 fn deref(&self) -> &Self::Target {
22 &self.0
23 }
24}
25impl core::ops::DerefMut for W {
26 #[inline(always)]
27 fn deref_mut(&mut self) -> &mut Self::Target {
28 &mut self.0
29 }
30}
31impl From<crate::W<SR_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<SR_SPEC>) -> Self {
34 W(writer)
35 }
36}
37pub type UIF_R = crate::BitReader<bool>;
39pub type UIF_W<'a, const O: u8> = crate::BitWriter<'a, u32, SR_SPEC, bool, O>;
41pub type CC1IF_R = crate::BitReader<bool>;
43pub type CC1IF_W<'a, const O: u8> = crate::BitWriter<'a, u32, SR_SPEC, bool, O>;
45pub type CC1OF_R = crate::BitReader<bool>;
47pub type CC1OF_W<'a, const O: u8> = crate::BitWriter<'a, u32, SR_SPEC, bool, O>;
49pub type IC1IR_R = crate::BitReader<bool>;
51pub type IC1IR_W<'a, const O: u8> = crate::BitWriter<'a, u32, SR_SPEC, bool, O>;
53pub type IC1IF_R = crate::BitReader<bool>;
55pub type IC1IF_W<'a, const O: u8> = crate::BitWriter<'a, u32, SR_SPEC, bool, O>;
57impl R {
58 #[inline(always)]
60 pub fn uif(&self) -> UIF_R {
61 UIF_R::new((self.bits & 1) != 0)
62 }
63 #[inline(always)]
65 pub fn cc1if(&self) -> CC1IF_R {
66 CC1IF_R::new(((self.bits >> 1) & 1) != 0)
67 }
68 #[inline(always)]
70 pub fn cc1of(&self) -> CC1OF_R {
71 CC1OF_R::new(((self.bits >> 9) & 1) != 0)
72 }
73 #[inline(always)]
75 pub fn ic1ir(&self) -> IC1IR_R {
76 IC1IR_R::new(((self.bits >> 16) & 1) != 0)
77 }
78 #[inline(always)]
80 pub fn ic1if(&self) -> IC1IF_R {
81 IC1IF_R::new(((self.bits >> 20) & 1) != 0)
82 }
83}
84impl W {
85 #[inline(always)]
87 #[must_use]
88 pub fn uif(&mut self) -> UIF_W<0> {
89 UIF_W::new(self)
90 }
91 #[inline(always)]
93 #[must_use]
94 pub fn cc1if(&mut self) -> CC1IF_W<1> {
95 CC1IF_W::new(self)
96 }
97 #[inline(always)]
99 #[must_use]
100 pub fn cc1of(&mut self) -> CC1OF_W<9> {
101 CC1OF_W::new(self)
102 }
103 #[inline(always)]
105 #[must_use]
106 pub fn ic1ir(&mut self) -> IC1IR_W<16> {
107 IC1IR_W::new(self)
108 }
109 #[inline(always)]
111 #[must_use]
112 pub fn ic1if(&mut self) -> IC1IF_W<20> {
113 IC1IF_W::new(self)
114 }
115 #[inline(always)]
117 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
118 self.0.bits(bits);
119 self
120 }
121}
122pub struct SR_SPEC;
128impl crate::RegisterSpec for SR_SPEC {
129 type Ux = u32;
130}
131impl crate::Readable for SR_SPEC {
133 type Reader = R;
134}
135impl crate::Writable for SR_SPEC {
137 type Writer = W;
138 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
139 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
140}
141impl crate::Resettable for SR_SPEC {
143 const RESET_VALUE: Self::Ux = 0;
144}