ra2e2 0.2.0

Peripheral access API for ra2e2 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
487
488
489
490
491
492
#[doc = "Register `BIE` reader"]
pub struct R(crate::R<BIE_SPEC>);
impl core::ops::Deref for R {
    type Target = crate::R<BIE_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl From<crate::R<BIE_SPEC>> for R {
    #[inline(always)]
    fn from(reader: crate::R<BIE_SPEC>) -> Self {
        R(reader)
    }
}
#[doc = "Register `BIE` writer"]
pub struct W(crate::W<BIE_SPEC>);
impl core::ops::Deref for W {
    type Target = crate::W<BIE_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<BIE_SPEC>> for W {
    #[inline(always)]
    fn from(writer: crate::W<BIE_SPEC>) -> Self {
        W(writer)
    }
}
#[doc = "Field `STCNDDIE` reader - START Condition Detection Interrupt Enable"]
pub type STCNDDIE_R = crate::BitReader<STCNDDIE_A>;
#[doc = "START Condition Detection Interrupt Enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum STCNDDIE_A {
    #[doc = "0: Disables START condition Detection Interrupt Signal."]
    _0 = 0,
    #[doc = "1: Enables START condition Detection Interrupt Signal."]
    _1 = 1,
}
impl From<STCNDDIE_A> for bool {
    #[inline(always)]
    fn from(variant: STCNDDIE_A) -> Self {
        variant as u8 != 0
    }
}
impl STCNDDIE_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> STCNDDIE_A {
        match self.bits {
            false => STCNDDIE_A::_0,
            true => STCNDDIE_A::_1,
        }
    }
    #[doc = "Checks if the value of the field is `_0`"]
    #[inline(always)]
    pub fn is_0(&self) -> bool {
        *self == STCNDDIE_A::_0
    }
    #[doc = "Checks if the value of the field is `_1`"]
    #[inline(always)]
    pub fn is_1(&self) -> bool {
        *self == STCNDDIE_A::_1
    }
}
#[doc = "Field `STCNDDIE` writer - START Condition Detection Interrupt Enable"]
pub type STCNDDIE_W<'a, const O: u8> = crate::BitWriter<'a, u32, BIE_SPEC, STCNDDIE_A, O>;
impl<'a, const O: u8> STCNDDIE_W<'a, O> {
    #[doc = "Disables START condition Detection Interrupt Signal."]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(STCNDDIE_A::_0)
    }
    #[doc = "Enables START condition Detection Interrupt Signal."]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(STCNDDIE_A::_1)
    }
}
#[doc = "Field `SPCNDDIE` reader - STOP Condition Detection Interrupt Enable"]
pub type SPCNDDIE_R = crate::BitReader<SPCNDDIE_A>;
#[doc = "STOP Condition Detection Interrupt Enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum SPCNDDIE_A {
    #[doc = "0: Disables STOP condition Detection Interrupt Signal."]
    _0 = 0,
    #[doc = "1: Enables STOP condition Detection Interrupt Signal."]
    _1 = 1,
}
impl From<SPCNDDIE_A> for bool {
    #[inline(always)]
    fn from(variant: SPCNDDIE_A) -> Self {
        variant as u8 != 0
    }
}
impl SPCNDDIE_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> SPCNDDIE_A {
        match self.bits {
            false => SPCNDDIE_A::_0,
            true => SPCNDDIE_A::_1,
        }
    }
    #[doc = "Checks if the value of the field is `_0`"]
    #[inline(always)]
    pub fn is_0(&self) -> bool {
        *self == SPCNDDIE_A::_0
    }
    #[doc = "Checks if the value of the field is `_1`"]
    #[inline(always)]
    pub fn is_1(&self) -> bool {
        *self == SPCNDDIE_A::_1
    }
}
#[doc = "Field `SPCNDDIE` writer - STOP Condition Detection Interrupt Enable"]
pub type SPCNDDIE_W<'a, const O: u8> = crate::BitWriter<'a, u32, BIE_SPEC, SPCNDDIE_A, O>;
impl<'a, const O: u8> SPCNDDIE_W<'a, O> {
    #[doc = "Disables STOP condition Detection Interrupt Signal."]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(SPCNDDIE_A::_0)
    }
    #[doc = "Enables STOP condition Detection Interrupt Signal."]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(SPCNDDIE_A::_1)
    }
}
#[doc = "Field `HDREXDIE` reader - HDR Exit Pattern Detection Interrupt Enable"]
pub type HDREXDIE_R = crate::BitReader<HDREXDIE_A>;
#[doc = "HDR Exit Pattern Detection Interrupt Enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum HDREXDIE_A {
    #[doc = "0: Disables HDR Exit Pattern Detection Interrupt Signal."]
    _0 = 0,
    #[doc = "1: Enables HDR Exit Pattern Detection Interrupt Signal."]
    _1 = 1,
}
impl From<HDREXDIE_A> for bool {
    #[inline(always)]
    fn from(variant: HDREXDIE_A) -> Self {
        variant as u8 != 0
    }
}
impl HDREXDIE_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> HDREXDIE_A {
        match self.bits {
            false => HDREXDIE_A::_0,
            true => HDREXDIE_A::_1,
        }
    }
    #[doc = "Checks if the value of the field is `_0`"]
    #[inline(always)]
    pub fn is_0(&self) -> bool {
        *self == HDREXDIE_A::_0
    }
    #[doc = "Checks if the value of the field is `_1`"]
    #[inline(always)]
    pub fn is_1(&self) -> bool {
        *self == HDREXDIE_A::_1
    }
}
#[doc = "Field `HDREXDIE` writer - HDR Exit Pattern Detection Interrupt Enable"]
pub type HDREXDIE_W<'a, const O: u8> = crate::BitWriter<'a, u32, BIE_SPEC, HDREXDIE_A, O>;
impl<'a, const O: u8> HDREXDIE_W<'a, O> {
    #[doc = "Disables HDR Exit Pattern Detection Interrupt Signal."]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(HDREXDIE_A::_0)
    }
    #[doc = "Enables HDR Exit Pattern Detection Interrupt Signal."]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(HDREXDIE_A::_1)
    }
}
#[doc = "Field `NACKDIE` reader - NACK Detection Interrupt Enable"]
pub type NACKDIE_R = crate::BitReader<NACKDIE_A>;
#[doc = "NACK Detection Interrupt Enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum NACKDIE_A {
    #[doc = "0: Disables NACK Detection Interrupt Signal."]
    _0 = 0,
    #[doc = "1: Enables NACK Detection Interrupt Signal."]
    _1 = 1,
}
impl From<NACKDIE_A> for bool {
    #[inline(always)]
    fn from(variant: NACKDIE_A) -> Self {
        variant as u8 != 0
    }
}
impl NACKDIE_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> NACKDIE_A {
        match self.bits {
            false => NACKDIE_A::_0,
            true => NACKDIE_A::_1,
        }
    }
    #[doc = "Checks if the value of the field is `_0`"]
    #[inline(always)]
    pub fn is_0(&self) -> bool {
        *self == NACKDIE_A::_0
    }
    #[doc = "Checks if the value of the field is `_1`"]
    #[inline(always)]
    pub fn is_1(&self) -> bool {
        *self == NACKDIE_A::_1
    }
}
#[doc = "Field `NACKDIE` writer - NACK Detection Interrupt Enable"]
pub type NACKDIE_W<'a, const O: u8> = crate::BitWriter<'a, u32, BIE_SPEC, NACKDIE_A, O>;
impl<'a, const O: u8> NACKDIE_W<'a, O> {
    #[doc = "Disables NACK Detection Interrupt Signal."]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(NACKDIE_A::_0)
    }
    #[doc = "Enables NACK Detection Interrupt Signal."]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(NACKDIE_A::_1)
    }
}
#[doc = "Field `TENDIE` reader - Transmit End Interrupt Enable"]
pub type TENDIE_R = crate::BitReader<TENDIE_A>;
#[doc = "Transmit End Interrupt Enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum TENDIE_A {
    #[doc = "0: Disables Transmit End Interrupt Signal."]
    _0 = 0,
    #[doc = "1: Enables Transmit End Interrupt Signal."]
    _1 = 1,
}
impl From<TENDIE_A> for bool {
    #[inline(always)]
    fn from(variant: TENDIE_A) -> Self {
        variant as u8 != 0
    }
}
impl TENDIE_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> TENDIE_A {
        match self.bits {
            false => TENDIE_A::_0,
            true => TENDIE_A::_1,
        }
    }
    #[doc = "Checks if the value of the field is `_0`"]
    #[inline(always)]
    pub fn is_0(&self) -> bool {
        *self == TENDIE_A::_0
    }
    #[doc = "Checks if the value of the field is `_1`"]
    #[inline(always)]
    pub fn is_1(&self) -> bool {
        *self == TENDIE_A::_1
    }
}
#[doc = "Field `TENDIE` writer - Transmit End Interrupt Enable"]
pub type TENDIE_W<'a, const O: u8> = crate::BitWriter<'a, u32, BIE_SPEC, TENDIE_A, O>;
impl<'a, const O: u8> TENDIE_W<'a, O> {
    #[doc = "Disables Transmit End Interrupt Signal."]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(TENDIE_A::_0)
    }
    #[doc = "Enables Transmit End Interrupt Signal."]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(TENDIE_A::_1)
    }
}
#[doc = "Field `ALIE` reader - Arbitration Lost Interrupt Enable"]
pub type ALIE_R = crate::BitReader<ALIE_A>;
#[doc = "Arbitration Lost Interrupt Enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum ALIE_A {
    #[doc = "0: Disables Arbitration Lost Interrupt Signal."]
    _0 = 0,
    #[doc = "1: Enables Arbitration Lost Interrupt Signal."]
    _1 = 1,
}
impl From<ALIE_A> for bool {
    #[inline(always)]
    fn from(variant: ALIE_A) -> Self {
        variant as u8 != 0
    }
}
impl ALIE_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> ALIE_A {
        match self.bits {
            false => ALIE_A::_0,
            true => ALIE_A::_1,
        }
    }
    #[doc = "Checks if the value of the field is `_0`"]
    #[inline(always)]
    pub fn is_0(&self) -> bool {
        *self == ALIE_A::_0
    }
    #[doc = "Checks if the value of the field is `_1`"]
    #[inline(always)]
    pub fn is_1(&self) -> bool {
        *self == ALIE_A::_1
    }
}
#[doc = "Field `ALIE` writer - Arbitration Lost Interrupt Enable"]
pub type ALIE_W<'a, const O: u8> = crate::BitWriter<'a, u32, BIE_SPEC, ALIE_A, O>;
impl<'a, const O: u8> ALIE_W<'a, O> {
    #[doc = "Disables Arbitration Lost Interrupt Signal."]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(ALIE_A::_0)
    }
    #[doc = "Enables Arbitration Lost Interrupt Signal."]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(ALIE_A::_1)
    }
}
#[doc = "Field `TODIE` reader - Timeout Detection Interrupt Enable"]
pub type TODIE_R = crate::BitReader<TODIE_A>;
#[doc = "Timeout Detection Interrupt Enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum TODIE_A {
    #[doc = "0: Disables Timeout Detection Interrupt Signal."]
    _0 = 0,
    #[doc = "1: Enables Timeout Detection Interrupt Signal."]
    _1 = 1,
}
impl From<TODIE_A> for bool {
    #[inline(always)]
    fn from(variant: TODIE_A) -> Self {
        variant as u8 != 0
    }
}
impl TODIE_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> TODIE_A {
        match self.bits {
            false => TODIE_A::_0,
            true => TODIE_A::_1,
        }
    }
    #[doc = "Checks if the value of the field is `_0`"]
    #[inline(always)]
    pub fn is_0(&self) -> bool {
        *self == TODIE_A::_0
    }
    #[doc = "Checks if the value of the field is `_1`"]
    #[inline(always)]
    pub fn is_1(&self) -> bool {
        *self == TODIE_A::_1
    }
}
#[doc = "Field `TODIE` writer - Timeout Detection Interrupt Enable"]
pub type TODIE_W<'a, const O: u8> = crate::BitWriter<'a, u32, BIE_SPEC, TODIE_A, O>;
impl<'a, const O: u8> TODIE_W<'a, O> {
    #[doc = "Disables Timeout Detection Interrupt Signal."]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(TODIE_A::_0)
    }
    #[doc = "Enables Timeout Detection Interrupt Signal."]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(TODIE_A::_1)
    }
}
impl R {
    #[doc = "Bit 0 - START Condition Detection Interrupt Enable"]
    #[inline(always)]
    pub fn stcnddie(&self) -> STCNDDIE_R {
        STCNDDIE_R::new((self.bits & 1) != 0)
    }
    #[doc = "Bit 1 - STOP Condition Detection Interrupt Enable"]
    #[inline(always)]
    pub fn spcnddie(&self) -> SPCNDDIE_R {
        SPCNDDIE_R::new(((self.bits >> 1) & 1) != 0)
    }
    #[doc = "Bit 2 - HDR Exit Pattern Detection Interrupt Enable"]
    #[inline(always)]
    pub fn hdrexdie(&self) -> HDREXDIE_R {
        HDREXDIE_R::new(((self.bits >> 2) & 1) != 0)
    }
    #[doc = "Bit 4 - NACK Detection Interrupt Enable"]
    #[inline(always)]
    pub fn nackdie(&self) -> NACKDIE_R {
        NACKDIE_R::new(((self.bits >> 4) & 1) != 0)
    }
    #[doc = "Bit 8 - Transmit End Interrupt Enable"]
    #[inline(always)]
    pub fn tendie(&self) -> TENDIE_R {
        TENDIE_R::new(((self.bits >> 8) & 1) != 0)
    }
    #[doc = "Bit 16 - Arbitration Lost Interrupt Enable"]
    #[inline(always)]
    pub fn alie(&self) -> ALIE_R {
        ALIE_R::new(((self.bits >> 16) & 1) != 0)
    }
    #[doc = "Bit 20 - Timeout Detection Interrupt Enable"]
    #[inline(always)]
    pub fn todie(&self) -> TODIE_R {
        TODIE_R::new(((self.bits >> 20) & 1) != 0)
    }
}
impl W {
    #[doc = "Bit 0 - START Condition Detection Interrupt Enable"]
    #[inline(always)]
    #[must_use]
    pub fn stcnddie(&mut self) -> STCNDDIE_W<0> {
        STCNDDIE_W::new(self)
    }
    #[doc = "Bit 1 - STOP Condition Detection Interrupt Enable"]
    #[inline(always)]
    #[must_use]
    pub fn spcnddie(&mut self) -> SPCNDDIE_W<1> {
        SPCNDDIE_W::new(self)
    }
    #[doc = "Bit 2 - HDR Exit Pattern Detection Interrupt Enable"]
    #[inline(always)]
    #[must_use]
    pub fn hdrexdie(&mut self) -> HDREXDIE_W<2> {
        HDREXDIE_W::new(self)
    }
    #[doc = "Bit 4 - NACK Detection Interrupt Enable"]
    #[inline(always)]
    #[must_use]
    pub fn nackdie(&mut self) -> NACKDIE_W<4> {
        NACKDIE_W::new(self)
    }
    #[doc = "Bit 8 - Transmit End Interrupt Enable"]
    #[inline(always)]
    #[must_use]
    pub fn tendie(&mut self) -> TENDIE_W<8> {
        TENDIE_W::new(self)
    }
    #[doc = "Bit 16 - Arbitration Lost Interrupt Enable"]
    #[inline(always)]
    #[must_use]
    pub fn alie(&mut self) -> ALIE_W<16> {
        ALIE_W::new(self)
    }
    #[doc = "Bit 20 - Timeout Detection Interrupt Enable"]
    #[inline(always)]
    #[must_use]
    pub fn todie(&mut self) -> TODIE_W<20> {
        TODIE_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 = "Bus Interrupt Enable 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 [bie](index.html) module"]
pub struct BIE_SPEC;
impl crate::RegisterSpec for BIE_SPEC {
    type Ux = u32;
}
#[doc = "`read()` method returns [bie::R](R) reader structure"]
impl crate::Readable for BIE_SPEC {
    type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [bie::W](W) writer structure"]
impl crate::Writable for BIE_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 BIE to value 0"]
impl crate::Resettable for BIE_SPEC {
    const RESET_VALUE: Self::Ux = 0;
}