1#[doc = "Register `GEN%s` reader"]
2pub type R = crate::R<GEN_SPEC>;
3#[doc = "Register `GEN%s` writer"]
4pub type W = crate::W<GEN_SPEC>;
5#[doc = "Field `UTEZ` reader - Action on PWM0A triggered by event TEZ when timer increasing"]
6pub type UTEZ_R = crate::FieldReader;
7#[doc = "Field `UTEZ` writer - Action on PWM0A triggered by event TEZ when timer increasing"]
8pub type UTEZ_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
9#[doc = "Field `UTEP` reader - Action on PWM0A triggered by event TEP when timer increasing"]
10pub type UTEP_R = crate::FieldReader;
11#[doc = "Field `UTEP` writer - Action on PWM0A triggered by event TEP when timer increasing"]
12pub type UTEP_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
13#[doc = "Field `UTEA` reader - Action on PWM0A triggered by event TEA when timer increasing"]
14pub type UTEA_R = crate::FieldReader;
15#[doc = "Field `UTEA` writer - Action on PWM0A triggered by event TEA when timer increasing"]
16pub type UTEA_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
17#[doc = "Field `UTEB` reader - Action on PWM0A triggered by event TEB when timer increasing"]
18pub type UTEB_R = crate::FieldReader;
19#[doc = "Field `UTEB` writer - Action on PWM0A triggered by event TEB when timer increasing"]
20pub type UTEB_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
21#[doc = "Field `UT0` reader - Action on PWM0A triggered by event_t0 when timer increasing"]
22pub type UT0_R = crate::FieldReader;
23#[doc = "Field `UT0` writer - Action on PWM0A triggered by event_t0 when timer increasing"]
24pub type UT0_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
25#[doc = "Field `UT1` reader - Action on PWM0A triggered by event_t1 when timer increasing"]
26pub type UT1_R = crate::FieldReader;
27#[doc = "Field `UT1` writer - Action on PWM0A triggered by event_t1 when timer increasing"]
28pub type UT1_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
29#[doc = "Field `DTEZ` reader - Action on PWM0A triggered by event TEZ when timer decreasing"]
30pub type DTEZ_R = crate::FieldReader;
31#[doc = "Field `DTEZ` writer - Action on PWM0A triggered by event TEZ when timer decreasing"]
32pub type DTEZ_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
33#[doc = "Field `DTEP` reader - Action on PWM0A triggered by event TEP when timer decreasing"]
34pub type DTEP_R = crate::FieldReader;
35#[doc = "Field `DTEP` writer - Action on PWM0A triggered by event TEP when timer decreasing"]
36pub type DTEP_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
37#[doc = "Field `DTEA` reader - Action on PWM0A triggered by event TEA when timer decreasing"]
38pub type DTEA_R = crate::FieldReader;
39#[doc = "Field `DTEA` writer - Action on PWM0A triggered by event TEA when timer decreasing"]
40pub type DTEA_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
41#[doc = "Field `DTEB` reader - Action on PWM0A triggered by event TEB when timer decreasing"]
42pub type DTEB_R = crate::FieldReader;
43#[doc = "Field `DTEB` writer - Action on PWM0A triggered by event TEB when timer decreasing"]
44pub type DTEB_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
45#[doc = "Field `DT0` reader - Action on PWM0A triggered by event_t0 when timer decreasing"]
46pub type DT0_R = crate::FieldReader;
47#[doc = "Field `DT0` writer - Action on PWM0A triggered by event_t0 when timer decreasing"]
48pub type DT0_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
49#[doc = "Field `DT1` reader - Action on PWM0A triggered by event_t1 when timer decreasing. 0: no change, 1: low, 2: high, 3: toggle"]
50pub type DT1_R = crate::FieldReader;
51#[doc = "Field `DT1` writer - Action on PWM0A triggered by event_t1 when timer decreasing. 0: no change, 1: low, 2: high, 3: toggle"]
52pub type DT1_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
53impl R {
54 #[doc = "Bits 0:1 - Action on PWM0A triggered by event TEZ when timer increasing"]
55 #[inline(always)]
56 pub fn utez(&self) -> UTEZ_R {
57 UTEZ_R::new((self.bits & 3) as u8)
58 }
59 #[doc = "Bits 2:3 - Action on PWM0A triggered by event TEP when timer increasing"]
60 #[inline(always)]
61 pub fn utep(&self) -> UTEP_R {
62 UTEP_R::new(((self.bits >> 2) & 3) as u8)
63 }
64 #[doc = "Bits 4:5 - Action on PWM0A triggered by event TEA when timer increasing"]
65 #[inline(always)]
66 pub fn utea(&self) -> UTEA_R {
67 UTEA_R::new(((self.bits >> 4) & 3) as u8)
68 }
69 #[doc = "Bits 6:7 - Action on PWM0A triggered by event TEB when timer increasing"]
70 #[inline(always)]
71 pub fn uteb(&self) -> UTEB_R {
72 UTEB_R::new(((self.bits >> 6) & 3) as u8)
73 }
74 #[doc = "Bits 8:9 - Action on PWM0A triggered by event_t0 when timer increasing"]
75 #[inline(always)]
76 pub fn ut0(&self) -> UT0_R {
77 UT0_R::new(((self.bits >> 8) & 3) as u8)
78 }
79 #[doc = "Bits 10:11 - Action on PWM0A triggered by event_t1 when timer increasing"]
80 #[inline(always)]
81 pub fn ut1(&self) -> UT1_R {
82 UT1_R::new(((self.bits >> 10) & 3) as u8)
83 }
84 #[doc = "Bits 12:13 - Action on PWM0A triggered by event TEZ when timer decreasing"]
85 #[inline(always)]
86 pub fn dtez(&self) -> DTEZ_R {
87 DTEZ_R::new(((self.bits >> 12) & 3) as u8)
88 }
89 #[doc = "Bits 14:15 - Action on PWM0A triggered by event TEP when timer decreasing"]
90 #[inline(always)]
91 pub fn dtep(&self) -> DTEP_R {
92 DTEP_R::new(((self.bits >> 14) & 3) as u8)
93 }
94 #[doc = "Bits 16:17 - Action on PWM0A triggered by event TEA when timer decreasing"]
95 #[inline(always)]
96 pub fn dtea(&self) -> DTEA_R {
97 DTEA_R::new(((self.bits >> 16) & 3) as u8)
98 }
99 #[doc = "Bits 18:19 - Action on PWM0A triggered by event TEB when timer decreasing"]
100 #[inline(always)]
101 pub fn dteb(&self) -> DTEB_R {
102 DTEB_R::new(((self.bits >> 18) & 3) as u8)
103 }
104 #[doc = "Bits 20:21 - Action on PWM0A triggered by event_t0 when timer decreasing"]
105 #[inline(always)]
106 pub fn dt0(&self) -> DT0_R {
107 DT0_R::new(((self.bits >> 20) & 3) as u8)
108 }
109 #[doc = "Bits 22:23 - Action on PWM0A triggered by event_t1 when timer decreasing. 0: no change, 1: low, 2: high, 3: toggle"]
110 #[inline(always)]
111 pub fn dt1(&self) -> DT1_R {
112 DT1_R::new(((self.bits >> 22) & 3) as u8)
113 }
114}
115#[cfg(feature = "impl-register-debug")]
116impl core::fmt::Debug for R {
117 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
118 f.debug_struct("GEN")
119 .field("utez", &self.utez())
120 .field("utep", &self.utep())
121 .field("utea", &self.utea())
122 .field("uteb", &self.uteb())
123 .field("ut0", &self.ut0())
124 .field("ut1", &self.ut1())
125 .field("dtez", &self.dtez())
126 .field("dtep", &self.dtep())
127 .field("dtea", &self.dtea())
128 .field("dteb", &self.dteb())
129 .field("dt0", &self.dt0())
130 .field("dt1", &self.dt1())
131 .finish()
132 }
133}
134impl W {
135 #[doc = "Bits 0:1 - Action on PWM0A triggered by event TEZ when timer increasing"]
136 #[inline(always)]
137 pub fn utez(&mut self) -> UTEZ_W<GEN_SPEC> {
138 UTEZ_W::new(self, 0)
139 }
140 #[doc = "Bits 2:3 - Action on PWM0A triggered by event TEP when timer increasing"]
141 #[inline(always)]
142 pub fn utep(&mut self) -> UTEP_W<GEN_SPEC> {
143 UTEP_W::new(self, 2)
144 }
145 #[doc = "Bits 4:5 - Action on PWM0A triggered by event TEA when timer increasing"]
146 #[inline(always)]
147 pub fn utea(&mut self) -> UTEA_W<GEN_SPEC> {
148 UTEA_W::new(self, 4)
149 }
150 #[doc = "Bits 6:7 - Action on PWM0A triggered by event TEB when timer increasing"]
151 #[inline(always)]
152 pub fn uteb(&mut self) -> UTEB_W<GEN_SPEC> {
153 UTEB_W::new(self, 6)
154 }
155 #[doc = "Bits 8:9 - Action on PWM0A triggered by event_t0 when timer increasing"]
156 #[inline(always)]
157 pub fn ut0(&mut self) -> UT0_W<GEN_SPEC> {
158 UT0_W::new(self, 8)
159 }
160 #[doc = "Bits 10:11 - Action on PWM0A triggered by event_t1 when timer increasing"]
161 #[inline(always)]
162 pub fn ut1(&mut self) -> UT1_W<GEN_SPEC> {
163 UT1_W::new(self, 10)
164 }
165 #[doc = "Bits 12:13 - Action on PWM0A triggered by event TEZ when timer decreasing"]
166 #[inline(always)]
167 pub fn dtez(&mut self) -> DTEZ_W<GEN_SPEC> {
168 DTEZ_W::new(self, 12)
169 }
170 #[doc = "Bits 14:15 - Action on PWM0A triggered by event TEP when timer decreasing"]
171 #[inline(always)]
172 pub fn dtep(&mut self) -> DTEP_W<GEN_SPEC> {
173 DTEP_W::new(self, 14)
174 }
175 #[doc = "Bits 16:17 - Action on PWM0A triggered by event TEA when timer decreasing"]
176 #[inline(always)]
177 pub fn dtea(&mut self) -> DTEA_W<GEN_SPEC> {
178 DTEA_W::new(self, 16)
179 }
180 #[doc = "Bits 18:19 - Action on PWM0A triggered by event TEB when timer decreasing"]
181 #[inline(always)]
182 pub fn dteb(&mut self) -> DTEB_W<GEN_SPEC> {
183 DTEB_W::new(self, 18)
184 }
185 #[doc = "Bits 20:21 - Action on PWM0A triggered by event_t0 when timer decreasing"]
186 #[inline(always)]
187 pub fn dt0(&mut self) -> DT0_W<GEN_SPEC> {
188 DT0_W::new(self, 20)
189 }
190 #[doc = "Bits 22:23 - Action on PWM0A triggered by event_t1 when timer decreasing. 0: no change, 1: low, 2: high, 3: toggle"]
191 #[inline(always)]
192 pub fn dt1(&mut self) -> DT1_W<GEN_SPEC> {
193 DT1_W::new(self, 22)
194 }
195}
196#[doc = "Actions triggered by events on PWMx%s\n\nYou can [`read`](crate::Reg::read) this register and get [`gen::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`gen::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
197pub struct GEN_SPEC;
198impl crate::RegisterSpec for GEN_SPEC {
199 type Ux = u32;
200}
201#[doc = "`read()` method returns [`gen::R`](R) reader structure"]
202impl crate::Readable for GEN_SPEC {}
203#[doc = "`write(|w| ..)` method takes [`gen::W`](W) writer structure"]
204impl crate::Writable for GEN_SPEC {
205 type Safety = crate::Unsafe;
206 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
207 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
208}
209#[doc = "`reset()` method sets GEN%s to value 0"]
210impl crate::Resettable for GEN_SPEC {
211 const RESET_VALUE: u32 = 0;
212}