ra6m1 0.2.0

Peripheral access API for ra6m1 microcontrollers (generated using svd2rust)
Documentation
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
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
#[doc = "Register `GTCLR` writer"]
pub struct W(crate::W<GTCLR_SPEC>);
impl core::ops::Deref for W {
    type Target = crate::W<GTCLR_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl core::ops::DerefMut for W {
    #[inline(always)]
    fn deref_mut(&mut self) -> &mut Self::Target {
        &mut self.0
    }
}
impl From<crate::W<GTCLR_SPEC>> for W {
    #[inline(always)]
    fn from(writer: crate::W<GTCLR_SPEC>) -> Self {
        W(writer)
    }
}
#[doc = "Channel 0 GTCNT Count Clear\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CCLR0_AW {
    #[doc = "0: No effect"]
    _0 = 0,
    #[doc = "1: GPT32EH0.GTCNT counter clears"]
    _1 = 1,
}
impl From<CCLR0_AW> for bool {
    #[inline(always)]
    fn from(variant: CCLR0_AW) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `CCLR0` writer - Channel 0 GTCNT Count Clear"]
pub type CCLR0_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTCLR_SPEC, CCLR0_AW, O>;
impl<'a, const O: u8> CCLR0_W<'a, O> {
    #[doc = "No effect"]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(CCLR0_AW::_0)
    }
    #[doc = "GPT32EH0.GTCNT counter clears"]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(CCLR0_AW::_1)
    }
}
#[doc = "Channel 1 GTCNT Count Clear\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CCLR1_AW {
    #[doc = "0: No effect"]
    _0 = 0,
    #[doc = "1: GPT32EH1.GTCNT counter clears"]
    _1 = 1,
}
impl From<CCLR1_AW> for bool {
    #[inline(always)]
    fn from(variant: CCLR1_AW) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `CCLR1` writer - Channel 1 GTCNT Count Clear"]
pub type CCLR1_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTCLR_SPEC, CCLR1_AW, O>;
impl<'a, const O: u8> CCLR1_W<'a, O> {
    #[doc = "No effect"]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(CCLR1_AW::_0)
    }
    #[doc = "GPT32EH1.GTCNT counter clears"]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(CCLR1_AW::_1)
    }
}
#[doc = "Channel 2 GTCNT Count Clear\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CCLR2_AW {
    #[doc = "0: No effect"]
    _0 = 0,
    #[doc = "1: GPT32EH2.GTCNT counter clears"]
    _1 = 1,
}
impl From<CCLR2_AW> for bool {
    #[inline(always)]
    fn from(variant: CCLR2_AW) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `CCLR2` writer - Channel 2 GTCNT Count Clear"]
pub type CCLR2_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTCLR_SPEC, CCLR2_AW, O>;
impl<'a, const O: u8> CCLR2_W<'a, O> {
    #[doc = "No effect"]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(CCLR2_AW::_0)
    }
    #[doc = "GPT32EH2.GTCNT counter clears"]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(CCLR2_AW::_1)
    }
}
#[doc = "Channel 3 GTCNT Count Clear\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CCLR3_AW {
    #[doc = "0: No effect"]
    _0 = 0,
    #[doc = "1: GPT32EH3.GTCNT counter clears"]
    _1 = 1,
}
impl From<CCLR3_AW> for bool {
    #[inline(always)]
    fn from(variant: CCLR3_AW) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `CCLR3` writer - Channel 3 GTCNT Count Clear"]
pub type CCLR3_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTCLR_SPEC, CCLR3_AW, O>;
impl<'a, const O: u8> CCLR3_W<'a, O> {
    #[doc = "No effect"]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(CCLR3_AW::_0)
    }
    #[doc = "GPT32EH3.GTCNT counter clears"]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(CCLR3_AW::_1)
    }
}
#[doc = "Channel 4 GTCNT Count Clear\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CCLR4_AW {
    #[doc = "0: No effect"]
    _0 = 0,
    #[doc = "1: GPT32E4.GTCNT counter clears"]
    _1 = 1,
}
impl From<CCLR4_AW> for bool {
    #[inline(always)]
    fn from(variant: CCLR4_AW) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `CCLR4` writer - Channel 4 GTCNT Count Clear"]
pub type CCLR4_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTCLR_SPEC, CCLR4_AW, O>;
impl<'a, const O: u8> CCLR4_W<'a, O> {
    #[doc = "No effect"]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(CCLR4_AW::_0)
    }
    #[doc = "GPT32E4.GTCNT counter clears"]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(CCLR4_AW::_1)
    }
}
#[doc = "Channel 5 GTCNT Count Clear\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CCLR5_AW {
    #[doc = "0: No effect"]
    _0 = 0,
    #[doc = "1: GPT32E5.GTCNT counter clears"]
    _1 = 1,
}
impl From<CCLR5_AW> for bool {
    #[inline(always)]
    fn from(variant: CCLR5_AW) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `CCLR5` writer - Channel 5 GTCNT Count Clear"]
pub type CCLR5_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTCLR_SPEC, CCLR5_AW, O>;
impl<'a, const O: u8> CCLR5_W<'a, O> {
    #[doc = "No effect"]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(CCLR5_AW::_0)
    }
    #[doc = "GPT32E5.GTCNT counter clears"]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(CCLR5_AW::_1)
    }
}
#[doc = "Channel 6 GTCNT Count Clear\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CCLR6_AW {
    #[doc = "0: No effect"]
    _0 = 0,
    #[doc = "1: GPT32E6.GTCNT counter clears"]
    _1 = 1,
}
impl From<CCLR6_AW> for bool {
    #[inline(always)]
    fn from(variant: CCLR6_AW) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `CCLR6` writer - Channel 6 GTCNT Count Clear"]
pub type CCLR6_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTCLR_SPEC, CCLR6_AW, O>;
impl<'a, const O: u8> CCLR6_W<'a, O> {
    #[doc = "No effect"]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(CCLR6_AW::_0)
    }
    #[doc = "GPT32E6.GTCNT counter clears"]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(CCLR6_AW::_1)
    }
}
#[doc = "Channel 7 GTCNT Count Clear\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CCLR7_AW {
    #[doc = "0: No effect"]
    _0 = 0,
    #[doc = "1: GPT32E7.GTCNT counter clears"]
    _1 = 1,
}
impl From<CCLR7_AW> for bool {
    #[inline(always)]
    fn from(variant: CCLR7_AW) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `CCLR7` writer - Channel 7 GTCNT Count Clear"]
pub type CCLR7_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTCLR_SPEC, CCLR7_AW, O>;
impl<'a, const O: u8> CCLR7_W<'a, O> {
    #[doc = "No effect"]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(CCLR7_AW::_0)
    }
    #[doc = "GPT32E7.GTCNT counter clears"]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(CCLR7_AW::_1)
    }
}
#[doc = "Channel 8 GTCNT Count Clear\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CCLR8_AW {
    #[doc = "0: No effect"]
    _0 = 0,
    #[doc = "1: GPT328.GTCNT counter clears"]
    _1 = 1,
}
impl From<CCLR8_AW> for bool {
    #[inline(always)]
    fn from(variant: CCLR8_AW) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `CCLR8` writer - Channel 8 GTCNT Count Clear"]
pub type CCLR8_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTCLR_SPEC, CCLR8_AW, O>;
impl<'a, const O: u8> CCLR8_W<'a, O> {
    #[doc = "No effect"]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(CCLR8_AW::_0)
    }
    #[doc = "GPT328.GTCNT counter clears"]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(CCLR8_AW::_1)
    }
}
#[doc = "Channel 9 GTCNT Count Clear\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CCLR9_AW {
    #[doc = "0: No effect"]
    _0 = 0,
    #[doc = "1: GPT329.GTCNT counter clears"]
    _1 = 1,
}
impl From<CCLR9_AW> for bool {
    #[inline(always)]
    fn from(variant: CCLR9_AW) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `CCLR9` writer - Channel 9 GTCNT Count Clear"]
pub type CCLR9_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTCLR_SPEC, CCLR9_AW, O>;
impl<'a, const O: u8> CCLR9_W<'a, O> {
    #[doc = "No effect"]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(CCLR9_AW::_0)
    }
    #[doc = "GPT329.GTCNT counter clears"]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(CCLR9_AW::_1)
    }
}
#[doc = "Channel 10 GTCNT Count Clear\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CCLR10_AW {
    #[doc = "0: No effect"]
    _0 = 0,
    #[doc = "1: GPT3210.GTCNT counter clears"]
    _1 = 1,
}
impl From<CCLR10_AW> for bool {
    #[inline(always)]
    fn from(variant: CCLR10_AW) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `CCLR10` writer - Channel 10 GTCNT Count Clear"]
pub type CCLR10_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTCLR_SPEC, CCLR10_AW, O>;
impl<'a, const O: u8> CCLR10_W<'a, O> {
    #[doc = "No effect"]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(CCLR10_AW::_0)
    }
    #[doc = "GPT3210.GTCNT counter clears"]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(CCLR10_AW::_1)
    }
}
#[doc = "Channel 11 GTCNT Count Clear\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CCLR11_AW {
    #[doc = "0: No effect"]
    _0 = 0,
    #[doc = "1: GPT3211.GTCNT counter clears"]
    _1 = 1,
}
impl From<CCLR11_AW> for bool {
    #[inline(always)]
    fn from(variant: CCLR11_AW) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `CCLR11` writer - Channel 11 GTCNT Count Clear"]
pub type CCLR11_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTCLR_SPEC, CCLR11_AW, O>;
impl<'a, const O: u8> CCLR11_W<'a, O> {
    #[doc = "No effect"]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(CCLR11_AW::_0)
    }
    #[doc = "GPT3211.GTCNT counter clears"]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(CCLR11_AW::_1)
    }
}
#[doc = "Channel 12 GTCNT Count Clear\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CCLR12_AW {
    #[doc = "0: No effect"]
    _0 = 0,
    #[doc = "1: GPT3212.GTCNT counter clears"]
    _1 = 1,
}
impl From<CCLR12_AW> for bool {
    #[inline(always)]
    fn from(variant: CCLR12_AW) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `CCLR12` writer - Channel 12 GTCNT Count Clear"]
pub type CCLR12_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTCLR_SPEC, CCLR12_AW, O>;
impl<'a, const O: u8> CCLR12_W<'a, O> {
    #[doc = "No effect"]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(CCLR12_AW::_0)
    }
    #[doc = "GPT3212.GTCNT counter clears"]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(CCLR12_AW::_1)
    }
}
impl W {
    #[doc = "Bit 0 - Channel 0 GTCNT Count Clear"]
    #[inline(always)]
    #[must_use]
    pub fn cclr0(&mut self) -> CCLR0_W<0> {
        CCLR0_W::new(self)
    }
    #[doc = "Bit 1 - Channel 1 GTCNT Count Clear"]
    #[inline(always)]
    #[must_use]
    pub fn cclr1(&mut self) -> CCLR1_W<1> {
        CCLR1_W::new(self)
    }
    #[doc = "Bit 2 - Channel 2 GTCNT Count Clear"]
    #[inline(always)]
    #[must_use]
    pub fn cclr2(&mut self) -> CCLR2_W<2> {
        CCLR2_W::new(self)
    }
    #[doc = "Bit 3 - Channel 3 GTCNT Count Clear"]
    #[inline(always)]
    #[must_use]
    pub fn cclr3(&mut self) -> CCLR3_W<3> {
        CCLR3_W::new(self)
    }
    #[doc = "Bit 4 - Channel 4 GTCNT Count Clear"]
    #[inline(always)]
    #[must_use]
    pub fn cclr4(&mut self) -> CCLR4_W<4> {
        CCLR4_W::new(self)
    }
    #[doc = "Bit 5 - Channel 5 GTCNT Count Clear"]
    #[inline(always)]
    #[must_use]
    pub fn cclr5(&mut self) -> CCLR5_W<5> {
        CCLR5_W::new(self)
    }
    #[doc = "Bit 6 - Channel 6 GTCNT Count Clear"]
    #[inline(always)]
    #[must_use]
    pub fn cclr6(&mut self) -> CCLR6_W<6> {
        CCLR6_W::new(self)
    }
    #[doc = "Bit 7 - Channel 7 GTCNT Count Clear"]
    #[inline(always)]
    #[must_use]
    pub fn cclr7(&mut self) -> CCLR7_W<7> {
        CCLR7_W::new(self)
    }
    #[doc = "Bit 8 - Channel 8 GTCNT Count Clear"]
    #[inline(always)]
    #[must_use]
    pub fn cclr8(&mut self) -> CCLR8_W<8> {
        CCLR8_W::new(self)
    }
    #[doc = "Bit 9 - Channel 9 GTCNT Count Clear"]
    #[inline(always)]
    #[must_use]
    pub fn cclr9(&mut self) -> CCLR9_W<9> {
        CCLR9_W::new(self)
    }
    #[doc = "Bit 10 - Channel 10 GTCNT Count Clear"]
    #[inline(always)]
    #[must_use]
    pub fn cclr10(&mut self) -> CCLR10_W<10> {
        CCLR10_W::new(self)
    }
    #[doc = "Bit 11 - Channel 11 GTCNT Count Clear"]
    #[inline(always)]
    #[must_use]
    pub fn cclr11(&mut self) -> CCLR11_W<11> {
        CCLR11_W::new(self)
    }
    #[doc = "Bit 12 - Channel 12 GTCNT Count Clear"]
    #[inline(always)]
    #[must_use]
    pub fn cclr12(&mut self) -> CCLR12_W<12> {
        CCLR12_W::new(self)
    }
    #[doc = "Writes raw bits to the register."]
    #[inline(always)]
    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
        self.0.bits(bits);
        self
    }
}
#[doc = "General PWM Timer Software Clear Register\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [gtclr](index.html) module"]
pub struct GTCLR_SPEC;
impl crate::RegisterSpec for GTCLR_SPEC {
    type Ux = u32;
}
#[doc = "`write(|w| ..)` method takes [gtclr::W](W) writer structure"]
impl crate::Writable for GTCLR_SPEC {
    type Writer = W;
    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
}
#[doc = "`reset()` method sets GTCLR to value 0"]
impl crate::Resettable for GTCLR_SPEC {
    const RESET_VALUE: Self::Ux = 0;
}