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
493
494
495
#[doc = "Reader of register ES"]
pub type R = crate::R<u32, super::ES>;
#[doc = "Destination Bus Error\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DBE_A {
  #[doc = "0: No destination bus error"]
  DBE_0,
  #[doc = "1: The last recorded error was a bus error on a destination write"]
  DBE_1,
}
impl From<DBE_A> for bool {
  #[inline(always)]
  fn from(variant: DBE_A) -> Self {
    match variant {
      DBE_A::DBE_0 => false,
      DBE_A::DBE_1 => true,
    }
  }
}
#[doc = "Reader of field `DBE`"]
pub type DBE_R = crate::R<bool, DBE_A>;
impl DBE_R {
  #[doc = r"Get enumerated values variant"]
  #[inline(always)]
  pub fn variant(&self) -> DBE_A {
    match self.bits {
      false => DBE_A::DBE_0,
      true => DBE_A::DBE_1,
    }
  }
  #[doc = "Checks if the value of the field is `DBE_0`"]
  #[inline(always)]
  pub fn is_dbe_0(&self) -> bool {
    *self == DBE_A::DBE_0
  }
  #[doc = "Checks if the value of the field is `DBE_1`"]
  #[inline(always)]
  pub fn is_dbe_1(&self) -> bool {
    *self == DBE_A::DBE_1
  }
}
#[doc = "Source Bus Error\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SBE_A {
  #[doc = "0: No source bus error"]
  SBE_0,
  #[doc = "1: The last recorded error was a bus error on a source read"]
  SBE_1,
}
impl From<SBE_A> for bool {
  #[inline(always)]
  fn from(variant: SBE_A) -> Self {
    match variant {
      SBE_A::SBE_0 => false,
      SBE_A::SBE_1 => true,
    }
  }
}
#[doc = "Reader of field `SBE`"]
pub type SBE_R = crate::R<bool, SBE_A>;
impl SBE_R {
  #[doc = r"Get enumerated values variant"]
  #[inline(always)]
  pub fn variant(&self) -> SBE_A {
    match self.bits {
      false => SBE_A::SBE_0,
      true => SBE_A::SBE_1,
    }
  }
  #[doc = "Checks if the value of the field is `SBE_0`"]
  #[inline(always)]
  pub fn is_sbe_0(&self) -> bool {
    *self == SBE_A::SBE_0
  }
  #[doc = "Checks if the value of the field is `SBE_1`"]
  #[inline(always)]
  pub fn is_sbe_1(&self) -> bool {
    *self == SBE_A::SBE_1
  }
}
#[doc = "Scatter/Gather Configuration Error\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SGE_A {
  #[doc = "0: No scatter/gather configuration error"]
  SGE_0,
  #[doc = "1: The last recorded error was a configuration error detected in the TCDn_DLASTSGA field. This field is checked at the beginning of a scatter/gather operation after major loop completion if TCDn_CSR\\[ESG\\] is enabled. TCDn_DLASTSGA is not on a 32 byte boundary."]
  SGE_1,
}
impl From<SGE_A> for bool {
  #[inline(always)]
  fn from(variant: SGE_A) -> Self {
    match variant {
      SGE_A::SGE_0 => false,
      SGE_A::SGE_1 => true,
    }
  }
}
#[doc = "Reader of field `SGE`"]
pub type SGE_R = crate::R<bool, SGE_A>;
impl SGE_R {
  #[doc = r"Get enumerated values variant"]
  #[inline(always)]
  pub fn variant(&self) -> SGE_A {
    match self.bits {
      false => SGE_A::SGE_0,
      true => SGE_A::SGE_1,
    }
  }
  #[doc = "Checks if the value of the field is `SGE_0`"]
  #[inline(always)]
  pub fn is_sge_0(&self) -> bool {
    *self == SGE_A::SGE_0
  }
  #[doc = "Checks if the value of the field is `SGE_1`"]
  #[inline(always)]
  pub fn is_sge_1(&self) -> bool {
    *self == SGE_A::SGE_1
  }
}
#[doc = "NBYTES/CITER Configuration Error\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum NCE_A {
  #[doc = "0: No NBYTES/CITER configuration error"]
  NCE_0,
  #[doc = "1: no description available"]
  NCE_1,
}
impl From<NCE_A> for bool {
  #[inline(always)]
  fn from(variant: NCE_A) -> Self {
    match variant {
      NCE_A::NCE_0 => false,
      NCE_A::NCE_1 => true,
    }
  }
}
#[doc = "Reader of field `NCE`"]
pub type NCE_R = crate::R<bool, NCE_A>;
impl NCE_R {
  #[doc = r"Get enumerated values variant"]
  #[inline(always)]
  pub fn variant(&self) -> NCE_A {
    match self.bits {
      false => NCE_A::NCE_0,
      true => NCE_A::NCE_1,
    }
  }
  #[doc = "Checks if the value of the field is `NCE_0`"]
  #[inline(always)]
  pub fn is_nce_0(&self) -> bool {
    *self == NCE_A::NCE_0
  }
  #[doc = "Checks if the value of the field is `NCE_1`"]
  #[inline(always)]
  pub fn is_nce_1(&self) -> bool {
    *self == NCE_A::NCE_1
  }
}
#[doc = "Destination Offset Error\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DOE_A {
  #[doc = "0: No destination offset configuration error"]
  DOE_0,
  #[doc = "1: The last recorded error was a configuration error detected in the TCDn_DOFF field. TCDn_DOFF is inconsistent with TCDn_ATTR\\[DSIZE\\]."]
  DOE_1,
}
impl From<DOE_A> for bool {
  #[inline(always)]
  fn from(variant: DOE_A) -> Self {
    match variant {
      DOE_A::DOE_0 => false,
      DOE_A::DOE_1 => true,
    }
  }
}
#[doc = "Reader of field `DOE`"]
pub type DOE_R = crate::R<bool, DOE_A>;
impl DOE_R {
  #[doc = r"Get enumerated values variant"]
  #[inline(always)]
  pub fn variant(&self) -> DOE_A {
    match self.bits {
      false => DOE_A::DOE_0,
      true => DOE_A::DOE_1,
    }
  }
  #[doc = "Checks if the value of the field is `DOE_0`"]
  #[inline(always)]
  pub fn is_doe_0(&self) -> bool {
    *self == DOE_A::DOE_0
  }
  #[doc = "Checks if the value of the field is `DOE_1`"]
  #[inline(always)]
  pub fn is_doe_1(&self) -> bool {
    *self == DOE_A::DOE_1
  }
}
#[doc = "Destination Address Error\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DAE_A {
  #[doc = "0: No destination address configuration error"]
  DAE_0,
  #[doc = "1: The last recorded error was a configuration error detected in the TCDn_DADDR field. TCDn_DADDR is inconsistent with TCDn_ATTR\\[DSIZE\\]."]
  DAE_1,
}
impl From<DAE_A> for bool {
  #[inline(always)]
  fn from(variant: DAE_A) -> Self {
    match variant {
      DAE_A::DAE_0 => false,
      DAE_A::DAE_1 => true,
    }
  }
}
#[doc = "Reader of field `DAE`"]
pub type DAE_R = crate::R<bool, DAE_A>;
impl DAE_R {
  #[doc = r"Get enumerated values variant"]
  #[inline(always)]
  pub fn variant(&self) -> DAE_A {
    match self.bits {
      false => DAE_A::DAE_0,
      true => DAE_A::DAE_1,
    }
  }
  #[doc = "Checks if the value of the field is `DAE_0`"]
  #[inline(always)]
  pub fn is_dae_0(&self) -> bool {
    *self == DAE_A::DAE_0
  }
  #[doc = "Checks if the value of the field is `DAE_1`"]
  #[inline(always)]
  pub fn is_dae_1(&self) -> bool {
    *self == DAE_A::DAE_1
  }
}
#[doc = "Source Offset Error\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SOE_A {
  #[doc = "0: No source offset configuration error"]
  SOE_0,
  #[doc = "1: The last recorded error was a configuration error detected in the TCDn_SOFF field. TCDn_SOFF is inconsistent with TCDn_ATTR\\[SSIZE\\]."]
  SOE_1,
}
impl From<SOE_A> for bool {
  #[inline(always)]
  fn from(variant: SOE_A) -> Self {
    match variant {
      SOE_A::SOE_0 => false,
      SOE_A::SOE_1 => true,
    }
  }
}
#[doc = "Reader of field `SOE`"]
pub type SOE_R = crate::R<bool, SOE_A>;
impl SOE_R {
  #[doc = r"Get enumerated values variant"]
  #[inline(always)]
  pub fn variant(&self) -> SOE_A {
    match self.bits {
      false => SOE_A::SOE_0,
      true => SOE_A::SOE_1,
    }
  }
  #[doc = "Checks if the value of the field is `SOE_0`"]
  #[inline(always)]
  pub fn is_soe_0(&self) -> bool {
    *self == SOE_A::SOE_0
  }
  #[doc = "Checks if the value of the field is `SOE_1`"]
  #[inline(always)]
  pub fn is_soe_1(&self) -> bool {
    *self == SOE_A::SOE_1
  }
}
#[doc = "Source Address Error\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SAE_A {
  #[doc = "0: No source address configuration error."]
  SAE_0,
  #[doc = "1: The last recorded error was a configuration error detected in the TCDn_SADDR field. TCDn_SADDR is inconsistent with TCDn_ATTR\\[SSIZE\\]."]
  SAE_1,
}
impl From<SAE_A> for bool {
  #[inline(always)]
  fn from(variant: SAE_A) -> Self {
    match variant {
      SAE_A::SAE_0 => false,
      SAE_A::SAE_1 => true,
    }
  }
}
#[doc = "Reader of field `SAE`"]
pub type SAE_R = crate::R<bool, SAE_A>;
impl SAE_R {
  #[doc = r"Get enumerated values variant"]
  #[inline(always)]
  pub fn variant(&self) -> SAE_A {
    match self.bits {
      false => SAE_A::SAE_0,
      true => SAE_A::SAE_1,
    }
  }
  #[doc = "Checks if the value of the field is `SAE_0`"]
  #[inline(always)]
  pub fn is_sae_0(&self) -> bool {
    *self == SAE_A::SAE_0
  }
  #[doc = "Checks if the value of the field is `SAE_1`"]
  #[inline(always)]
  pub fn is_sae_1(&self) -> bool {
    *self == SAE_A::SAE_1
  }
}
#[doc = "Reader of field `ERRCHN`"]
pub type ERRCHN_R = crate::R<u8, u8>;
#[doc = "Channel Priority Error\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CPE_A {
  #[doc = "0: No channel priority error"]
  CPE_0,
  #[doc = "1: no description available"]
  CPE_1,
}
impl From<CPE_A> for bool {
  #[inline(always)]
  fn from(variant: CPE_A) -> Self {
    match variant {
      CPE_A::CPE_0 => false,
      CPE_A::CPE_1 => true,
    }
  }
}
#[doc = "Reader of field `CPE`"]
pub type CPE_R = crate::R<bool, CPE_A>;
impl CPE_R {
  #[doc = r"Get enumerated values variant"]
  #[inline(always)]
  pub fn variant(&self) -> CPE_A {
    match self.bits {
      false => CPE_A::CPE_0,
      true => CPE_A::CPE_1,
    }
  }
  #[doc = "Checks if the value of the field is `CPE_0`"]
  #[inline(always)]
  pub fn is_cpe_0(&self) -> bool {
    *self == CPE_A::CPE_0
  }
  #[doc = "Checks if the value of the field is `CPE_1`"]
  #[inline(always)]
  pub fn is_cpe_1(&self) -> bool {
    *self == CPE_A::CPE_1
  }
}
#[doc = "Transfer Canceled\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ECX_A {
  #[doc = "0: No canceled transfers"]
  ECX_0,
  #[doc = "1: The last recorded entry was a canceled transfer by the error cancel transfer input"]
  ECX_1,
}
impl From<ECX_A> for bool {
  #[inline(always)]
  fn from(variant: ECX_A) -> Self {
    match variant {
      ECX_A::ECX_0 => false,
      ECX_A::ECX_1 => true,
    }
  }
}
#[doc = "Reader of field `ECX`"]
pub type ECX_R = crate::R<bool, ECX_A>;
impl ECX_R {
  #[doc = r"Get enumerated values variant"]
  #[inline(always)]
  pub fn variant(&self) -> ECX_A {
    match self.bits {
      false => ECX_A::ECX_0,
      true => ECX_A::ECX_1,
    }
  }
  #[doc = "Checks if the value of the field is `ECX_0`"]
  #[inline(always)]
  pub fn is_ecx_0(&self) -> bool {
    *self == ECX_A::ECX_0
  }
  #[doc = "Checks if the value of the field is `ECX_1`"]
  #[inline(always)]
  pub fn is_ecx_1(&self) -> bool {
    *self == ECX_A::ECX_1
  }
}
#[doc = "VLD\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum VLD_A {
  #[doc = "0: No ERR bits are set."]
  VLD_0,
  #[doc = "1: At least one ERR bit is set indicating a valid error exists that has not been cleared."]
  VLD_1,
}
impl From<VLD_A> for bool {
  #[inline(always)]
  fn from(variant: VLD_A) -> Self {
    match variant {
      VLD_A::VLD_0 => false,
      VLD_A::VLD_1 => true,
    }
  }
}
#[doc = "Reader of field `VLD`"]
pub type VLD_R = crate::R<bool, VLD_A>;
impl VLD_R {
  #[doc = r"Get enumerated values variant"]
  #[inline(always)]
  pub fn variant(&self) -> VLD_A {
    match self.bits {
      false => VLD_A::VLD_0,
      true => VLD_A::VLD_1,
    }
  }
  #[doc = "Checks if the value of the field is `VLD_0`"]
  #[inline(always)]
  pub fn is_vld_0(&self) -> bool {
    *self == VLD_A::VLD_0
  }
  #[doc = "Checks if the value of the field is `VLD_1`"]
  #[inline(always)]
  pub fn is_vld_1(&self) -> bool {
    *self == VLD_A::VLD_1
  }
}
impl R {
  #[doc = "Bit 0 - Destination Bus Error"]
  #[inline(always)]
  pub fn dbe(&self) -> DBE_R {
    DBE_R::new((self.bits & 0x01) != 0)
  }
  #[doc = "Bit 1 - Source Bus Error"]
  #[inline(always)]
  pub fn sbe(&self) -> SBE_R {
    SBE_R::new(((self.bits >> 1) & 0x01) != 0)
  }
  #[doc = "Bit 2 - Scatter/Gather Configuration Error"]
  #[inline(always)]
  pub fn sge(&self) -> SGE_R {
    SGE_R::new(((self.bits >> 2) & 0x01) != 0)
  }
  #[doc = "Bit 3 - NBYTES/CITER Configuration Error"]
  #[inline(always)]
  pub fn nce(&self) -> NCE_R {
    NCE_R::new(((self.bits >> 3) & 0x01) != 0)
  }
  #[doc = "Bit 4 - Destination Offset Error"]
  #[inline(always)]
  pub fn doe(&self) -> DOE_R {
    DOE_R::new(((self.bits >> 4) & 0x01) != 0)
  }
  #[doc = "Bit 5 - Destination Address Error"]
  #[inline(always)]
  pub fn dae(&self) -> DAE_R {
    DAE_R::new(((self.bits >> 5) & 0x01) != 0)
  }
  #[doc = "Bit 6 - Source Offset Error"]
  #[inline(always)]
  pub fn soe(&self) -> SOE_R {
    SOE_R::new(((self.bits >> 6) & 0x01) != 0)
  }
  #[doc = "Bit 7 - Source Address Error"]
  #[inline(always)]
  pub fn sae(&self) -> SAE_R {
    SAE_R::new(((self.bits >> 7) & 0x01) != 0)
  }
  #[doc = "Bits 8:11 - Error Channel Number or Canceled Channel Number"]
  #[inline(always)]
  pub fn errchn(&self) -> ERRCHN_R {
    ERRCHN_R::new(((self.bits >> 8) & 0x0f) as u8)
  }
  #[doc = "Bit 14 - Channel Priority Error"]
  #[inline(always)]
  pub fn cpe(&self) -> CPE_R {
    CPE_R::new(((self.bits >> 14) & 0x01) != 0)
  }
  #[doc = "Bit 16 - Transfer Canceled"]
  #[inline(always)]
  pub fn ecx(&self) -> ECX_R {
    ECX_R::new(((self.bits >> 16) & 0x01) != 0)
  }
  #[doc = "Bit 31 - VLD"]
  #[inline(always)]
  pub fn vld(&self) -> VLD_R {
    VLD_R::new(((self.bits >> 31) & 0x01) != 0)
  }
}