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