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"]
44 _00 = 0,
45 #[doc = "1: Group B output disable request"]
46 _01 = 1,
47}
48impl From<GRP_A> for u8 {
49 #[inline(always)]
50 fn from(variant: GRP_A) -> Self {
51 variant as _
52 }
53}
54impl GRP_R {
55 #[doc = "Get enumerated values variant"]
56 #[inline(always)]
57 pub fn variant(&self) -> Option<GRP_A> {
58 match self.bits {
59 0 => Some(GRP_A::_00),
60 1 => Some(GRP_A::_01),
61 _ => None,
62 }
63 }
64 #[doc = "Checks if the value of the field is `_00`"]
65 #[inline(always)]
66 pub fn is_00(&self) -> bool {
67 *self == GRP_A::_00
68 }
69 #[doc = "Checks if the value of the field is `_01`"]
70 #[inline(always)]
71 pub fn is_01(&self) -> bool {
72 *self == GRP_A::_01
73 }
74}
75#[doc = "Field `GRP` writer - Output Disable Source Select"]
76pub type GRP_W<'a, const O: u8> = crate::FieldWriter<'a, u32, GTINTAD_SPEC, u8, GRP_A, 2, O>;
77impl<'a, const O: u8> GRP_W<'a, O> {
78 #[doc = "Group A output disable request"]
79 #[inline(always)]
80 pub fn _00(self) -> &'a mut W {
81 self.variant(GRP_A::_00)
82 }
83 #[doc = "Group B output disable request"]
84 #[inline(always)]
85 pub fn _01(self) -> &'a mut W {
86 self.variant(GRP_A::_01)
87 }
88}
89#[doc = "Field `GRPABH` reader - Same Time Output Level High Disable Request Enable"]
90pub type GRPABH_R = crate::BitReader<GRPABH_A>;
91#[doc = "Same Time Output Level High Disable Request Enable\n\nValue on reset: 0"]
92#[derive(Clone, Copy, Debug, PartialEq, Eq)]
93pub enum GRPABH_A {
94 #[doc = "0: Same time output level high disable request is disabled."]
95 _0 = 0,
96 #[doc = "1: Same time output level high disable request is enabled."]
97 _1 = 1,
98}
99impl From<GRPABH_A> for bool {
100 #[inline(always)]
101 fn from(variant: GRPABH_A) -> Self {
102 variant as u8 != 0
103 }
104}
105impl GRPABH_R {
106 #[doc = "Get enumerated values variant"]
107 #[inline(always)]
108 pub fn variant(&self) -> GRPABH_A {
109 match self.bits {
110 false => GRPABH_A::_0,
111 true => GRPABH_A::_1,
112 }
113 }
114 #[doc = "Checks if the value of the field is `_0`"]
115 #[inline(always)]
116 pub fn is_0(&self) -> bool {
117 *self == GRPABH_A::_0
118 }
119 #[doc = "Checks if the value of the field is `_1`"]
120 #[inline(always)]
121 pub fn is_1(&self) -> bool {
122 *self == GRPABH_A::_1
123 }
124}
125#[doc = "Field `GRPABH` writer - Same Time Output Level High Disable Request Enable"]
126pub type GRPABH_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTINTAD_SPEC, GRPABH_A, O>;
127impl<'a, const O: u8> GRPABH_W<'a, O> {
128 #[doc = "Same time output level high disable request is disabled."]
129 #[inline(always)]
130 pub fn _0(self) -> &'a mut W {
131 self.variant(GRPABH_A::_0)
132 }
133 #[doc = "Same time output level high disable request is enabled."]
134 #[inline(always)]
135 pub fn _1(self) -> &'a mut W {
136 self.variant(GRPABH_A::_1)
137 }
138}
139#[doc = "Field `GRPABL` reader - Same Time Output Level Low Disable Request Enable"]
140pub type GRPABL_R = crate::BitReader<GRPABL_A>;
141#[doc = "Same Time Output Level Low Disable Request Enable\n\nValue on reset: 0"]
142#[derive(Clone, Copy, Debug, PartialEq, Eq)]
143pub enum GRPABL_A {
144 #[doc = "0: Same time output level low disable request is disabled."]
145 _0 = 0,
146 #[doc = "1: Same time output level low disable request is enabled."]
147 _1 = 1,
148}
149impl From<GRPABL_A> for bool {
150 #[inline(always)]
151 fn from(variant: GRPABL_A) -> Self {
152 variant as u8 != 0
153 }
154}
155impl GRPABL_R {
156 #[doc = "Get enumerated values variant"]
157 #[inline(always)]
158 pub fn variant(&self) -> GRPABL_A {
159 match self.bits {
160 false => GRPABL_A::_0,
161 true => GRPABL_A::_1,
162 }
163 }
164 #[doc = "Checks if the value of the field is `_0`"]
165 #[inline(always)]
166 pub fn is_0(&self) -> bool {
167 *self == GRPABL_A::_0
168 }
169 #[doc = "Checks if the value of the field is `_1`"]
170 #[inline(always)]
171 pub fn is_1(&self) -> bool {
172 *self == GRPABL_A::_1
173 }
174}
175#[doc = "Field `GRPABL` writer - Same Time Output Level Low Disable Request Enable"]
176pub type GRPABL_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTINTAD_SPEC, GRPABL_A, O>;
177impl<'a, const O: u8> GRPABL_W<'a, O> {
178 #[doc = "Same time output level low disable request is disabled."]
179 #[inline(always)]
180 pub fn _0(self) -> &'a mut W {
181 self.variant(GRPABL_A::_0)
182 }
183 #[doc = "Same time output level low disable request is enabled."]
184 #[inline(always)]
185 pub fn _1(self) -> &'a mut W {
186 self.variant(GRPABL_A::_1)
187 }
188}
189impl R {
190 #[doc = "Bits 24:25 - Output Disable Source Select"]
191 #[inline(always)]
192 pub fn grp(&self) -> GRP_R {
193 GRP_R::new(((self.bits >> 24) & 3) as u8)
194 }
195 #[doc = "Bit 29 - Same Time Output Level High Disable Request Enable"]
196 #[inline(always)]
197 pub fn grpabh(&self) -> GRPABH_R {
198 GRPABH_R::new(((self.bits >> 29) & 1) != 0)
199 }
200 #[doc = "Bit 30 - Same Time Output Level Low Disable Request Enable"]
201 #[inline(always)]
202 pub fn grpabl(&self) -> GRPABL_R {
203 GRPABL_R::new(((self.bits >> 30) & 1) != 0)
204 }
205}
206impl W {
207 #[doc = "Bits 24:25 - Output Disable Source Select"]
208 #[inline(always)]
209 #[must_use]
210 pub fn grp(&mut self) -> GRP_W<24> {
211 GRP_W::new(self)
212 }
213 #[doc = "Bit 29 - Same Time Output Level High Disable Request Enable"]
214 #[inline(always)]
215 #[must_use]
216 pub fn grpabh(&mut self) -> GRPABH_W<29> {
217 GRPABH_W::new(self)
218 }
219 #[doc = "Bit 30 - Same Time Output Level Low Disable Request Enable"]
220 #[inline(always)]
221 #[must_use]
222 pub fn grpabl(&mut self) -> GRPABL_W<30> {
223 GRPABL_W::new(self)
224 }
225 #[doc = "Writes raw bits to the register."]
226 #[inline(always)]
227 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
228 self.0.bits(bits);
229 self
230 }
231}
232#[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"]
233pub struct GTINTAD_SPEC;
234impl crate::RegisterSpec for GTINTAD_SPEC {
235 type Ux = u32;
236}
237#[doc = "`read()` method returns [gtintad::R](R) reader structure"]
238impl crate::Readable for GTINTAD_SPEC {
239 type Reader = R;
240}
241#[doc = "`write(|w| ..)` method takes [gtintad::W](W) writer structure"]
242impl crate::Writable for GTINTAD_SPEC {
243 type Writer = W;
244 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
245 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
246}
247#[doc = "`reset()` method sets GTINTAD to value 0"]
248impl crate::Resettable for GTINTAD_SPEC {
249 const RESET_VALUE: Self::Ux = 0;
250}