1#[doc = "Register `GTINTAD` reader"]
2pub struct R(crate::R<GTINTAD_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<GTINTAD_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<GTINTAD_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<GTINTAD_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `GTINTAD` writer"]
17pub struct W(crate::W<GTINTAD_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<GTINTAD_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<GTINTAD_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<GTINTAD_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `GRP` reader - Output Disable Source Select"]
38pub type GRP_R = crate::FieldReader<u8, GRP_A>;
39#[doc = "Output Disable Source Select\n\nValue on reset: 0"]
40#[derive(Clone, Copy, Debug, PartialEq, Eq)]
41#[repr(u8)]
42pub enum GRP_A {
43 #[doc = "0: Group A output disable request is selected"]
44 _00 = 0,
45 #[doc = "1: Group B output disable request is selected"]
46 _01 = 1,
47 #[doc = "2: Group C output disable request is selected"]
48 _10 = 2,
49 #[doc = "3: Group D output disable request is selected"]
50 _11 = 3,
51}
52impl From<GRP_A> for u8 {
53 #[inline(always)]
54 fn from(variant: GRP_A) -> Self {
55 variant as _
56 }
57}
58impl GRP_R {
59 #[doc = "Get enumerated values variant"]
60 #[inline(always)]
61 pub fn variant(&self) -> GRP_A {
62 match self.bits {
63 0 => GRP_A::_00,
64 1 => GRP_A::_01,
65 2 => GRP_A::_10,
66 3 => GRP_A::_11,
67 _ => unreachable!(),
68 }
69 }
70 #[doc = "Checks if the value of the field is `_00`"]
71 #[inline(always)]
72 pub fn is_00(&self) -> bool {
73 *self == GRP_A::_00
74 }
75 #[doc = "Checks if the value of the field is `_01`"]
76 #[inline(always)]
77 pub fn is_01(&self) -> bool {
78 *self == GRP_A::_01
79 }
80 #[doc = "Checks if the value of the field is `_10`"]
81 #[inline(always)]
82 pub fn is_10(&self) -> bool {
83 *self == GRP_A::_10
84 }
85 #[doc = "Checks if the value of the field is `_11`"]
86 #[inline(always)]
87 pub fn is_11(&self) -> bool {
88 *self == GRP_A::_11
89 }
90}
91#[doc = "Field `GRP` writer - Output Disable Source Select"]
92pub type GRP_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, GTINTAD_SPEC, u8, GRP_A, 2, O>;
93impl<'a, const O: u8> GRP_W<'a, O> {
94 #[doc = "Group A output disable request is selected"]
95 #[inline(always)]
96 pub fn _00(self) -> &'a mut W {
97 self.variant(GRP_A::_00)
98 }
99 #[doc = "Group B output disable request is selected"]
100 #[inline(always)]
101 pub fn _01(self) -> &'a mut W {
102 self.variant(GRP_A::_01)
103 }
104 #[doc = "Group C output disable request is selected"]
105 #[inline(always)]
106 pub fn _10(self) -> &'a mut W {
107 self.variant(GRP_A::_10)
108 }
109 #[doc = "Group D output disable request is selected"]
110 #[inline(always)]
111 pub fn _11(self) -> &'a mut W {
112 self.variant(GRP_A::_11)
113 }
114}
115#[doc = "Field `GRPABH` reader - Same Time Output Level High Disable Request Enable"]
116pub type GRPABH_R = crate::BitReader<GRPABH_A>;
117#[doc = "Same Time Output Level High Disable Request Enable\n\nValue on reset: 0"]
118#[derive(Clone, Copy, Debug, PartialEq, Eq)]
119pub enum GRPABH_A {
120 #[doc = "0: Same time output level high disable request disabled"]
121 _0 = 0,
122 #[doc = "1: Same time output level high disable request enabled"]
123 _1 = 1,
124}
125impl From<GRPABH_A> for bool {
126 #[inline(always)]
127 fn from(variant: GRPABH_A) -> Self {
128 variant as u8 != 0
129 }
130}
131impl GRPABH_R {
132 #[doc = "Get enumerated values variant"]
133 #[inline(always)]
134 pub fn variant(&self) -> GRPABH_A {
135 match self.bits {
136 false => GRPABH_A::_0,
137 true => GRPABH_A::_1,
138 }
139 }
140 #[doc = "Checks if the value of the field is `_0`"]
141 #[inline(always)]
142 pub fn is_0(&self) -> bool {
143 *self == GRPABH_A::_0
144 }
145 #[doc = "Checks if the value of the field is `_1`"]
146 #[inline(always)]
147 pub fn is_1(&self) -> bool {
148 *self == GRPABH_A::_1
149 }
150}
151#[doc = "Field `GRPABH` writer - Same Time Output Level High Disable Request Enable"]
152pub type GRPABH_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTINTAD_SPEC, GRPABH_A, O>;
153impl<'a, const O: u8> GRPABH_W<'a, O> {
154 #[doc = "Same time output level high disable request disabled"]
155 #[inline(always)]
156 pub fn _0(self) -> &'a mut W {
157 self.variant(GRPABH_A::_0)
158 }
159 #[doc = "Same time output level high disable request enabled"]
160 #[inline(always)]
161 pub fn _1(self) -> &'a mut W {
162 self.variant(GRPABH_A::_1)
163 }
164}
165#[doc = "Field `GRPABL` reader - Same Time Output Level Low Disable Request Enable"]
166pub type GRPABL_R = crate::BitReader<GRPABL_A>;
167#[doc = "Same Time Output Level Low Disable Request Enable\n\nValue on reset: 0"]
168#[derive(Clone, Copy, Debug, PartialEq, Eq)]
169pub enum GRPABL_A {
170 #[doc = "0: Same time output level low disable request disabled"]
171 _0 = 0,
172 #[doc = "1: Same time output level low disable request enabled"]
173 _1 = 1,
174}
175impl From<GRPABL_A> for bool {
176 #[inline(always)]
177 fn from(variant: GRPABL_A) -> Self {
178 variant as u8 != 0
179 }
180}
181impl GRPABL_R {
182 #[doc = "Get enumerated values variant"]
183 #[inline(always)]
184 pub fn variant(&self) -> GRPABL_A {
185 match self.bits {
186 false => GRPABL_A::_0,
187 true => GRPABL_A::_1,
188 }
189 }
190 #[doc = "Checks if the value of the field is `_0`"]
191 #[inline(always)]
192 pub fn is_0(&self) -> bool {
193 *self == GRPABL_A::_0
194 }
195 #[doc = "Checks if the value of the field is `_1`"]
196 #[inline(always)]
197 pub fn is_1(&self) -> bool {
198 *self == GRPABL_A::_1
199 }
200}
201#[doc = "Field `GRPABL` writer - Same Time Output Level Low Disable Request Enable"]
202pub type GRPABL_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTINTAD_SPEC, GRPABL_A, O>;
203impl<'a, const O: u8> GRPABL_W<'a, O> {
204 #[doc = "Same time output level low disable request disabled"]
205 #[inline(always)]
206 pub fn _0(self) -> &'a mut W {
207 self.variant(GRPABL_A::_0)
208 }
209 #[doc = "Same time output level low disable request enabled"]
210 #[inline(always)]
211 pub fn _1(self) -> &'a mut W {
212 self.variant(GRPABL_A::_1)
213 }
214}
215impl R {
216 #[doc = "Bits 24:25 - Output Disable Source Select"]
217 #[inline(always)]
218 pub fn grp(&self) -> GRP_R {
219 GRP_R::new(((self.bits >> 24) & 3) as u8)
220 }
221 #[doc = "Bit 29 - Same Time Output Level High Disable Request Enable"]
222 #[inline(always)]
223 pub fn grpabh(&self) -> GRPABH_R {
224 GRPABH_R::new(((self.bits >> 29) & 1) != 0)
225 }
226 #[doc = "Bit 30 - Same Time Output Level Low Disable Request Enable"]
227 #[inline(always)]
228 pub fn grpabl(&self) -> GRPABL_R {
229 GRPABL_R::new(((self.bits >> 30) & 1) != 0)
230 }
231}
232impl W {
233 #[doc = "Bits 24:25 - Output Disable Source Select"]
234 #[inline(always)]
235 #[must_use]
236 pub fn grp(&mut self) -> GRP_W<24> {
237 GRP_W::new(self)
238 }
239 #[doc = "Bit 29 - Same Time Output Level High Disable Request Enable"]
240 #[inline(always)]
241 #[must_use]
242 pub fn grpabh(&mut self) -> GRPABH_W<29> {
243 GRPABH_W::new(self)
244 }
245 #[doc = "Bit 30 - Same Time Output Level Low Disable Request Enable"]
246 #[inline(always)]
247 #[must_use]
248 pub fn grpabl(&mut self) -> GRPABL_W<30> {
249 GRPABL_W::new(self)
250 }
251 #[doc = "Writes raw bits to the register."]
252 #[inline(always)]
253 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
254 self.0.bits(bits);
255 self
256 }
257}
258#[doc = "General PWM Timer Interrupt Output Setting Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [gtintad](index.html) module"]
259pub struct GTINTAD_SPEC;
260impl crate::RegisterSpec for GTINTAD_SPEC {
261 type Ux = u32;
262}
263#[doc = "`read()` method returns [gtintad::R](R) reader structure"]
264impl crate::Readable for GTINTAD_SPEC {
265 type Reader = R;
266}
267#[doc = "`write(|w| ..)` method takes [gtintad::W](W) writer structure"]
268impl crate::Writable for GTINTAD_SPEC {
269 type Writer = W;
270 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
271 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
272}
273#[doc = "`reset()` method sets GTINTAD to value 0"]
274impl crate::Resettable for GTINTAD_SPEC {
275 const RESET_VALUE: Self::Ux = 0;
276}