avrd/gen/
atxmega16a4.rs

1//! The AVR ATxmega16A4 microcontroller
2//!
3//! # Variants
4//! |        | Pinout | Mcu age | Operating temperature | Operating voltage | Max speed |
5//! |--------|--------|---------|-----------------------|-------------------|-----------|
6//! | ATXMEGA16A4-AU |  | TQFP44 | 0°C - 0°C | 1.6V - 3.6V | 32 MHz |
7//! | ATXMEGA16A4-MU |  | VQFN44 | 0°C - 0°C | 1.6V - 3.6V | 32 MHz |
8//!
9
10#![allow(non_upper_case_globals)]
11
12/// OCD Register 0.
13pub const OCDR0: *mut u8 = 0x0 as *mut u8;
14
15/// User ID.
16pub const FUSEBYTE0: *mut u8 = 0x0 as *mut u8;
17
18/// AES Control Register.
19///
20/// Bitfields:
21///
22/// | Name | Mask (binary) |
23/// | ---- | ------------- |
24/// | RESET | 100000 |
25/// | DECRYPT | 10000 |
26/// | AUTO | 1000000 |
27/// | START | 10000000 |
28/// | XOR | 100 |
29pub const CTRL: *mut u8 = 0x0 as *mut u8;
30
31/// Lock Bits.
32///
33/// Bitfields:
34///
35/// | Name | Mask (binary) |
36/// | ---- | ------------- |
37/// | LB | 11 |
38/// | BLBAT | 1100 |
39/// | BLBB | 11000000 |
40/// | BLBA | 110000 |
41pub const LOCKBITS: *mut u8 = 0x0 as *mut u8;
42
43/// Multi-pin Configuration Mask.
44pub const MPCMASK: *mut u8 = 0x0 as *mut u8;
45
46/// RCOSC 2MHz Calibration Value.
47pub const RCOSC2M: *mut u8 = 0x0 as *mut u8;
48
49/// Analog Comparator 0 Control.
50pub const AC0CTRL: *mut u8 = 0x0 as *mut u8;
51
52/// Address Register 0.
53pub const ADDR0: *mut u8 = 0x0 as *mut u8;
54
55/// General Purpose IO Register 0.
56pub const GPIOR0: *mut u8 = 0x0 as *mut u8;
57
58/// I/O Port Data Direction.
59pub const DIR: *mut u8 = 0x0 as *mut u8;
60
61/// Device ID byte 0.
62pub const DEVID0: *mut u8 = 0x0 as *mut u8;
63
64/// General Power Reduction.
65///
66/// Bitfields:
67///
68/// | Name | Mask (binary) |
69/// | ---- | ------------- |
70/// | RTC | 100 |
71/// | AES | 10000 |
72/// | DMA | 1 |
73/// | EVSYS | 10 |
74pub const PRGEN: *mut u8 = 0x0 as *mut u8;
75
76/// Event Channel 0 Multiplexer.
77pub const CH0MUX: *mut u8 = 0x0 as *mut u8;
78
79/// IrDA Transmitter Pulse Length Control Register.
80pub const TXPLCTRL: *mut u8 = 0x1 as *mut u8;
81
82/// Interrupt Priority.
83pub const INTPRI: *mut u8 = 0x1 as *mut u8;
84
85/// General Purpose IO Register 1.
86pub const GPIOR1: *mut u8 = 0x1 as *mut u8;
87
88/// OCD Register 1.
89pub const OCDR1: *mut u8 = 0x1 as *mut u8;
90
91/// AES Status Register.
92///
93/// Bitfields:
94///
95/// | Name | Mask (binary) |
96/// | ---- | ------------- |
97/// | SRIF | 1 |
98/// | ERROR | 10000000 |
99pub const STATUS: *mut u8 = 0x1 as *mut u8;
100
101/// I/O Port Data Direction Set.
102pub const DIRSET: *mut u8 = 0x1 as *mut u8;
103
104/// Event Channel 1 Multiplexer.
105pub const CH1MUX: *mut u8 = 0x1 as *mut u8;
106
107/// MUX Control.
108///
109/// Bitfields:
110///
111/// | Name | Mask (binary) |
112/// | ---- | ------------- |
113/// | MUXINT | 1111000 |
114/// | MUXNEGL | 11 |
115/// | MUXNEGH | 11 |
116pub const MUXCTRL: *mut u8 = 0x1 as *mut u8;
117
118/// Address Register 1.
119pub const ADDR1: *mut u8 = 0x1 as *mut u8;
120
121/// Prescaler Control Register.
122///
123/// Bitfields:
124///
125/// | Name | Mask (binary) |
126/// | ---- | ------------- |
127/// | PSBCDIV | 11 |
128/// | PSADIV | 1111100 |
129pub const PSCTRL: *mut u8 = 0x1 as *mut u8;
130
131/// Device ID byte 1.
132pub const DEVID1: *mut u8 = 0x1 as *mut u8;
133
134/// Power Reduction Port A.
135pub const PRPA: *mut u8 = 0x1 as *mut u8;
136
137/// Watchdog Configuration.
138///
139/// Bitfields:
140///
141/// | Name | Mask (binary) |
142/// | ---- | ------------- |
143/// | WDP | 1111 |
144/// | WDWP | 11110000 |
145pub const FUSEBYTE1: *mut u8 = 0x1 as *mut u8;
146
147/// Analog Comparator 1 Control.
148pub const AC1CTRL: *mut u8 = 0x1 as *mut u8;
149
150/// Analog Comparator 0 MUX Control.
151pub const AC0MUXCTRL: *mut u8 = 0x2 as *mut u8;
152
153/// I/O Port Data Direction Clear.
154pub const DIRCLR: *mut u8 = 0x2 as *mut u8;
155
156/// Virtual Port Control Register A.
157///
158/// Bitfields:
159///
160/// | Name | Mask (binary) |
161/// | ---- | ------------- |
162/// | VP1MAP | 11110000 |
163/// | VP0MAP | 1111 |
164pub const VPCTRLA: *mut u8 = 0x2 as *mut u8;
165
166/// Reset Configuration.
167///
168/// Bitfields:
169///
170/// | Name | Mask (binary) |
171/// | ---- | ------------- |
172/// | TOSCSEL | 100000 |
173/// | BOOTRST | 1000000 |
174/// | BODPD | 11 |
175/// | DVSDON | 10000000 |
176pub const FUSEBYTE2: *mut u8 = 0x2 as *mut u8;
177
178/// External Oscillator Control Register.
179///
180/// Bitfields:
181///
182/// | Name | Mask (binary) |
183/// | ---- | ------------- |
184/// | XOSCSEL | 1111 |
185/// | X32KLPM | 100000 |
186/// | FRQRANGE | 11000000 |
187pub const XOSCCTRL: *mut u8 = 0x2 as *mut u8;
188
189/// General Purpose IO Register 2.
190pub const GPIOR2: *mut u8 = 0x2 as *mut u8;
191
192/// Lock register.
193pub const LOCK: *mut u8 = 0x2 as *mut u8;
194
195/// AES State Register.
196pub const STATE: *mut u8 = 0x2 as *mut u8;
197
198/// Reference Control.
199///
200/// Bitfields:
201///
202/// | Name | Mask (binary) |
203/// | ---- | ------------- |
204/// | TEMPREF | 1 |
205/// | BANDGAP | 10 |
206/// | REFSEL | 110000 |
207pub const REFCTRL: *mut u8 = 0x2 as *mut u8;
208
209/// RCOSC 32kHz Calibration Value.
210pub const RCOSC32K: *mut u8 = 0x2 as *mut u8;
211
212/// Fault Detection Event Mask.
213pub const FDEMASK: *mut u8 = 0x2 as *mut u8;
214
215/// IrDA Receiver Pulse Length Control Register.
216pub const RXPLCTRL: *mut u8 = 0x2 as *mut u8;
217
218/// Power Reduction Port B.
219pub const PRPB: *mut u8 = 0x2 as *mut u8;
220
221/// Device ID byte 2.
222pub const DEVID2: *mut u8 = 0x2 as *mut u8;
223
224/// Event Channel 2 Multiplexer.
225pub const CH2MUX: *mut u8 = 0x2 as *mut u8;
226
227/// Address Control.
228///
229/// Bitfields:
230///
231/// | Name | Mask (binary) |
232/// | ---- | ------------- |
233/// | DESTDIR | 11 |
234/// | SRCRELOAD | 11000000 |
235/// | DESTRELOAD | 1100 |
236/// | SRCDIR | 110000 |
237pub const ADDRCTRL: *mut u8 = 0x2 as *mut u8;
238
239/// Calibration Register A.
240pub const CALA: *mut u8 = 0x2 as *mut u8;
241
242/// Address Register 2.
243pub const ADDR2: *mut u8 = 0x2 as *mut u8;
244
245/// Data Register.
246pub const DATA: *mut u8 = 0x3 as *mut u8;
247
248/// Address Register.
249pub const ADDR: *mut u8 = 0x3 as *mut u8;
250
251/// General Purpose IO Register 3.
252pub const GPIOR3: *mut u8 = 0x3 as *mut u8;
253
254/// Event Channel 3 Multiplexer.
255pub const CH3MUX: *mut u8 = 0x3 as *mut u8;
256
257/// AES Key Register.
258pub const KEY: *mut u8 = 0x3 as *mut u8;
259
260/// RCOSC 32MHz Calibration Value.
261pub const RCOSC32M: *mut u8 = 0x3 as *mut u8;
262
263/// Control Register A.
264///
265/// Bitfields:
266///
267/// | Name | Mask (binary) |
268/// | ---- | ------------- |
269/// | TXCINTLVL | 1100 |
270/// | RXCINTLVL | 110000 |
271/// | DREINTLVL | 11 |
272pub const CTRLA: *mut u8 = 0x3 as *mut u8;
273
274/// Control Register D.
275///
276/// Bitfields:
277///
278/// | Name | Mask (binary) |
279/// | ---- | ------------- |
280/// | EVACT | 11100000 |
281/// | EVDLY | 10000 |
282pub const CTRLD: *mut u8 = 0x3 as *mut u8;
283
284/// Channel Trigger Source.
285pub const TRIGSRC: *mut u8 = 0x3 as *mut u8;
286
287/// RTC Control Register.
288///
289/// Bitfields:
290///
291/// | Name | Mask (binary) |
292/// | ---- | ------------- |
293/// | RTCSRC | 1110 |
294/// | RTCEN | 1 |
295pub const RTCCTRL: *mut u8 = 0x3 as *mut u8;
296
297/// Event Input Control.
298pub const EVCTRL: *mut u8 = 0x3 as *mut u8;
299
300/// Analog Comparator 1 MUX Control.
301pub const AC1MUXCTRL: *mut u8 = 0x3 as *mut u8;
302
303/// Calibration Register B.
304pub const CALB: *mut u8 = 0x3 as *mut u8;
305
306/// External Oscillator Failure Detection Register.
307///
308/// Bitfields:
309///
310/// | Name | Mask (binary) |
311/// | ---- | ------------- |
312/// | XOSCFDIF | 10 |
313/// | XOSCFDEN | 1 |
314pub const XOSCFAIL: *mut u8 = 0x3 as *mut u8;
315
316/// Virtual Port Control Register B.
317///
318/// Bitfields:
319///
320/// | Name | Mask (binary) |
321/// | ---- | ------------- |
322/// | VP3MAP | 11110000 |
323/// | VP2MAP | 1111 |
324pub const VPCTRLB: *mut u8 = 0x3 as *mut u8;
325
326/// Fault Detection Control Register.
327///
328/// Bitfields:
329///
330/// | Name | Mask (binary) |
331/// | ---- | ------------- |
332/// | FDMODE | 100 |
333/// | FDACT | 11 |
334/// | FDDBD | 10000 |
335pub const FDCTRL: *mut u8 = 0x3 as *mut u8;
336
337/// Revision ID.
338pub const REVID: *mut u8 = 0x3 as *mut u8;
339
340/// I/O Port Data Direction Toggle.
341pub const DIRTGL: *mut u8 = 0x3 as *mut u8;
342
343/// Power Reduction Port C.
344pub const PRPC: *mut u8 = 0x3 as *mut u8;
345
346/// Data Register 0.
347pub const DATA0: *mut u8 = 0x4 as *mut u8;
348
349/// Control Register B.
350///
351/// Bitfields:
352///
353/// | Name | Mask (binary) |
354/// | ---- | ------------- |
355/// | TXB8 | 1 |
356/// | TXEN | 1000 |
357/// | CLK2X | 100 |
358/// | RXEN | 10000 |
359/// | MPCM | 10 |
360pub const CTRLB: *mut u8 = 0x4 as *mut u8;
361
362/// Channel Block Transfer Count.
363pub const TRFCNT: *mut u16 = 0x4 as *mut u16;
364
365/// Channel Result.
366pub const RES: *mut u16 = 0x4 as *mut u16;
367
368/// Start-up Configuration.
369///
370/// Bitfields:
371///
372/// | Name | Mask (binary) |
373/// | ---- | ------------- |
374/// | SUT | 1100 |
375/// | RSTDISBL | 10000 |
376/// | WDLOCK | 10 |
377pub const FUSEBYTE4: *mut u8 = 0x4 as *mut u8;
378
379/// I/O Port Output.
380pub const OUT: *mut u8 = 0x4 as *mut u8;
381
382/// Channel Result low byte.
383pub const RESL: *mut u8 = 0x4 as *mut u8;
384
385/// Oscillator Compare Register 0.
386pub const COMP0: *mut u8 = 0x4 as *mut u8;
387
388/// Power Reduction Port D.
389pub const PRPD: *mut u8 = 0x4 as *mut u8;
390
391/// Clock Prescaler.
392pub const PRESCALER: *mut u8 = 0x4 as *mut u8;
393
394/// Channel Block Transfer Count low byte.
395pub const TRFCNTL: *mut u8 = 0x4 as *mut u8;
396
397/// Control Register E.
398///
399/// Bitfields:
400///
401/// | Name | Mask (binary) |
402/// | ---- | ------------- |
403/// | BYTEM | 1 |
404pub const CTRLE: *mut u8 = 0x4 as *mut u8;
405
406/// Clock and Event Out Register.
407///
408/// Bitfields:
409///
410/// | Name | Mask (binary) |
411/// | ---- | ------------- |
412/// | CLKOUT | 11 |
413/// | EVOUT | 110000 |
414pub const CLKEVOUT: *mut u8 = 0x4 as *mut u8;
415
416/// 32kHz Internal Oscillator Calibration Register.
417pub const RC32KCAL: *mut u8 = 0x4 as *mut u8;
418
419/// Baurd Rate Control Register.
420pub const BAUD: *mut u8 = 0x4 as *mut u8;
421
422/// JTAG User ID.
423pub const JTAGUID: *mut u8 = 0x4 as *mut u8;
424
425/// Event Channel 4 Multiplexer.
426pub const CH4MUX: *mut u8 = 0x4 as *mut u8;
427
428/// Timing Control.
429///
430/// Bitfields:
431///
432/// | Name | Mask (binary) |
433/// | ---- | ------------- |
434/// | CONINTVAL | 1110000 |
435/// | REFRESH | 1111 |
436pub const TIMCTRL: *mut u8 = 0x4 as *mut u8;
437
438/// General Purpose IO Register 4.
439pub const GPIOR4: *mut u8 = 0x4 as *mut u8;
440
441/// AES Interrupt Control Register.
442pub const INTCTRL: *mut u8 = 0x4 as *mut u8;
443
444/// Configuration Change Protection.
445pub const CCP: *mut u8 = 0x4 as *mut u8;
446
447/// Channel Block Transfer Count high byte.
448pub const TRFCNTH: *mut u8 = 0x5 as *mut u8;
449
450/// Control Register C.
451///
452/// Bitfields:
453///
454/// | Name | Mask (binary) |
455/// | ---- | ------------- |
456/// | CHSIZE | 111 |
457/// | UCPHA | 10 |
458/// | PMODE | 110000 |
459/// | SBMODE | 1000 |
460/// | UDORD | 100 |
461/// | CMODE | 11000000 |
462pub const CTRLC: *mut u8 = 0x5 as *mut u8;
463
464/// PLL Control REgister.
465///
466/// Bitfields:
467///
468/// | Name | Mask (binary) |
469/// | ---- | ------------- |
470/// | PLLSRC | 11000000 |
471/// | PLLFAC | 11111 |
472pub const PLLCTRL: *mut u8 = 0x5 as *mut u8;
473
474/// Oscillator Compare Register 1.
475pub const COMP1: *mut u8 = 0x5 as *mut u8;
476
477/// Data Register 1.
478pub const DATA1: *mut u8 = 0x5 as *mut u8;
479
480/// Channel Result high byte.
481pub const RESH: *mut u8 = 0x5 as *mut u8;
482
483/// Power Reduction Port E.
484pub const PRPE: *mut u8 = 0x5 as *mut u8;
485
486/// Event Channel 5 Multiplexer.
487pub const CH5MUX: *mut u8 = 0x5 as *mut u8;
488
489/// General Purpose IO Register 5.
490pub const GPIOR5: *mut u8 = 0x5 as *mut u8;
491
492/// I/O Port Output Set.
493pub const OUTSET: *mut u8 = 0x5 as *mut u8;
494
495/// EESAVE and BOD Level.
496///
497/// Bitfields:
498///
499/// | Name | Mask (binary) |
500/// | ---- | ------------- |
501/// | BODACT | 110000 |
502/// | BODLVL | 111 |
503/// | EESAVE | 1000 |
504pub const FUSEBYTE5: *mut u8 = 0x5 as *mut u8;
505
506/// Address Mask Register.
507///
508/// Bitfields:
509///
510/// | Name | Mask (binary) |
511/// | ---- | ------------- |
512/// | ADDREN | 1 |
513pub const ADDRMASK: *mut u8 = 0x5 as *mut u8;
514
515/// Channel Repeat Count.
516pub const REPCNT: *mut u8 = 0x6 as *mut u8;
517
518/// DFLL Control Register.
519///
520/// Bitfields:
521///
522/// | Name | Mask (binary) |
523/// | ---- | ------------- |
524/// | RC2MCREF | 1 |
525/// | RC32MCREF | 10 |
526pub const DFLLCTRL: *mut u8 = 0x6 as *mut u8;
527
528/// Oscillator Compare Register 2.
529pub const COMP2: *mut u8 = 0x6 as *mut u8;
530
531/// MCU Control.
532///
533/// Bitfields:
534///
535/// | Name | Mask (binary) |
536/// | ---- | ------------- |
537/// | JTAGD | 1 |
538pub const MCUCR: *mut u8 = 0x6 as *mut u8;
539
540/// Dead Time Both Sides.
541pub const DTBOTH: *mut u8 = 0x6 as *mut u8;
542
543/// Interrupt Control Register A.
544///
545/// Bitfields:
546///
547/// | Name | Mask (binary) |
548/// | ---- | ------------- |
549/// | ERRINTLVL | 1100 |
550/// | OVFINTLVL | 11 |
551pub const INTCTRLA: *mut u8 = 0x6 as *mut u8;
552
553/// Event Channel 6 Multiplexer.
554pub const CH6MUX: *mut u8 = 0x6 as *mut u8;
555
556/// Window Mode Control.
557///
558/// Bitfields:
559///
560/// | Name | Mask (binary) |
561/// | ---- | ------------- |
562/// | WINTMODE | 1100 |
563/// | WINTLVL | 11 |
564/// | WEN | 10000 |
565pub const WINCTRL: *mut u8 = 0x6 as *mut u8;
566
567/// I/O Port Output Clear.
568pub const OUTCLR: *mut u8 = 0x6 as *mut u8;
569
570/// General Purpose IO Register 6.
571pub const GPIOR6: *mut u8 = 0x6 as *mut u8;
572
573/// Baud Rate Control Register A.
574pub const BAUDCTRLA: *mut u8 = 0x6 as *mut u8;
575
576/// Power Reduction Port F.
577pub const PRPF: *mut u8 = 0x6 as *mut u8;
578
579/// Data Register 2.
580pub const DATA2: *mut u8 = 0x6 as *mut u8;
581
582/// Dead Time Both Sides Buffer.
583pub const DTBOTHBUF: *mut u8 = 0x7 as *mut u8;
584
585/// I/O Port Output Toggle.
586pub const OUTTGL: *mut u8 = 0x7 as *mut u8;
587
588/// Event Channel 7 Multiplexer.
589pub const CH7MUX: *mut u8 = 0x7 as *mut u8;
590
591/// General Purpose IO Register 7.
592pub const GPIOR7: *mut u8 = 0x7 as *mut u8;
593
594/// Baud Rate Control Register B.
595///
596/// Bitfields:
597///
598/// | Name | Mask (binary) |
599/// | ---- | ------------- |
600/// | BSCALE | 11110000 |
601pub const BAUDCTRLB: *mut u8 = 0x7 as *mut u8;
602
603/// Interrupt Control Register B.
604///
605/// Bitfields:
606///
607/// | Name | Mask (binary) |
608/// | ---- | ------------- |
609/// | CCAINTLVL | 11 |
610/// | CCBINTLVL | 1100 |
611pub const INTCTRLB: *mut u8 = 0x7 as *mut u8;
612
613/// Control Register F Clear.
614pub const CTRLFCLR: *mut u8 = 0x8 as *mut u8;
615
616/// Lot Number Byte 0, ASCII.
617pub const LOTNUM0: *mut u8 = 0x8 as *mut u8;
618
619/// Channel Source Address 0.
620pub const SRCADDR0: *mut u8 = 0x8 as *mut u8;
621
622/// Channel 0 Control Register.
623pub const CH0CTRL: *mut u8 = 0x8 as *mut u8;
624
625/// Ramp D.
626pub const RAMPD: *mut u8 = 0x8 as *mut u8;
627
628/// Event System Lock.
629///
630/// Bitfields:
631///
632/// | Name | Mask (binary) |
633/// | ---- | ------------- |
634/// | EVSYS0LOCK | 1 |
635/// | EVSYS1LOCK | 10000 |
636pub const EVSYSLOCK: *mut u8 = 0x8 as *mut u8;
637
638/// General Purpose IO Register 8.
639pub const GPIOR8: *mut u8 = 0x8 as *mut u8;
640
641/// Gain Calibration.
642pub const GAINCAL: *mut u8 = 0x8 as *mut u8;
643
644/// Dead Time Low Side.
645pub const DTLS: *mut u8 = 0x8 as *mut u8;
646
647/// I/O port Input.
648pub const IN: *mut u8 = 0x8 as *mut u8;
649
650/// Ramp X.
651pub const RAMPX: *mut u8 = 0x9 as *mut u8;
652
653/// AWEX Lock.
654///
655/// Bitfields:
656///
657/// | Name | Mask (binary) |
658/// | ---- | ------------- |
659/// | AWEXCLOCK | 1 |
660/// | AWEXELOCK | 100 |
661pub const AWEXLOCK: *mut u8 = 0x9 as *mut u8;
662
663/// General Purpose IO Register 9.
664pub const GPIOR9: *mut u8 = 0x9 as *mut u8;
665
666/// Offset Calibration.
667pub const OFFSETCAL: *mut u8 = 0x9 as *mut u8;
668
669/// Channel Source Address 1.
670pub const SRCADDR1: *mut u8 = 0x9 as *mut u8;
671
672/// Lot Number Byte 1, ASCII.
673pub const LOTNUM1: *mut u8 = 0x9 as *mut u8;
674
675/// Control Register F Set.
676pub const CTRLFSET: *mut u8 = 0x9 as *mut u8;
677
678/// Dead Time High Side.
679pub const DTHS: *mut u8 = 0x9 as *mut u8;
680
681/// Channel 1 Control Register.
682pub const CH1CTRL: *mut u8 = 0x9 as *mut u8;
683
684/// Command.
685pub const CMD: *mut u8 = 0xA as *mut u8;
686
687/// General Purpose IO Register 10.
688pub const GPIORA: *mut u8 = 0xA as *mut u8;
689
690/// Channel 2 Control Register.
691pub const CH2CTRL: *mut u8 = 0xA as *mut u8;
692
693/// Dead Time Low Side Buffer.
694pub const DTLSBUF: *mut u8 = 0xA as *mut u8;
695
696/// Lot Number Byte 2, ASCII.
697pub const LOTNUM2: *mut u8 = 0xA as *mut u8;
698
699/// Ramp Y.
700pub const RAMPY: *mut u8 = 0xA as *mut u8;
701
702/// Control Register G Clear.
703pub const CTRLGCLR: *mut u8 = 0xA as *mut u8;
704
705/// Port Interrupt 0 Mask.
706pub const INT0MASK: *mut u8 = 0xA as *mut u8;
707
708/// Channel Source Address 2.
709pub const SRCADDR2: *mut u8 = 0xA as *mut u8;
710
711/// Control Register G Set.
712pub const CTRLGSET: *mut u8 = 0xB as *mut u8;
713
714/// Channel 3 Control Register.
715pub const CH3CTRL: *mut u8 = 0xB as *mut u8;
716
717/// General Purpose IO Register 11.
718pub const GPIORB: *mut u8 = 0xB as *mut u8;
719
720/// Port Interrupt 1 Mask.
721pub const INT1MASK: *mut u8 = 0xB as *mut u8;
722
723/// Lot Number Byte 3, ASCII.
724pub const LOTNUM3: *mut u8 = 0xB as *mut u8;
725
726/// Dead Time High Side Buffer.
727pub const DTHSBUF: *mut u8 = 0xB as *mut u8;
728
729/// Ramp Z.
730pub const RAMPZ: *mut u8 = 0xB as *mut u8;
731
732/// General Purpose IO Register 12.
733pub const GPIORC: *mut u8 = 0xC as *mut u8;
734
735/// Lot Number Byte 4, ASCII.
736pub const LOTNUM4: *mut u8 = 0xC as *mut u8;
737
738/// Compare Register low byte.
739pub const COMPL: *mut u8 = 0xC as *mut u8;
740
741/// Channel 4 Control Register.
742pub const CH4CTRL: *mut u8 = 0xC as *mut u8;
743
744/// Channel Destination Address 0.
745pub const DESTADDR0: *mut u8 = 0xC as *mut u8;
746
747/// Interrupt Flag Register.
748///
749/// Bitfields:
750///
751/// | Name | Mask (binary) |
752/// | ---- | ------------- |
753/// | CCAIF | 10000 |
754/// | CCBIF | 100000 |
755/// | ERRIF | 10 |
756/// | OVFIF | 1 |
757pub const INTFLAGS: *mut u8 = 0xC as *mut u8;
758
759/// Output Override Enable.
760pub const OUTOVEN: *mut u8 = 0xC as *mut u8;
761
762/// Calibration Value.
763pub const CAL: *mut u16 = 0xC as *mut u16;
764
765/// Extended Indirect Jump.
766pub const EIND: *mut u8 = 0xC as *mut u8;
767
768/// Calibration Value low byte.
769pub const CALL: *mut u8 = 0xC as *mut u8;
770
771/// Compare Register.
772pub const COMP: *mut u16 = 0xC as *mut u16;
773
774/// Compare Register high byte.
775pub const COMPH: *mut u8 = 0xD as *mut u8;
776
777/// Stack Pointer Low.
778pub const SPL: *mut u8 = 0xD as *mut u8;
779
780/// Lot Number Byte 5, ASCII.
781pub const LOTNUM5: *mut u8 = 0xD as *mut u8;
782
783/// Channel 5 Control Register.
784pub const CH5CTRL: *mut u8 = 0xD as *mut u8;
785
786/// General Purpose IO Register 13.
787pub const GPIORD: *mut u8 = 0xD as *mut u8;
788
789/// Channel Destination Address 1.
790pub const DESTADDR1: *mut u8 = 0xD as *mut u8;
791
792/// Calibration Value high byte.
793pub const CALH: *mut u8 = 0xD as *mut u8;
794
795/// Stack Pointer High.
796pub const SPH: *mut u8 = 0xE as *mut u8;
797
798/// General Purpose IO Register 14.
799pub const GPIORE: *mut u8 = 0xE as *mut u8;
800
801/// Channel 6 Control Register.
802pub const CH6CTRL: *mut u8 = 0xE as *mut u8;
803
804/// Channel Destination Address 2.
805pub const DESTADDR2: *mut u8 = 0xE as *mut u8;
806
807/// Channel 7 Control Register.
808pub const CH7CTRL: *mut u8 = 0xF as *mut u8;
809
810/// General Purpose IO Register 15.
811pub const GPIORF: *mut u8 = 0xF as *mut u8;
812
813/// Status Register.
814///
815/// Bitfields:
816///
817/// | Name | Mask (binary) |
818/// | ---- | ------------- |
819/// | T | 1000000 |
820/// | V | 1000 |
821/// | I | 10000000 |
822/// | H | 100000 |
823/// | Z | 10 |
824/// | C | 1 |
825/// | S | 10000 |
826/// | N | 100 |
827pub const SREG: *mut u8 = 0xF as *mut u8;
828
829/// Temporary Register For 16-bit Access.
830pub const TEMP: *mut u8 = 0xF as *mut u8;
831
832/// Channel 0 Result.
833pub const CH0RES: *mut u16 = 0x10 as *mut u16;
834
835/// Wafer Number.
836pub const WAFNUM: *mut u8 = 0x10 as *mut u8;
837
838/// Channel 0 Result low byte.
839pub const CH0RESL: *mut u8 = 0x10 as *mut u8;
840
841/// Event Strobe.
842pub const STROBE: *mut u8 = 0x10 as *mut u8;
843
844/// Pin 0 Control Register.
845pub const PIN0CTRL: *mut u8 = 0x10 as *mut u8;
846
847/// Pin 1 Control Register.
848pub const PIN1CTRL: *mut u8 = 0x11 as *mut u8;
849
850/// Channel 0 Result high byte.
851pub const CH0RESH: *mut u8 = 0x11 as *mut u8;
852
853/// Wafer Coordinate X Byte 0.
854pub const COORDX0: *mut u8 = 0x12 as *mut u8;
855
856/// Channel 1 Result low byte.
857pub const CH1RESL: *mut u8 = 0x12 as *mut u8;
858
859/// Pin 2 Control Register.
860pub const PIN2CTRL: *mut u8 = 0x12 as *mut u8;
861
862/// Channel 1 Result.
863pub const CH1RES: *mut u16 = 0x12 as *mut u16;
864
865/// Pin 3 Control Register.
866pub const PIN3CTRL: *mut u8 = 0x13 as *mut u8;
867
868/// Wafer Coordinate X Byte 1.
869pub const COORDX1: *mut u8 = 0x13 as *mut u8;
870
871/// Channel 1 Result high byte.
872pub const CH1RESH: *mut u8 = 0x13 as *mut u8;
873
874/// Channel 2 Result low byte.
875pub const CH2RESL: *mut u8 = 0x14 as *mut u8;
876
877/// Wafer Coordinate Y Byte 0.
878pub const COORDY0: *mut u8 = 0x14 as *mut u8;
879
880/// Channel 2 Result.
881pub const CH2RES: *mut u16 = 0x14 as *mut u16;
882
883/// Pin 4 Control Register.
884pub const PIN4CTRL: *mut u8 = 0x14 as *mut u8;
885
886/// Pin 5 Control Register.
887pub const PIN5CTRL: *mut u8 = 0x15 as *mut u8;
888
889/// Wafer Coordinate Y Byte 1.
890pub const COORDY1: *mut u8 = 0x15 as *mut u8;
891
892/// Channel 2 Result high byte.
893pub const CH2RESH: *mut u8 = 0x15 as *mut u8;
894
895/// Channel 3 Result.
896pub const CH3RES: *mut u16 = 0x16 as *mut u16;
897
898/// Pin 6 Control Register.
899pub const PIN6CTRL: *mut u8 = 0x16 as *mut u8;
900
901/// Channel 3 Result low byte.
902pub const CH3RESL: *mut u8 = 0x16 as *mut u8;
903
904/// Pin 7 Control Register.
905pub const PIN7CTRL: *mut u8 = 0x17 as *mut u8;
906
907/// Channel 3 Result high byte.
908pub const CH3RESH: *mut u8 = 0x17 as *mut u8;
909
910/// Compare Value.
911pub const CMP: *mut u16 = 0x18 as *mut u16;
912
913/// Compare Value low byte.
914pub const CMPL: *mut u8 = 0x18 as *mut u8;
915
916/// Channel 0 Data low byte.
917pub const CH0DATAL: *mut u8 = 0x18 as *mut u8;
918
919/// Channel 0 Data.
920pub const CH0DATA: *mut u16 = 0x18 as *mut u16;
921
922/// Compare Value high byte.
923pub const CMPH: *mut u8 = 0x19 as *mut u8;
924
925/// Channel 0 Data high byte.
926pub const CH0DATAH: *mut u8 = 0x19 as *mut u8;
927
928/// Channel 1 Data low byte.
929pub const CH1DATAL: *mut u8 = 0x1A as *mut u8;
930
931/// Channel 1 Data.
932pub const CH1DATA: *mut u16 = 0x1A as *mut u16;
933
934/// Channel 1 Data high byte.
935pub const CH1DATAH: *mut u8 = 0x1B as *mut u8;
936
937/// Count low byte.
938pub const CNTL: *mut u8 = 0x20 as *mut u8;
939
940/// Count.
941pub const CNT: *mut u16 = 0x20 as *mut u16;
942
943/// ADCA Calibration Byte 0.
944pub const ADCACAL0: *mut u8 = 0x20 as *mut u8;
945
946/// Count high byte.
947pub const CNTH: *mut u8 = 0x21 as *mut u8;
948
949/// ADCA Calibration Byte 1.
950pub const ADCACAL1: *mut u8 = 0x21 as *mut u8;
951
952/// ADCB Calibration Byte 0.
953pub const ADCBCAL0: *mut u8 = 0x24 as *mut u8;
954
955/// ADCB Calibration Byte 1.
956pub const ADCBCAL1: *mut u8 = 0x25 as *mut u8;
957
958/// Period low byte.
959pub const PERL: *mut u8 = 0x26 as *mut u8;
960
961/// Period.
962pub const PER: *mut u16 = 0x26 as *mut u16;
963
964/// Period high byte.
965pub const PERH: *mut u8 = 0x27 as *mut u8;
966
967/// Compare or Capture A low byte.
968pub const CCAL: *mut u8 = 0x28 as *mut u8;
969
970/// Compare or Capture A.
971pub const CCA: *mut u16 = 0x28 as *mut u16;
972
973/// Compare or Capture A high byte.
974pub const CCAH: *mut u8 = 0x29 as *mut u8;
975
976/// Compare or Capture B low byte.
977pub const CCBL: *mut u8 = 0x2A as *mut u8;
978
979/// Compare or Capture B.
980pub const CCB: *mut u16 = 0x2A as *mut u16;
981
982/// Compare or Capture B high byte.
983pub const CCBH: *mut u8 = 0x2B as *mut u8;
984
985/// Compare or Capture C.
986pub const CCC: *mut u16 = 0x2C as *mut u16;
987
988/// Compare or Capture C low byte.
989pub const CCCL: *mut u8 = 0x2C as *mut u8;
990
991/// Compare or Capture C high byte.
992pub const CCCH: *mut u8 = 0x2D as *mut u8;
993
994/// Compare or Capture D low byte.
995pub const CCDL: *mut u8 = 0x2E as *mut u8;
996
997/// Temperature Sensor Calibration Byte 0.
998pub const TEMPSENSE0: *mut u8 = 0x2E as *mut u8;
999
1000/// Compare or Capture D.
1001pub const CCD: *mut u16 = 0x2E as *mut u16;
1002
1003/// Compare or Capture D high byte.
1004pub const CCDH: *mut u8 = 0x2F as *mut u8;
1005
1006/// Temperature Sensor Calibration Byte 0.
1007pub const TEMPSENSE1: *mut u8 = 0x2F as *mut u8;
1008
1009/// Period Buffer low byte.
1010pub const PERBUFL: *mut u8 = 0x36 as *mut u8;
1011
1012/// Period Buffer.
1013pub const PERBUF: *mut u16 = 0x36 as *mut u16;
1014
1015/// Period Buffer high byte.
1016pub const PERBUFH: *mut u8 = 0x37 as *mut u8;
1017
1018/// Compare Or Capture A Buffer low byte.
1019pub const CCABUFL: *mut u8 = 0x38 as *mut u8;
1020
1021/// Compare Or Capture A Buffer.
1022pub const CCABUF: *mut u16 = 0x38 as *mut u16;
1023
1024/// Compare Or Capture A Buffer high byte.
1025pub const CCABUFH: *mut u8 = 0x39 as *mut u8;
1026
1027/// Compare Or Capture B Buffer.
1028pub const CCBBUF: *mut u16 = 0x3A as *mut u16;
1029
1030/// Compare Or Capture B Buffer low byte.
1031pub const CCBBUFL: *mut u8 = 0x3A as *mut u8;
1032
1033/// Compare Or Capture B Buffer high byte.
1034pub const CCBBUFH: *mut u8 = 0x3B as *mut u8;
1035
1036/// Compare Or Capture C Buffer low byte.
1037pub const CCCBUFL: *mut u8 = 0x3C as *mut u8;
1038
1039/// Compare Or Capture C Buffer.
1040pub const CCCBUF: *mut u16 = 0x3C as *mut u16;
1041
1042/// Compare Or Capture C Buffer high byte.
1043pub const CCCBUFH: *mut u8 = 0x3D as *mut u8;
1044
1045/// Compare Or Capture D Buffer.
1046pub const CCDBUF: *mut u16 = 0x3E as *mut u16;
1047
1048/// Compare Or Capture D Buffer low byte.
1049pub const CCDBUFL: *mut u8 = 0x3E as *mut u8;
1050
1051/// Compare Or Capture D Buffer high byte.
1052pub const CCDBUFH: *mut u8 = 0x3F as *mut u8;
1053
1054/// Bitfield on register `ADDRCTRL`
1055pub const DESTDIR: *mut u8 = 0x3 as *mut u8;
1056
1057/// Bitfield on register `ADDRCTRL`
1058pub const SRCRELOAD: *mut u8 = 0xC0 as *mut u8;
1059
1060/// Bitfield on register `ADDRCTRL`
1061pub const DESTRELOAD: *mut u8 = 0xC as *mut u8;
1062
1063/// Bitfield on register `ADDRCTRL`
1064pub const SRCDIR: *mut u8 = 0x30 as *mut u8;
1065
1066/// Bitfield on register `ADDRMASK`
1067pub const ADDREN: *mut u8 = 0x1 as *mut u8;
1068
1069/// Bitfield on register `AWEXLOCK`
1070pub const AWEXCLOCK: *mut u8 = 0x1 as *mut u8;
1071
1072/// Bitfield on register `AWEXLOCK`
1073pub const AWEXELOCK: *mut u8 = 0x4 as *mut u8;
1074
1075/// Bitfield on register `BAUDCTRLB`
1076pub const BSCALE: *mut u8 = 0xF0 as *mut u8;
1077
1078/// Bitfield on register `CLKEVOUT`
1079pub const CLKOUT: *mut u8 = 0x3 as *mut u8;
1080
1081/// Bitfield on register `CLKEVOUT`
1082pub const EVOUT: *mut u8 = 0x30 as *mut u8;
1083
1084/// Bitfield on register `CTRL`
1085pub const RESET: *mut u8 = 0x20 as *mut u8;
1086
1087/// Bitfield on register `CTRL`
1088pub const DECRYPT: *mut u8 = 0x10 as *mut u8;
1089
1090/// Bitfield on register `CTRL`
1091pub const AUTO: *mut u8 = 0x40 as *mut u8;
1092
1093/// Bitfield on register `CTRL`
1094pub const START: *mut u8 = 0x80 as *mut u8;
1095
1096/// Bitfield on register `CTRL`
1097pub const XOR: *mut u8 = 0x4 as *mut u8;
1098
1099/// Bitfield on register `CTRLA`
1100pub const TXCINTLVL: *mut u8 = 0xC as *mut u8;
1101
1102/// Bitfield on register `CTRLA`
1103pub const RXCINTLVL: *mut u8 = 0x30 as *mut u8;
1104
1105/// Bitfield on register `CTRLA`
1106pub const DREINTLVL: *mut u8 = 0x3 as *mut u8;
1107
1108/// Bitfield on register `CTRLB`
1109pub const TXB8: *mut u8 = 0x1 as *mut u8;
1110
1111/// Bitfield on register `CTRLB`
1112pub const TXEN: *mut u8 = 0x8 as *mut u8;
1113
1114/// Bitfield on register `CTRLB`
1115pub const CLK2X: *mut u8 = 0x4 as *mut u8;
1116
1117/// Bitfield on register `CTRLB`
1118pub const RXEN: *mut u8 = 0x10 as *mut u8;
1119
1120/// Bitfield on register `CTRLB`
1121pub const MPCM: *mut u8 = 0x2 as *mut u8;
1122
1123/// Bitfield on register `CTRLC`
1124pub const CHSIZE: *mut u8 = 0x7 as *mut u8;
1125
1126/// Bitfield on register `CTRLC`
1127pub const UCPHA: *mut u8 = 0x2 as *mut u8;
1128
1129/// Bitfield on register `CTRLC`
1130pub const PMODE: *mut u8 = 0x30 as *mut u8;
1131
1132/// Bitfield on register `CTRLC`
1133pub const SBMODE: *mut u8 = 0x8 as *mut u8;
1134
1135/// Bitfield on register `CTRLC`
1136pub const UDORD: *mut u8 = 0x4 as *mut u8;
1137
1138/// Bitfield on register `CTRLC`
1139pub const CMODE: *mut u8 = 0xC0 as *mut u8;
1140
1141/// Bitfield on register `CTRLD`
1142pub const EVACT: *mut u8 = 0xE0 as *mut u8;
1143
1144/// Bitfield on register `CTRLD`
1145pub const EVDLY: *mut u8 = 0x10 as *mut u8;
1146
1147/// Bitfield on register `CTRLE`
1148pub const BYTEM: *mut u8 = 0x1 as *mut u8;
1149
1150/// Bitfield on register `DFLLCTRL`
1151pub const RC2MCREF: *mut u8 = 0x1 as *mut u8;
1152
1153/// Bitfield on register `DFLLCTRL`
1154pub const RC32MCREF: *mut u8 = 0x2 as *mut u8;
1155
1156/// Bitfield on register `EVSYSLOCK`
1157pub const EVSYS0LOCK: *mut u8 = 0x1 as *mut u8;
1158
1159/// Bitfield on register `EVSYSLOCK`
1160pub const EVSYS1LOCK: *mut u8 = 0x10 as *mut u8;
1161
1162/// Bitfield on register `FDCTRL`
1163pub const FDMODE: *mut u8 = 0x4 as *mut u8;
1164
1165/// Bitfield on register `FDCTRL`
1166pub const FDACT: *mut u8 = 0x3 as *mut u8;
1167
1168/// Bitfield on register `FDCTRL`
1169pub const FDDBD: *mut u8 = 0x10 as *mut u8;
1170
1171/// Bitfield on register `FUSEBYTE1`
1172pub const WDP: *mut u8 = 0xF as *mut u8;
1173
1174/// Bitfield on register `FUSEBYTE1`
1175pub const WDWP: *mut u8 = 0xF0 as *mut u8;
1176
1177/// Bitfield on register `FUSEBYTE2`
1178pub const TOSCSEL: *mut u8 = 0x20 as *mut u8;
1179
1180/// Bitfield on register `FUSEBYTE2`
1181pub const BOOTRST: *mut u8 = 0x40 as *mut u8;
1182
1183/// Bitfield on register `FUSEBYTE2`
1184pub const BODPD: *mut u8 = 0x3 as *mut u8;
1185
1186/// Bitfield on register `FUSEBYTE2`
1187pub const DVSDON: *mut u8 = 0x80 as *mut u8;
1188
1189/// Bitfield on register `FUSEBYTE4`
1190pub const SUT: *mut u8 = 0xC as *mut u8;
1191
1192/// Bitfield on register `FUSEBYTE4`
1193pub const RSTDISBL: *mut u8 = 0x10 as *mut u8;
1194
1195/// Bitfield on register `FUSEBYTE4`
1196pub const WDLOCK: *mut u8 = 0x2 as *mut u8;
1197
1198/// Bitfield on register `FUSEBYTE5`
1199pub const BODACT: *mut u8 = 0x30 as *mut u8;
1200
1201/// Bitfield on register `FUSEBYTE5`
1202pub const BODLVL: *mut u8 = 0x7 as *mut u8;
1203
1204/// Bitfield on register `FUSEBYTE5`
1205pub const EESAVE: *mut u8 = 0x8 as *mut u8;
1206
1207/// Bitfield on register `INTCTRLA`
1208pub const ERRINTLVL: *mut u8 = 0xC as *mut u8;
1209
1210/// Bitfield on register `INTCTRLA`
1211pub const OVFINTLVL: *mut u8 = 0x3 as *mut u8;
1212
1213/// Bitfield on register `INTCTRLB`
1214pub const CCAINTLVL: *mut u8 = 0x3 as *mut u8;
1215
1216/// Bitfield on register `INTCTRLB`
1217pub const CCBINTLVL: *mut u8 = 0xC as *mut u8;
1218
1219/// Bitfield on register `INTFLAGS`
1220pub const CCAIF: *mut u8 = 0x10 as *mut u8;
1221
1222/// Bitfield on register `INTFLAGS`
1223pub const CCBIF: *mut u8 = 0x20 as *mut u8;
1224
1225/// Bitfield on register `INTFLAGS`
1226pub const ERRIF: *mut u8 = 0x2 as *mut u8;
1227
1228/// Bitfield on register `INTFLAGS`
1229pub const OVFIF: *mut u8 = 0x1 as *mut u8;
1230
1231/// Bitfield on register `LOCKBITS`
1232pub const LB: *mut u8 = 0x3 as *mut u8;
1233
1234/// Bitfield on register `LOCKBITS`
1235pub const BLBAT: *mut u8 = 0xC as *mut u8;
1236
1237/// Bitfield on register `LOCKBITS`
1238pub const BLBB: *mut u8 = 0xC0 as *mut u8;
1239
1240/// Bitfield on register `LOCKBITS`
1241pub const BLBA: *mut u8 = 0x30 as *mut u8;
1242
1243/// Bitfield on register `MCUCR`
1244pub const JTAGD: *mut u8 = 0x1 as *mut u8;
1245
1246/// Bitfield on register `MUXCTRL`
1247pub const MUXINT: *mut u8 = 0x78 as *mut u8;
1248
1249/// Bitfield on register `MUXCTRL`
1250pub const MUXNEGL: *mut u8 = 0x3 as *mut u8;
1251
1252/// Bitfield on register `MUXCTRL`
1253pub const MUXNEGH: *mut u8 = 0x3 as *mut u8;
1254
1255/// Bitfield on register `PLLCTRL`
1256pub const PLLSRC: *mut u8 = 0xC0 as *mut u8;
1257
1258/// Bitfield on register `PLLCTRL`
1259pub const PLLFAC: *mut u8 = 0x1F as *mut u8;
1260
1261/// Bitfield on register `PRGEN`
1262pub const RTC: *mut u8 = 0x4 as *mut u8;
1263
1264/// Bitfield on register `PRGEN`
1265pub const AES: *mut u8 = 0x10 as *mut u8;
1266
1267/// Bitfield on register `PRGEN`
1268pub const DMA: *mut u8 = 0x1 as *mut u8;
1269
1270/// Bitfield on register `PRGEN`
1271pub const EVSYS: *mut u8 = 0x2 as *mut u8;
1272
1273/// Bitfield on register `PSCTRL`
1274pub const PSBCDIV: *mut u8 = 0x3 as *mut u8;
1275
1276/// Bitfield on register `PSCTRL`
1277pub const PSADIV: *mut u8 = 0x7C as *mut u8;
1278
1279/// Bitfield on register `REFCTRL`
1280pub const TEMPREF: *mut u8 = 0x1 as *mut u8;
1281
1282/// Bitfield on register `REFCTRL`
1283pub const BANDGAP: *mut u8 = 0x2 as *mut u8;
1284
1285/// Bitfield on register `REFCTRL`
1286pub const REFSEL: *mut u8 = 0x30 as *mut u8;
1287
1288/// Bitfield on register `RTCCTRL`
1289pub const RTCSRC: *mut u8 = 0xE as *mut u8;
1290
1291/// Bitfield on register `RTCCTRL`
1292pub const RTCEN: *mut u8 = 0x1 as *mut u8;
1293
1294/// Bitfield on register `SREG`
1295pub const T: *mut u8 = 0x40 as *mut u8;
1296
1297/// Bitfield on register `SREG`
1298pub const V: *mut u8 = 0x8 as *mut u8;
1299
1300/// Bitfield on register `SREG`
1301pub const I: *mut u8 = 0x80 as *mut u8;
1302
1303/// Bitfield on register `SREG`
1304pub const H: *mut u8 = 0x20 as *mut u8;
1305
1306/// Bitfield on register `SREG`
1307pub const Z: *mut u8 = 0x2 as *mut u8;
1308
1309/// Bitfield on register `SREG`
1310pub const C: *mut u8 = 0x1 as *mut u8;
1311
1312/// Bitfield on register `SREG`
1313pub const S: *mut u8 = 0x10 as *mut u8;
1314
1315/// Bitfield on register `SREG`
1316pub const N: *mut u8 = 0x4 as *mut u8;
1317
1318/// Bitfield on register `STATUS`
1319pub const SRIF: *mut u8 = 0x1 as *mut u8;
1320
1321/// Bitfield on register `STATUS`
1322pub const ERROR: *mut u8 = 0x80 as *mut u8;
1323
1324/// Bitfield on register `TIMCTRL`
1325pub const CONINTVAL: *mut u8 = 0x70 as *mut u8;
1326
1327/// Bitfield on register `TIMCTRL`
1328pub const REFRESH: *mut u8 = 0xF as *mut u8;
1329
1330/// Bitfield on register `VPCTRLA`
1331pub const VP1MAP: *mut u8 = 0xF0 as *mut u8;
1332
1333/// Bitfield on register `VPCTRLA`
1334pub const VP0MAP: *mut u8 = 0xF as *mut u8;
1335
1336/// Bitfield on register `VPCTRLB`
1337pub const VP3MAP: *mut u8 = 0xF0 as *mut u8;
1338
1339/// Bitfield on register `VPCTRLB`
1340pub const VP2MAP: *mut u8 = 0xF as *mut u8;
1341
1342/// Bitfield on register `WINCTRL`
1343pub const WINTMODE: *mut u8 = 0xC as *mut u8;
1344
1345/// Bitfield on register `WINCTRL`
1346pub const WINTLVL: *mut u8 = 0x3 as *mut u8;
1347
1348/// Bitfield on register `WINCTRL`
1349pub const WEN: *mut u8 = 0x10 as *mut u8;
1350
1351/// Bitfield on register `XOSCCTRL`
1352pub const XOSCSEL: *mut u8 = 0xF as *mut u8;
1353
1354/// Bitfield on register `XOSCCTRL`
1355pub const X32KLPM: *mut u8 = 0x20 as *mut u8;
1356
1357/// Bitfield on register `XOSCCTRL`
1358pub const FRQRANGE: *mut u8 = 0xC0 as *mut u8;
1359
1360/// Bitfield on register `XOSCFAIL`
1361pub const XOSCFDIF: *mut u8 = 0x2 as *mut u8;
1362
1363/// Bitfield on register `XOSCFAIL`
1364pub const XOSCFDEN: *mut u8 = 0x1 as *mut u8;
1365
1366/// Hysteresis mode selection
1367#[allow(non_upper_case_globals)]
1368pub mod ac_hysmode {
1369   /// No hysteresis.
1370   pub const NO: u32 = 0x0;
1371   /// Small hysteresis.
1372   pub const SMALL: u32 = 0x1;
1373   /// Large hysteresis.
1374   pub const LARGE: u32 = 0x2;
1375}
1376
1377/// Interrupt level
1378#[allow(non_upper_case_globals)]
1379pub mod ac_intlvl {
1380   /// Interrupt disabled.
1381   pub const OFF: u32 = 0x0;
1382   /// Low level.
1383   pub const LO: u32 = 0x1;
1384   /// Medium level.
1385   pub const MED: u32 = 0x2;
1386   /// High level.
1387   pub const HI: u32 = 0x3;
1388}
1389
1390/// Interrupt mode
1391#[allow(non_upper_case_globals)]
1392pub mod ac_intmode {
1393   /// Interrupt on both edges.
1394   pub const BOTHEDGES: u32 = 0x0;
1395   /// Interrupt on falling edge.
1396   pub const FALLING: u32 = 0x2;
1397   /// Interrupt on rising edge.
1398   pub const RISING: u32 = 0x3;
1399}
1400
1401/// Negative input multiplexer selection
1402#[allow(non_upper_case_globals)]
1403pub mod ac_muxneg {
1404   /// Pin 0.
1405   pub const PIN0: u32 = 0x0;
1406   /// Pin 1.
1407   pub const PIN1: u32 = 0x1;
1408   /// Pin 3.
1409   pub const PIN3: u32 = 0x2;
1410   /// Pin 5.
1411   pub const PIN5: u32 = 0x3;
1412   /// Pin 7.
1413   pub const PIN7: u32 = 0x4;
1414   /// DAC output.
1415   pub const DAC: u32 = 0x5;
1416   /// Bandgap Reference.
1417   pub const BANDGAP: u32 = 0x6;
1418   /// Internal voltage scaler.
1419   pub const SCALER: u32 = 0x7;
1420}
1421
1422/// Positive input multiplexer selection
1423#[allow(non_upper_case_globals)]
1424pub mod ac_muxpos {
1425   /// Pin 0.
1426   pub const PIN0: u32 = 0x0;
1427   /// Pin 1.
1428   pub const PIN1: u32 = 0x1;
1429   /// Pin 2.
1430   pub const PIN2: u32 = 0x2;
1431   /// Pin 3.
1432   pub const PIN3: u32 = 0x3;
1433   /// Pin 4.
1434   pub const PIN4: u32 = 0x4;
1435   /// Pin 5.
1436   pub const PIN5: u32 = 0x5;
1437   /// Pin 6.
1438   pub const PIN6: u32 = 0x6;
1439   /// DAC output.
1440   pub const DAC: u32 = 0x7;
1441}
1442
1443/// Window interrupt level
1444#[allow(non_upper_case_globals)]
1445pub mod ac_wintlvl {
1446   /// Interrupt disabled.
1447   pub const OFF: u32 = 0x0;
1448   /// Low priority.
1449   pub const LO: u32 = 0x1;
1450   /// Medium priority.
1451   pub const MED: u32 = 0x2;
1452   /// High priority.
1453   pub const HI: u32 = 0x3;
1454}
1455
1456/// Windows interrupt mode
1457#[allow(non_upper_case_globals)]
1458pub mod ac_wintmode {
1459   /// Interrupt on above window.
1460   pub const ABOVE: u32 = 0x0;
1461   /// Interrupt on inside window.
1462   pub const INSIDE: u32 = 0x1;
1463   /// Interrupt on below window.
1464   pub const BELOW: u32 = 0x2;
1465   /// Interrupt on outside window.
1466   pub const OUTSIDE: u32 = 0x3;
1467}
1468
1469/// Window mode state
1470#[allow(non_upper_case_globals)]
1471pub mod ac_wstate {
1472   /// Signal above window.
1473   pub const ABOVE: u32 = 0x0;
1474   /// Signal inside window.
1475   pub const INSIDE: u32 = 0x1;
1476   /// Signal below window.
1477   pub const BELOW: u32 = 0x2;
1478}
1479
1480/// Gain factor
1481#[allow(non_upper_case_globals)]
1482pub mod adc_ch_gain {
1483   /// 1x gain.
1484   pub const _1X: u32 = 0x0;
1485   /// 2x gain.
1486   pub const _2X: u32 = 0x1;
1487   /// 4x gain.
1488   pub const _4X: u32 = 0x2;
1489   /// 8x gain.
1490   pub const _8X: u32 = 0x3;
1491   /// 16x gain.
1492   pub const _16X: u32 = 0x4;
1493   /// 32x gain.
1494   pub const _32X: u32 = 0x5;
1495   /// 64x gain.
1496   pub const _64X: u32 = 0x6;
1497   /// x/2 gain.
1498   pub const DIV2: u32 = 0x7;
1499}
1500
1501/// Input mode
1502#[allow(non_upper_case_globals)]
1503pub mod adc_ch_inputmode {
1504   /// Internal inputs, no gain.
1505   pub const INTERNAL: u32 = 0x0;
1506   /// Single-ended input, no gain.
1507   pub const SINGLEENDED: u32 = 0x1;
1508   /// Differential input, no gain.
1509   pub const DIFF: u32 = 0x2;
1510   /// Differential input, with gain.
1511   pub const DIFFWGAIN: u32 = 0x3;
1512}
1513
1514/// Interrupt level
1515#[allow(non_upper_case_globals)]
1516pub mod adc_ch_intlvl {
1517   /// Interrupt disabled.
1518   pub const OFF: u32 = 0x0;
1519   /// Low level.
1520   pub const LO: u32 = 0x1;
1521   /// Medium level.
1522   pub const MED: u32 = 0x2;
1523   /// High level.
1524   pub const HI: u32 = 0x3;
1525}
1526
1527/// Interupt mode
1528#[allow(non_upper_case_globals)]
1529pub mod adc_ch_intmode {
1530   /// Interrupt on conversion complete.
1531   pub const COMPLETE: u32 = 0x0;
1532   /// Interrupt on result below compare value.
1533   pub const BELOW: u32 = 0x1;
1534   /// Interrupt on result above compare value.
1535   pub const ABOVE: u32 = 0x3;
1536}
1537
1538/// Internal input multiplexer selections
1539#[allow(non_upper_case_globals)]
1540pub mod adc_ch_muxint {
1541   /// Temperature Reference.
1542   pub const TEMP: u32 = 0x0;
1543   /// Bandgap Reference.
1544   pub const BANDGAP: u32 = 0x1;
1545   /// 1/10 scaled VCC.
1546   pub const SCALEDVCC: u32 = 0x2;
1547   /// DAC output.
1548   pub const DAC: u32 = 0x3;
1549}
1550
1551/// Negative input multiplexer selection
1552#[allow(non_upper_case_globals)]
1553pub mod adc_ch_muxneg {
1554   /// Input pin 0 (Input Mode = 2).
1555   pub const PIN0: u32 = 0x0;
1556   /// Input pin 1 (Input Mode = 2).
1557   pub const PIN1: u32 = 0x1;
1558   /// Input pin 2 (Input Mode = 2).
1559   pub const PIN2: u32 = 0x2;
1560   /// Input pin 3 (Input Mode = 2).
1561   pub const PIN3: u32 = 0x3;
1562   /// Input pin 4 (Input Mode = 3).
1563   pub const PIN4: u32 = 0x0;
1564   /// Input pin 5 (Input Mode = 3).
1565   pub const PIN5: u32 = 0x1;
1566   /// Input pin 6 (Input Mode = 3).
1567   pub const PIN6: u32 = 0x2;
1568   /// Input pin 7 (Input Mode = 3).
1569   pub const PIN7: u32 = 0x3;
1570}
1571
1572/// Negative input multiplexer selection when gain on 4 MSB pins
1573#[allow(non_upper_case_globals)]
1574pub mod adc_ch_muxnegh {
1575   /// Input pin 4.
1576   pub const PIN4: u32 = 0x0;
1577   /// Input pin 5.
1578   pub const PIN5: u32 = 0x1;
1579   /// Input pin 6.
1580   pub const PIN6: u32 = 0x2;
1581   /// Input pin 7.
1582   pub const PIN7: u32 = 0x3;
1583}
1584
1585/// Negative input multiplexer selection when gain on 4 LSB pins
1586#[allow(non_upper_case_globals)]
1587pub mod adc_ch_muxnegl {
1588   /// Input pin 0.
1589   pub const PIN0: u32 = 0x0;
1590   /// Input pin 1.
1591   pub const PIN1: u32 = 0x1;
1592   /// Input pin 2.
1593   pub const PIN2: u32 = 0x2;
1594   /// Input pin 3.
1595   pub const PIN3: u32 = 0x3;
1596}
1597
1598/// Positive input multiplexer selection
1599#[allow(non_upper_case_globals)]
1600pub mod adc_ch_muxpos {
1601   /// Input pin 0.
1602   pub const PIN0: u32 = 0x0;
1603   /// Input pin 1.
1604   pub const PIN1: u32 = 0x1;
1605   /// Input pin 2.
1606   pub const PIN2: u32 = 0x2;
1607   /// Input pin 3.
1608   pub const PIN3: u32 = 0x3;
1609   /// Input pin 4.
1610   pub const PIN4: u32 = 0x4;
1611   /// Input pin 5.
1612   pub const PIN5: u32 = 0x5;
1613   /// Input pin 6.
1614   pub const PIN6: u32 = 0x6;
1615   /// Input pin 7.
1616   pub const PIN7: u32 = 0x7;
1617   /// Input pin 8.
1618   pub const PIN8: u32 = 0x8;
1619   /// Input pin 9.
1620   pub const PIN9: u32 = 0x9;
1621   /// Input pin 10.
1622   pub const PIN10: u32 = 0xA;
1623   /// Input pin 11.
1624   pub const PIN11: u32 = 0xB;
1625}
1626
1627/// DMA request selection
1628#[allow(non_upper_case_globals)]
1629pub mod adc_dmasel {
1630   /// Combined DMA request OFF.
1631   pub const OFF: u32 = 0x0;
1632   /// ADC Channel 0 or 1.
1633   pub const CH01: u32 = 0x1;
1634   /// ADC Channel 0 or 1 or 2.
1635   pub const CH012: u32 = 0x2;
1636   /// ADC Channel 0 or 1 or 2 or 3.
1637   pub const CH0123: u32 = 0x3;
1638}
1639
1640/// Event action selection
1641#[allow(non_upper_case_globals)]
1642pub mod adc_evact {
1643   /// No event action.
1644   pub const NONE: u32 = 0x0;
1645   /// First event triggers channel 0.
1646   pub const CH0: u32 = 0x1;
1647   /// First two events trigger channel 0,1.
1648   pub const CH01: u32 = 0x2;
1649   /// First three events trigger channel 0,1,2.
1650   pub const CH012: u32 = 0x3;
1651   /// Events trigger channel 0,1,2,3.
1652   pub const CH0123: u32 = 0x4;
1653   /// First event triggers sweep.
1654   pub const SWEEP: u32 = 0x5;
1655   /// The ADC is flushed and restarted for accurate timing.
1656   pub const SYNCSWEEP: u32 = 0x6;
1657}
1658
1659/// Event channel input selection
1660#[allow(non_upper_case_globals)]
1661pub mod adc_evsel {
1662   /// Event Channel 0,1,2,3.
1663   pub const _0123: u32 = 0x0;
1664   /// Event Channel 1,2,3,4.
1665   pub const _1234: u32 = 0x1;
1666   /// Event Channel 2,3,4,5.
1667   pub const _2345: u32 = 0x2;
1668   /// Event Channel 3,4,5,6.
1669   pub const _3456: u32 = 0x3;
1670   /// Event Channel 4,5,6,7.
1671   pub const _4567: u32 = 0x4;
1672   /// Event Channel 5,6,7.
1673   pub const _567: u32 = 0x5;
1674   /// Event Channel 6,7.
1675   pub const _67: u32 = 0x6;
1676   /// Event Channel 7.
1677   pub const _7: u32 = 0x7;
1678}
1679
1680/// Clock prescaler
1681#[allow(non_upper_case_globals)]
1682pub mod adc_prescaler {
1683   /// Divide clock by 4.
1684   pub const DIV4: u32 = 0x0;
1685   /// Divide clock by 8.
1686   pub const DIV8: u32 = 0x1;
1687   /// Divide clock by 16.
1688   pub const DIV16: u32 = 0x2;
1689   /// Divide clock by 32.
1690   pub const DIV32: u32 = 0x3;
1691   /// Divide clock by 64.
1692   pub const DIV64: u32 = 0x4;
1693   /// Divide clock by 128.
1694   pub const DIV128: u32 = 0x5;
1695   /// Divide clock by 256.
1696   pub const DIV256: u32 = 0x6;
1697   /// Divide clock by 512.
1698   pub const DIV512: u32 = 0x7;
1699}
1700
1701/// Voltage reference selection
1702#[allow(non_upper_case_globals)]
1703pub mod adc_refsel {
1704   /// Internal 1V.
1705   pub const INT1V: u32 = 0x0;
1706   /// Internal VCC / 1.6V.
1707   pub const INTVCC: u32 = 0x1;
1708   /// External reference on PORT A.
1709   pub const AREFA: u32 = 0x2;
1710   /// External reference on PORT B.
1711   pub const AREFB: u32 = 0x3;
1712}
1713
1714/// Conversion result resolution
1715#[allow(non_upper_case_globals)]
1716pub mod adc_resolution {
1717   /// 12-bit right-adjusted result.
1718   pub const _12BIT: u32 = 0x0;
1719   /// 8-bit right-adjusted result.
1720   pub const _8BIT: u32 = 0x2;
1721   /// 12-bit left-adjusted result.
1722   pub const LEFT12BIT: u32 = 0x3;
1723}
1724
1725/// Channel sweep selection
1726#[allow(non_upper_case_globals)]
1727pub mod adc_sweep {
1728   /// ADC Channel 0.
1729   pub const _0: u32 = 0x0;
1730   /// ADC Channel 0,1.
1731   pub const _01: u32 = 0x1;
1732   /// ADC Channel 0,1,2.
1733   pub const _012: u32 = 0x2;
1734   /// ADC Channel 0,1,2,3.
1735   pub const _0123: u32 = 0x3;
1736}
1737
1738/// Interrupt level
1739#[allow(non_upper_case_globals)]
1740pub mod aes_intlvl {
1741   /// Interrupt Disabled.
1742   pub const OFF: u32 = 0x0;
1743   /// Low Level.
1744   pub const LO: u32 = 0x1;
1745   /// Medium Level.
1746   pub const MED: u32 = 0x2;
1747   /// High Level.
1748   pub const HI: u32 = 0x3;
1749}
1750
1751/// Fault Detect Action
1752#[allow(non_upper_case_globals)]
1753pub mod awex_fdact {
1754   /// No Fault Protection.
1755   pub const NONE: u32 = 0x0;
1756   /// Clear Output Enable Bits.
1757   pub const CLEAROE: u32 = 0x1;
1758   /// Clear I/O Port Direction Bits.
1759   pub const CLEARDIR: u32 = 0x3;
1760}
1761
1762/// BOD operation
1763#[allow(non_upper_case_globals)]
1764pub mod bod {
1765   /// BOD enabled in sampled mode.
1766   pub const INSAMPLEDMODE: u32 = 0x1;
1767   /// BOD enabled continuously.
1768   pub const CONTINOUSLY: u32 = 0x2;
1769   /// BOD Disabled.
1770   pub const DISABLED: u32 = 0x3;
1771}
1772
1773/// Brownout Detection Voltage Level
1774#[allow(non_upper_case_globals)]
1775pub mod bodlvl {
1776   /// 1.6 V.
1777   pub const _1V6: u32 = 0x7;
1778   /// 1.9 V.
1779   pub const _1V9: u32 = 0x6;
1780   /// 2.1 V.
1781   pub const _2V1: u32 = 0x5;
1782   /// 2.4 V.
1783   pub const _2V4: u32 = 0x4;
1784   /// 2.7 V.
1785   pub const _2V7: u32 = 0x3;
1786   /// 3.0 V.
1787   pub const _3V0: u32 = 0x2;
1788   /// 3.2 V.
1789   pub const _3V2: u32 = 0x1;
1790   /// 3.5 V.
1791   pub const _3V5: u32 = 0x0;
1792}
1793
1794/// Boot Loader Section Reset Vector
1795#[allow(non_upper_case_globals)]
1796pub mod bootrst {
1797   /// Boot Loader Reset.
1798   pub const BOOTLDR: u32 = 0x0;
1799   /// Application Reset.
1800   pub const APPLICATION: u32 = 0x1;
1801}
1802
1803/// CCP signatures
1804#[allow(non_upper_case_globals)]
1805pub mod ccp {
1806   /// SPM Instruction Protection.
1807   pub const SPM: u32 = 0x9D;
1808   /// IO Register Protection.
1809   pub const IOREG: u32 = 0xD8;
1810}
1811
1812/// Prescaler A Division Factor
1813#[allow(non_upper_case_globals)]
1814pub mod clk_psadiv {
1815   /// Divide by 1.
1816   pub const _1: u32 = 0x0;
1817   /// Divide by 2.
1818   pub const _2: u32 = 0x1;
1819   /// Divide by 4.
1820   pub const _4: u32 = 0x3;
1821   /// Divide by 8.
1822   pub const _8: u32 = 0x5;
1823   /// Divide by 16.
1824   pub const _16: u32 = 0x7;
1825   /// Divide by 32.
1826   pub const _32: u32 = 0x9;
1827   /// Divide by 64.
1828   pub const _64: u32 = 0xB;
1829   /// Divide by 128.
1830   pub const _128: u32 = 0xD;
1831   /// Divide by 256.
1832   pub const _256: u32 = 0xF;
1833   /// Divide by 512.
1834   pub const _512: u32 = 0x11;
1835}
1836
1837/// Prescaler B and C Division Factor
1838#[allow(non_upper_case_globals)]
1839pub mod clk_psbcdiv {
1840   /// Divide B by 1 and C by 1.
1841   pub const _1_1: u32 = 0x0;
1842   /// Divide B by 1 and C by 2.
1843   pub const _1_2: u32 = 0x1;
1844   /// Divide B by 4 and C by 1.
1845   pub const _4_1: u32 = 0x2;
1846   /// Divide B by 2 and C by 2.
1847   pub const _2_2: u32 = 0x3;
1848}
1849
1850/// RTC Clock Source
1851#[allow(non_upper_case_globals)]
1852pub mod clk_rtcsrc {
1853   /// 1kHz from internal 32kHz ULP.
1854   pub const ULP: u32 = 0x0;
1855   /// 1kHz from 32kHz crystal oscillator on TOSC.
1856   pub const TOSC: u32 = 0x1;
1857   /// 1kHz from internal 32kHz RC oscillator.
1858   pub const RCOSC: u32 = 0x2;
1859   /// 32kHz from 32kHz crystal oscillator on TOSC.
1860   pub const TOSC32: u32 = 0x5;
1861}
1862
1863/// System Clock Selection
1864#[allow(non_upper_case_globals)]
1865pub mod clk_sclksel {
1866   /// Internal 2MHz RC Oscillator.
1867   pub const RC2M: u32 = 0x0;
1868   /// Internal 32MHz RC Oscillator.
1869   pub const RC32M: u32 = 0x1;
1870   /// Internal 32kHz RC Oscillator.
1871   pub const RC32K: u32 = 0x2;
1872   /// External Crystal Oscillator or Clock.
1873   pub const XOSC: u32 = 0x3;
1874   /// Phase Locked Loop.
1875   pub const PLL: u32 = 0x4;
1876}
1877
1878/// Output channel selection
1879#[allow(non_upper_case_globals)]
1880pub mod dac_chsel {
1881   /// Single channel operation (Channel A only).
1882   pub const SINGLE: u32 = 0x0;
1883   /// Dual channel operation (S/H on both channels).
1884   pub const DUAL: u32 = 0x2;
1885}
1886
1887/// Conversion interval
1888#[allow(non_upper_case_globals)]
1889pub mod dac_conintval {
1890   /// 1 CLK / 2 CLK in S/H mode.
1891   pub const _1CLK: u32 = 0x0;
1892   /// 2 CLK / 3 CLK in S/H mode.
1893   pub const _2CLK: u32 = 0x1;
1894   /// 4 CLK / 6 CLK in S/H mode.
1895   pub const _4CLK: u32 = 0x2;
1896   /// 8 CLK / 12 CLK in S/H mode.
1897   pub const _8CLK: u32 = 0x3;
1898   /// 16 CLK / 24 CLK in S/H mode.
1899   pub const _16CLK: u32 = 0x4;
1900   /// 32 CLK / 48 CLK in S/H mode.
1901   pub const _32CLK: u32 = 0x5;
1902   /// 64 CLK / 96 CLK in S/H mode.
1903   pub const _64CLK: u32 = 0x6;
1904   /// 128 CLK / 192 CLK in S/H mode.
1905   pub const _128CLK: u32 = 0x7;
1906}
1907
1908/// Event channel selection
1909#[allow(non_upper_case_globals)]
1910pub mod dac_evsel {
1911   /// Event Channel 0.
1912   pub const _0: u32 = 0x0;
1913   /// Event Channel 1.
1914   pub const _1: u32 = 0x1;
1915   /// Event Channel 2.
1916   pub const _2: u32 = 0x2;
1917   /// Event Channel 3.
1918   pub const _3: u32 = 0x3;
1919   /// Event Channel 4.
1920   pub const _4: u32 = 0x4;
1921   /// Event Channel 5.
1922   pub const _5: u32 = 0x5;
1923   /// Event Channel 6.
1924   pub const _6: u32 = 0x6;
1925   /// Event Channel 7.
1926   pub const _7: u32 = 0x7;
1927}
1928
1929/// Refresh rate
1930#[allow(non_upper_case_globals)]
1931pub mod dac_refresh {
1932   /// 16 CLK.
1933   pub const _16CLK: u32 = 0x0;
1934   /// 32 CLK.
1935   pub const _32CLK: u32 = 0x1;
1936   /// 64 CLK.
1937   pub const _64CLK: u32 = 0x2;
1938   /// 128 CLK.
1939   pub const _128CLK: u32 = 0x3;
1940   /// 256 CLK.
1941   pub const _256CLK: u32 = 0x4;
1942   /// 512 CLK.
1943   pub const _512CLK: u32 = 0x5;
1944   /// 1024 CLK.
1945   pub const _1024CLK: u32 = 0x6;
1946   /// 2048 CLK.
1947   pub const _2048CLK: u32 = 0x7;
1948   /// 4096 CLK.
1949   pub const _4096CLK: u32 = 0x8;
1950   /// 8192 CLK.
1951   pub const _8192CLK: u32 = 0x9;
1952   /// 16384 CLK.
1953   pub const _16384CLK: u32 = 0xA;
1954   /// 32768 CLK.
1955   pub const _32768CLK: u32 = 0xB;
1956   /// 65536 CLK.
1957   pub const _65536CLK: u32 = 0xC;
1958   /// Auto refresh OFF.
1959   pub const OFF: u32 = 0xF;
1960}
1961
1962/// Reference voltage selection
1963#[allow(non_upper_case_globals)]
1964pub mod dac_refsel {
1965   /// Internal 1V.
1966   pub const INT1V: u32 = 0x0;
1967   /// Analog supply voltage.
1968   pub const AVCC: u32 = 0x1;
1969   /// External reference on AREF on PORTA.
1970   pub const AREFA: u32 = 0x2;
1971   /// External reference on AREF on PORTB.
1972   pub const AREFB: u32 = 0x3;
1973}
1974
1975/// Burst mode
1976#[allow(non_upper_case_globals)]
1977pub mod dma_ch_burstlen {
1978   /// 1-byte burst mode.
1979   pub const _1BYTE: u32 = 0x0;
1980   /// 2-byte burst mode.
1981   pub const _2BYTE: u32 = 0x1;
1982   /// 4-byte burst mode.
1983   pub const _4BYTE: u32 = 0x2;
1984   /// 8-byte burst mode.
1985   pub const _8BYTE: u32 = 0x3;
1986}
1987
1988/// Destination adressing mode
1989#[allow(non_upper_case_globals)]
1990pub mod dma_ch_destdir {
1991   /// Fixed.
1992   pub const FIXED: u32 = 0x0;
1993   /// Increment.
1994   pub const INC: u32 = 0x1;
1995   /// Decrement.
1996   pub const DEC: u32 = 0x2;
1997}
1998
1999/// Destination adress reload mode
2000#[allow(non_upper_case_globals)]
2001pub mod dma_ch_destreload {
2002   /// No reload.
2003   pub const NONE: u32 = 0x0;
2004   /// Reload at end of block.
2005   pub const BLOCK: u32 = 0x1;
2006   /// Reload at end of burst.
2007   pub const BURST: u32 = 0x2;
2008   /// Reload at end of transaction.
2009   pub const TRANSACTION: u32 = 0x3;
2010}
2011
2012/// Interrupt level
2013#[allow(non_upper_case_globals)]
2014pub mod dma_ch_errintlvl {
2015   /// Interrupt disabled.
2016   pub const OFF: u32 = 0x0;
2017   /// Low level.
2018   pub const LO: u32 = 0x1;
2019   /// Medium level.
2020   pub const MED: u32 = 0x2;
2021   /// High level.
2022   pub const HI: u32 = 0x3;
2023}
2024
2025/// Source addressing mode
2026#[allow(non_upper_case_globals)]
2027pub mod dma_ch_srcdir {
2028   /// Fixed.
2029   pub const FIXED: u32 = 0x0;
2030   /// Increment.
2031   pub const INC: u32 = 0x1;
2032   /// Decrement.
2033   pub const DEC: u32 = 0x2;
2034}
2035
2036/// Source address reload mode
2037#[allow(non_upper_case_globals)]
2038pub mod dma_ch_srcreload {
2039   /// No reload.
2040   pub const NONE: u32 = 0x0;
2041   /// Reload at end of block.
2042   pub const BLOCK: u32 = 0x1;
2043   /// Reload at end of burst.
2044   pub const BURST: u32 = 0x2;
2045   /// Reload at end of transaction.
2046   pub const TRANSACTION: u32 = 0x3;
2047}
2048
2049/// Transfer trigger source
2050#[allow(non_upper_case_globals)]
2051pub mod dma_ch_trigsrc {
2052   /// Off software triggers only.
2053   pub const OFF: u32 = 0x0;
2054   /// Event System Channel 0.
2055   pub const EVSYS_CH0: u32 = 0x1;
2056   /// Event System Channel 1.
2057   pub const EVSYS_CH1: u32 = 0x2;
2058   /// Event System Channel 2.
2059   pub const EVSYS_CH2: u32 = 0x3;
2060   /// ADCA Channel 0.
2061   pub const ADCA_CH0: u32 = 0x10;
2062   /// ADCA Channel 1.
2063   pub const ADCA_CH1: u32 = 0x11;
2064   /// ADCA Channel 2.
2065   pub const ADCA_CH2: u32 = 0x12;
2066   /// ADCA Channel 3.
2067   pub const ADCA_CH3: u32 = 0x13;
2068   /// ADCA Channel 0,1,2,3 combined.
2069   pub const ADCA_CH4: u32 = 0x14;
2070   /// DACA Channel 0.
2071   pub const DACA_CH0: u32 = 0x15;
2072   /// DACA Channel 1.
2073   pub const DACA_CH1: u32 = 0x16;
2074   /// ADCB Channel 0.
2075   pub const ADCB_CH0: u32 = 0x20;
2076   /// ADCB Channel 1.
2077   pub const ADCB_CH1: u32 = 0x21;
2078   /// ADCB Channel 2.
2079   pub const ADCB_CH2: u32 = 0x22;
2080   /// ADCB Channel 3.
2081   pub const ADCB_CH3: u32 = 0x23;
2082   /// ADCB Channel 0,1,2,3 combined.
2083   pub const ADCB_CH4: u32 = 0x24;
2084   /// DACB Channel 0.
2085   pub const DACB_CH0: u32 = 0x25;
2086   /// DACB Channel 1.
2087   pub const DACB_CH1: u32 = 0x26;
2088   /// Timer/Counter C0 Overflow.
2089   pub const TCC0_OVF: u32 = 0x40;
2090   /// Timer/Counter C0 Error.
2091   pub const TCC0_ERR: u32 = 0x41;
2092   /// Timer/Counter C0 Compare or Capture A.
2093   pub const TCC0_CCA: u32 = 0x42;
2094   /// Timer/Counter C0 Compare or Capture B.
2095   pub const TCC0_CCB: u32 = 0x43;
2096   /// Timer/Counter C0 Compare or Capture C.
2097   pub const TCC0_CCC: u32 = 0x44;
2098   /// Timer/Counter C0 Compare or Capture D.
2099   pub const TCC0_CCD: u32 = 0x45;
2100   /// Timer/Counter C1 Overflow.
2101   pub const TCC1_OVF: u32 = 0x46;
2102   /// Timer/Counter C1 Error.
2103   pub const TCC1_ERR: u32 = 0x47;
2104   /// Timer/Counter C1 Compare or Capture A.
2105   pub const TCC1_CCA: u32 = 0x48;
2106   /// Timer/Counter C1 Compare or Capture B.
2107   pub const TCC1_CCB: u32 = 0x49;
2108   /// SPI C Transfer Complete.
2109   pub const SPIC: u32 = 0x4A;
2110   /// USART C0 Receive Complete.
2111   pub const USARTC0_RXC: u32 = 0x4B;
2112   /// USART C0 Data Register Empty.
2113   pub const USARTC0_DRE: u32 = 0x4C;
2114   /// USART C1 Receive Complete.
2115   pub const USARTC1_RXC: u32 = 0x4E;
2116   /// USART C1 Data Register Empty.
2117   pub const USARTC1_DRE: u32 = 0x4F;
2118   /// Timer/Counter D0 Overflow.
2119   pub const TCD0_OVF: u32 = 0x60;
2120   /// Timer/Counter D0 Error.
2121   pub const TCD0_ERR: u32 = 0x61;
2122   /// Timer/Counter D0 Compare or Capture A.
2123   pub const TCD0_CCA: u32 = 0x62;
2124   /// Timer/Counter D0 Compare or Capture B.
2125   pub const TCD0_CCB: u32 = 0x63;
2126   /// Timer/Counter D0 Compare or Capture C.
2127   pub const TCD0_CCC: u32 = 0x64;
2128   /// Timer/Counter D0 Compare or Capture D.
2129   pub const TCD0_CCD: u32 = 0x65;
2130   /// Timer/Counter D1 Overflow.
2131   pub const TCD1_OVF: u32 = 0x66;
2132   /// Timer/Counter D1 Error.
2133   pub const TCD1_ERR: u32 = 0x67;
2134   /// Timer/Counter D1 Compare or Capture A.
2135   pub const TCD1_CCA: u32 = 0x68;
2136   /// Timer/Counter D1 Compare or Capture B.
2137   pub const TCD1_CCB: u32 = 0x69;
2138   /// SPI D Transfer Complete.
2139   pub const SPID: u32 = 0x6A;
2140   /// USART D0 Receive Complete.
2141   pub const USARTD0_RXC: u32 = 0x6B;
2142   /// USART D0 Data Register Empty.
2143   pub const USARTD0_DRE: u32 = 0x6C;
2144   /// USART D1 Receive Complete.
2145   pub const USARTD1_RXC: u32 = 0x6E;
2146   /// USART D1 Data Register Empty.
2147   pub const USARTD1_DRE: u32 = 0x6F;
2148   /// Timer/Counter E0 Overflow.
2149   pub const TCE0_OVF: u32 = 0x80;
2150   /// Timer/Counter E0 Error.
2151   pub const TCE0_ERR: u32 = 0x81;
2152   /// Timer/Counter E0 Compare or Capture A.
2153   pub const TCE0_CCA: u32 = 0x82;
2154   /// Timer/Counter E0 Compare or Capture B.
2155   pub const TCE0_CCB: u32 = 0x83;
2156   /// Timer/Counter E0 Compare or Capture C.
2157   pub const TCE0_CCC: u32 = 0x84;
2158   /// Timer/Counter E0 Compare or Capture D.
2159   pub const TCE0_CCD: u32 = 0x85;
2160   /// Timer/Counter E1 Overflow.
2161   pub const TCE1_OVF: u32 = 0x86;
2162   /// Timer/Counter E1 Error.
2163   pub const TCE1_ERR: u32 = 0x87;
2164   /// Timer/Counter E1 Compare or Capture A.
2165   pub const TCE1_CCA: u32 = 0x88;
2166   /// Timer/Counter E1 Compare or Capture B.
2167   pub const TCE1_CCB: u32 = 0x89;
2168   /// SPI E Transfer Complete.
2169   pub const SPIE: u32 = 0x8A;
2170   /// USART E0 Receive Complete.
2171   pub const USARTE0_RXC: u32 = 0x8B;
2172   /// USART E0 Data Register Empty.
2173   pub const USARTE0_DRE: u32 = 0x8C;
2174   /// USART E1 Receive Complete.
2175   pub const USARTE1_RXC: u32 = 0x8E;
2176   /// USART E1 Data Register Empty.
2177   pub const USARTE1_DRE: u32 = 0x8F;
2178   /// Timer/Counter F0 Overflow.
2179   pub const TCF0_OVF: u32 = 0xA0;
2180   /// Timer/Counter F0 Error.
2181   pub const TCF0_ERR: u32 = 0xA1;
2182   /// Timer/Counter F0 Compare or Capture A.
2183   pub const TCF0_CCA: u32 = 0xA2;
2184   /// Timer/Counter F0 Compare or Capture B.
2185   pub const TCF0_CCB: u32 = 0xA3;
2186   /// Timer/Counter F0 Compare or Capture C.
2187   pub const TCF0_CCC: u32 = 0xA4;
2188   /// Timer/Counter F0 Compare or Capture D.
2189   pub const TCF0_CCD: u32 = 0xA5;
2190   /// Timer/Counter F1 Overflow.
2191   pub const TCF1_OVF: u32 = 0xA6;
2192   /// Timer/Counter F1 Error.
2193   pub const TCF1_ERR: u32 = 0xA7;
2194   /// Timer/Counter F1 Compare or Capture A.
2195   pub const TCF1_CCA: u32 = 0xA8;
2196   /// Timer/Counter F1 Compare or Capture B.
2197   pub const TCF1_CCB: u32 = 0xA9;
2198   /// SPI F Transfer Complete.
2199   pub const SPIF: u32 = 0xAA;
2200   /// USART F0 Receive Complete.
2201   pub const USARTF0_RXC: u32 = 0xAB;
2202   /// USART F0 Data Register Empty.
2203   pub const USARTF0_DRE: u32 = 0xAC;
2204   /// USART F1 Receive Complete.
2205   pub const USARTF1_RXC: u32 = 0xAE;
2206   /// USART F1 Data Register Empty.
2207   pub const USARTF1_DRE: u32 = 0xAF;
2208}
2209
2210/// Interrupt level
2211#[allow(non_upper_case_globals)]
2212pub mod dma_ch_trnintlvl {
2213   /// Interrupt disabled.
2214   pub const OFF: u32 = 0x0;
2215   /// Low level.
2216   pub const LO: u32 = 0x1;
2217   /// Medium level.
2218   pub const MED: u32 = 0x2;
2219   /// High level.
2220   pub const HI: u32 = 0x3;
2221}
2222
2223/// Double buffering mode
2224#[allow(non_upper_case_globals)]
2225pub mod dma_dbufmode {
2226   /// Double buffering disabled.
2227   pub const DISABLED: u32 = 0x0;
2228   /// Double buffering enabled on channel 0/1.
2229   pub const CH01: u32 = 0x1;
2230   /// Double buffering enabled on channel 2/3.
2231   pub const CH23: u32 = 0x2;
2232   /// Double buffering enabled on ch. 0/1 and ch. 2/3.
2233   pub const CH01CH23: u32 = 0x3;
2234}
2235
2236/// Priority mode
2237#[allow(non_upper_case_globals)]
2238pub mod dma_primode {
2239   /// Round Robin.
2240   pub const RR0123: u32 = 0x0;
2241   /// Channel 0 > Round Robin on channel 1/2/3.
2242   pub const CH0RR123: u32 = 0x1;
2243   /// Channel 0 > channel 1 > Round Robin on channel 2/3.
2244   pub const CH01RR23: u32 = 0x2;
2245   /// Channel 0 > channel 1 > channel 2 > channel 3.
2246   pub const CH0123: u32 = 0x3;
2247}
2248
2249/// Event Channel multiplexer input selection
2250#[allow(non_upper_case_globals)]
2251pub mod evsys_chmux {
2252   /// Off.
2253   pub const OFF: u32 = 0x0;
2254   /// RTC Overflow.
2255   pub const RTC_OVF: u32 = 0x8;
2256   /// RTC Compare Match.
2257   pub const RTC_CMP: u32 = 0x9;
2258   /// Analog Comparator A Channel 0.
2259   pub const ACA_CH0: u32 = 0x10;
2260   /// Analog Comparator A Channel 1.
2261   pub const ACA_CH1: u32 = 0x11;
2262   /// Analog Comparator A Window.
2263   pub const ACA_WIN: u32 = 0x12;
2264   /// Analog Comparator B Channel 0.
2265   pub const ACB_CH0: u32 = 0x13;
2266   /// Analog Comparator B Channel 1.
2267   pub const ACB_CH1: u32 = 0x14;
2268   /// Analog Comparator B Window.
2269   pub const ACB_WIN: u32 = 0x15;
2270   /// ADC A Channel 0.
2271   pub const ADCA_CH0: u32 = 0x20;
2272   /// ADC A Channel 1.
2273   pub const ADCA_CH1: u32 = 0x21;
2274   /// ADC A Channel 2.
2275   pub const ADCA_CH2: u32 = 0x22;
2276   /// ADC A Channel 3.
2277   pub const ADCA_CH3: u32 = 0x23;
2278   /// ADC B Channel 0.
2279   pub const ADCB_CH0: u32 = 0x24;
2280   /// ADC B Channel 1.
2281   pub const ADCB_CH1: u32 = 0x25;
2282   /// ADC B Channel 2.
2283   pub const ADCB_CH2: u32 = 0x26;
2284   /// ADC B Channel 3.
2285   pub const ADCB_CH3: u32 = 0x27;
2286   /// Port A, Pin0.
2287   pub const PORTA_PIN0: u32 = 0x50;
2288   /// Port A, Pin1.
2289   pub const PORTA_PIN1: u32 = 0x51;
2290   /// Port A, Pin2.
2291   pub const PORTA_PIN2: u32 = 0x52;
2292   /// Port A, Pin3.
2293   pub const PORTA_PIN3: u32 = 0x53;
2294   /// Port A, Pin4.
2295   pub const PORTA_PIN4: u32 = 0x54;
2296   /// Port A, Pin5.
2297   pub const PORTA_PIN5: u32 = 0x55;
2298   /// Port A, Pin6.
2299   pub const PORTA_PIN6: u32 = 0x56;
2300   /// Port A, Pin7.
2301   pub const PORTA_PIN7: u32 = 0x57;
2302   /// Port B, Pin0.
2303   pub const PORTB_PIN0: u32 = 0x58;
2304   /// Port B, Pin1.
2305   pub const PORTB_PIN1: u32 = 0x59;
2306   /// Port B, Pin2.
2307   pub const PORTB_PIN2: u32 = 0x5A;
2308   /// Port B, Pin3.
2309   pub const PORTB_PIN3: u32 = 0x5B;
2310   /// Port B, Pin4.
2311   pub const PORTB_PIN4: u32 = 0x5C;
2312   /// Port B, Pin5.
2313   pub const PORTB_PIN5: u32 = 0x5D;
2314   /// Port B, Pin6.
2315   pub const PORTB_PIN6: u32 = 0x5E;
2316   /// Port B, Pin7.
2317   pub const PORTB_PIN7: u32 = 0x5F;
2318   /// Port C, Pin0.
2319   pub const PORTC_PIN0: u32 = 0x60;
2320   /// Port C, Pin1.
2321   pub const PORTC_PIN1: u32 = 0x61;
2322   /// Port C, Pin2.
2323   pub const PORTC_PIN2: u32 = 0x62;
2324   /// Port C, Pin3.
2325   pub const PORTC_PIN3: u32 = 0x63;
2326   /// Port C, Pin4.
2327   pub const PORTC_PIN4: u32 = 0x64;
2328   /// Port C, Pin5.
2329   pub const PORTC_PIN5: u32 = 0x65;
2330   /// Port C, Pin6.
2331   pub const PORTC_PIN6: u32 = 0x66;
2332   /// Port C, Pin7.
2333   pub const PORTC_PIN7: u32 = 0x67;
2334   /// Port D, Pin0.
2335   pub const PORTD_PIN0: u32 = 0x68;
2336   /// Port D, Pin1.
2337   pub const PORTD_PIN1: u32 = 0x69;
2338   /// Port D, Pin2.
2339   pub const PORTD_PIN2: u32 = 0x6A;
2340   /// Port D, Pin3.
2341   pub const PORTD_PIN3: u32 = 0x6B;
2342   /// Port D, Pin4.
2343   pub const PORTD_PIN4: u32 = 0x6C;
2344   /// Port D, Pin5.
2345   pub const PORTD_PIN5: u32 = 0x6D;
2346   /// Port D, Pin6.
2347   pub const PORTD_PIN6: u32 = 0x6E;
2348   /// Port D, Pin7.
2349   pub const PORTD_PIN7: u32 = 0x6F;
2350   /// Port E, Pin0.
2351   pub const PORTE_PIN0: u32 = 0x70;
2352   /// Port E, Pin1.
2353   pub const PORTE_PIN1: u32 = 0x71;
2354   /// Port E, Pin2.
2355   pub const PORTE_PIN2: u32 = 0x72;
2356   /// Port E, Pin3.
2357   pub const PORTE_PIN3: u32 = 0x73;
2358   /// Port E, Pin4.
2359   pub const PORTE_PIN4: u32 = 0x74;
2360   /// Port E, Pin5.
2361   pub const PORTE_PIN5: u32 = 0x75;
2362   /// Port E, Pin6.
2363   pub const PORTE_PIN6: u32 = 0x76;
2364   /// Port E, Pin7.
2365   pub const PORTE_PIN7: u32 = 0x77;
2366   /// Port F, Pin0.
2367   pub const PORTF_PIN0: u32 = 0x78;
2368   /// Port F, Pin1.
2369   pub const PORTF_PIN1: u32 = 0x79;
2370   /// Port F, Pin2.
2371   pub const PORTF_PIN2: u32 = 0x7A;
2372   /// Port F, Pin3.
2373   pub const PORTF_PIN3: u32 = 0x7B;
2374   /// Port F, Pin4.
2375   pub const PORTF_PIN4: u32 = 0x7C;
2376   /// Port F, Pin5.
2377   pub const PORTF_PIN5: u32 = 0x7D;
2378   /// Port F, Pin6.
2379   pub const PORTF_PIN6: u32 = 0x7E;
2380   /// Port F, Pin7.
2381   pub const PORTF_PIN7: u32 = 0x7F;
2382   /// Prescaler, divide by 1.
2383   pub const PRESCALER_1: u32 = 0x80;
2384   /// Prescaler, divide by 2.
2385   pub const PRESCALER_2: u32 = 0x81;
2386   /// Prescaler, divide by 4.
2387   pub const PRESCALER_4: u32 = 0x82;
2388   /// Prescaler, divide by 8.
2389   pub const PRESCALER_8: u32 = 0x83;
2390   /// Prescaler, divide by 16.
2391   pub const PRESCALER_16: u32 = 0x84;
2392   /// Prescaler, divide by 32.
2393   pub const PRESCALER_32: u32 = 0x85;
2394   /// Prescaler, divide by 64.
2395   pub const PRESCALER_64: u32 = 0x86;
2396   /// Prescaler, divide by 128.
2397   pub const PRESCALER_128: u32 = 0x87;
2398   /// Prescaler, divide by 256.
2399   pub const PRESCALER_256: u32 = 0x88;
2400   /// Prescaler, divide by 512.
2401   pub const PRESCALER_512: u32 = 0x89;
2402   /// Prescaler, divide by 1024.
2403   pub const PRESCALER_1024: u32 = 0x8A;
2404   /// Prescaler, divide by 2048.
2405   pub const PRESCALER_2048: u32 = 0x8B;
2406   /// Prescaler, divide by 4096.
2407   pub const PRESCALER_4096: u32 = 0x8C;
2408   /// Prescaler, divide by 8192.
2409   pub const PRESCALER_8192: u32 = 0x8D;
2410   /// Prescaler, divide by 16384.
2411   pub const PRESCALER_16384: u32 = 0x8E;
2412   /// Prescaler, divide by 32768.
2413   pub const PRESCALER_32768: u32 = 0x8F;
2414   /// Timer/Counter C0 Overflow.
2415   pub const TCC0_OVF: u32 = 0xC0;
2416   /// Timer/Counter C0 Error.
2417   pub const TCC0_ERR: u32 = 0xC1;
2418   /// Timer/Counter C0 Compare or Capture A.
2419   pub const TCC0_CCA: u32 = 0xC4;
2420   /// Timer/Counter C0 Compare or Capture B.
2421   pub const TCC0_CCB: u32 = 0xC5;
2422   /// Timer/Counter C0 Compare or Capture C.
2423   pub const TCC0_CCC: u32 = 0xC6;
2424   /// Timer/Counter C0 Compare or Capture D.
2425   pub const TCC0_CCD: u32 = 0xC7;
2426   /// Timer/Counter C1 Overflow.
2427   pub const TCC1_OVF: u32 = 0xC8;
2428   /// Timer/Counter C1 Error.
2429   pub const TCC1_ERR: u32 = 0xC9;
2430   /// Timer/Counter C1 Compare or Capture A.
2431   pub const TCC1_CCA: u32 = 0xCC;
2432   /// Timer/Counter C1 Compare or Capture B.
2433   pub const TCC1_CCB: u32 = 0xCD;
2434   /// Timer/Counter D0 Overflow.
2435   pub const TCD0_OVF: u32 = 0xD0;
2436   /// Timer/Counter D0 Error.
2437   pub const TCD0_ERR: u32 = 0xD1;
2438   /// Timer/Counter D0 Compare or Capture A.
2439   pub const TCD0_CCA: u32 = 0xD4;
2440   /// Timer/Counter D0 Compare or Capture B.
2441   pub const TCD0_CCB: u32 = 0xD5;
2442   /// Timer/Counter D0 Compare or Capture C.
2443   pub const TCD0_CCC: u32 = 0xD6;
2444   /// Timer/Counter D0 Compare or Capture D.
2445   pub const TCD0_CCD: u32 = 0xD7;
2446   /// Timer/Counter D1 Overflow.
2447   pub const TCD1_OVF: u32 = 0xD8;
2448   /// Timer/Counter D1 Error.
2449   pub const TCD1_ERR: u32 = 0xD9;
2450   /// Timer/Counter D1 Compare or Capture A.
2451   pub const TCD1_CCA: u32 = 0xDC;
2452   /// Timer/Counter D1 Compare or Capture B.
2453   pub const TCD1_CCB: u32 = 0xDD;
2454   /// Timer/Counter E0 Overflow.
2455   pub const TCE0_OVF: u32 = 0xE0;
2456   /// Timer/Counter E0 Error.
2457   pub const TCE0_ERR: u32 = 0xE1;
2458   /// Timer/Counter E0 Compare or Capture A.
2459   pub const TCE0_CCA: u32 = 0xE4;
2460   /// Timer/Counter E0 Compare or Capture B.
2461   pub const TCE0_CCB: u32 = 0xE5;
2462   /// Timer/Counter E0 Compare or Capture C.
2463   pub const TCE0_CCC: u32 = 0xE6;
2464   /// Timer/Counter E0 Compare or Capture D.
2465   pub const TCE0_CCD: u32 = 0xE7;
2466   /// Timer/Counter E1 Overflow.
2467   pub const TCE1_OVF: u32 = 0xE8;
2468   /// Timer/Counter E1 Error.
2469   pub const TCE1_ERR: u32 = 0xE9;
2470   /// Timer/Counter E1 Compare or Capture A.
2471   pub const TCE1_CCA: u32 = 0xEC;
2472   /// Timer/Counter E1 Compare or Capture B.
2473   pub const TCE1_CCB: u32 = 0xED;
2474   /// Timer/Counter F0 Overflow.
2475   pub const TCF0_OVF: u32 = 0xF0;
2476   /// Timer/Counter F0 Error.
2477   pub const TCF0_ERR: u32 = 0xF1;
2478   /// Timer/Counter F0 Compare or Capture A.
2479   pub const TCF0_CCA: u32 = 0xF4;
2480   /// Timer/Counter F0 Compare or Capture B.
2481   pub const TCF0_CCB: u32 = 0xF5;
2482   /// Timer/Counter F0 Compare or Capture C.
2483   pub const TCF0_CCC: u32 = 0xF6;
2484   /// Timer/Counter F0 Compare or Capture D.
2485   pub const TCF0_CCD: u32 = 0xF7;
2486   /// Timer/Counter F1 Overflow.
2487   pub const TCF1_OVF: u32 = 0xF8;
2488   /// Timer/Counter F1 Error.
2489   pub const TCF1_ERR: u32 = 0xF9;
2490   /// Timer/Counter F1 Compare or Capture A.
2491   pub const TCF1_CCA: u32 = 0xFC;
2492   /// Timer/Counter F1 Compare or Capture B.
2493   pub const TCF1_CCB: u32 = 0xFD;
2494}
2495
2496/// Digital filter coefficient
2497#[allow(non_upper_case_globals)]
2498pub mod evsys_digfilt {
2499   /// 1 SAMPLE.
2500   pub const _1SAMPLE: u32 = 0x0;
2501   /// 2 SAMPLES.
2502   pub const _2SAMPLES: u32 = 0x1;
2503   /// 3 SAMPLES.
2504   pub const _3SAMPLES: u32 = 0x2;
2505   /// 4 SAMPLES.
2506   pub const _4SAMPLES: u32 = 0x3;
2507   /// 5 SAMPLES.
2508   pub const _5SAMPLES: u32 = 0x4;
2509   /// 6 SAMPLES.
2510   pub const _6SAMPLES: u32 = 0x5;
2511   /// 7 SAMPLES.
2512   pub const _7SAMPLES: u32 = 0x6;
2513   /// 8 SAMPLES.
2514   pub const _8SAMPLES: u32 = 0x7;
2515}
2516
2517/// Quadrature Decoder Index Recognition Mode
2518#[allow(non_upper_case_globals)]
2519pub mod evsys_qdirm {
2520   /// QDPH0 = 0, QDPH90 = 0.
2521   pub const _00: u32 = 0x0;
2522   /// QDPH0 = 0, QDPH90 = 1.
2523   pub const _01: u32 = 0x1;
2524   /// QDPH0 = 1, QDPH90 = 0.
2525   pub const _10: u32 = 0x2;
2526   /// QDPH0 = 1, QDPH90 = 1.
2527   pub const _11: u32 = 0x3;
2528}
2529
2530/// High Resolution Enable
2531#[allow(non_upper_case_globals)]
2532pub mod hires_hren {
2533   /// No Fault Protection.
2534   pub const NONE: u32 = 0x0;
2535   /// Enable High Resolution on Timer/Counter 0.
2536   pub const TC0: u32 = 0x1;
2537   /// Enable High Resolution on Timer/Counter 1.
2538   pub const TC1: u32 = 0x2;
2539   /// Enable High Resolution both Timer/Counters.
2540   pub const BOTH: u32 = 0x3;
2541}
2542
2543/// Event channel selection
2544#[allow(non_upper_case_globals)]
2545pub mod irda_evsel {
2546   /// No Event Source.
2547   pub const OFF: u32 = 0x0;
2548   /// Event Channel 0.
2549   pub const _0: u32 = 0x8;
2550   /// Event Channel 1.
2551   pub const _1: u32 = 0x9;
2552   /// Event Channel 2.
2553   pub const _2: u32 = 0xA;
2554   /// Event Channel 3.
2555   pub const _3: u32 = 0xB;
2556   /// Event Channel 4.
2557   pub const _4: u32 = 0xC;
2558   /// Event Channel 5.
2559   pub const _5: u32 = 0xD;
2560   /// Event Channel 6.
2561   pub const _6: u32 = 0xE;
2562   /// Event Channel 7.
2563   pub const _7: u32 = 0xF;
2564}
2565
2566/// Boot lock bits - application section
2567#[allow(non_upper_case_globals)]
2568pub mod nvm_blba {
2569   /// No locks.
2570   pub const NOLOCK: u32 = 0x3;
2571   /// Write not allowed.
2572   pub const WLOCK: u32 = 0x2;
2573   /// Read not allowed.
2574   pub const RLOCK: u32 = 0x1;
2575   /// Read and write not allowed.
2576   pub const RWLOCK: u32 = 0x0;
2577}
2578
2579/// Boot lock bits - application table section
2580#[allow(non_upper_case_globals)]
2581pub mod nvm_blbat {
2582   /// No locks.
2583   pub const NOLOCK: u32 = 0x3;
2584   /// Write not allowed.
2585   pub const WLOCK: u32 = 0x2;
2586   /// Read not allowed.
2587   pub const RLOCK: u32 = 0x1;
2588   /// Read and write not allowed.
2589   pub const RWLOCK: u32 = 0x0;
2590}
2591
2592/// Boot lock bits - boot setcion
2593#[allow(non_upper_case_globals)]
2594pub mod nvm_blbb {
2595   /// No locks.
2596   pub const NOLOCK: u32 = 0x3;
2597   /// Write not allowed.
2598   pub const WLOCK: u32 = 0x2;
2599   /// Read not allowed.
2600   pub const RLOCK: u32 = 0x1;
2601   /// Read and write not allowed.
2602   pub const RWLOCK: u32 = 0x0;
2603}
2604
2605/// NVM Command
2606#[allow(non_upper_case_globals)]
2607pub mod nvm_cmd {
2608   /// Noop/Ordinary LPM.
2609   pub const NO_OPERATION: u32 = 0x0;
2610   /// Read calibration row.
2611   pub const READ_CALIB_ROW: u32 = 0x2;
2612   /// Read user signature row.
2613   pub const READ_USER_SIG_ROW: u32 = 0x1;
2614   /// Read EEPROM.
2615   pub const READ_EEPROM: u32 = 0x6;
2616   /// Read fuse byte.
2617   pub const READ_FUSES: u32 = 0x7;
2618   /// Write lock bits.
2619   pub const WRITE_LOCK_BITS: u32 = 0x8;
2620   /// Erase user signature row.
2621   pub const ERASE_USER_SIG_ROW: u32 = 0x18;
2622   /// Write user signature row.
2623   pub const WRITE_USER_SIG_ROW: u32 = 0x1A;
2624   /// Erase Application Section.
2625   pub const ERASE_APP: u32 = 0x20;
2626   /// Erase Application Section page.
2627   pub const ERASE_APP_PAGE: u32 = 0x22;
2628   /// Load Flash page buffer.
2629   pub const LOAD_FLASH_BUFFER: u32 = 0x23;
2630   /// Write Application Section page.
2631   pub const WRITE_APP_PAGE: u32 = 0x24;
2632   /// Erase-and-write Application Section page.
2633   pub const ERASE_WRITE_APP_PAGE: u32 = 0x25;
2634   /// Erase/flush Flash page buffer.
2635   pub const ERASE_FLASH_BUFFER: u32 = 0x26;
2636   /// Erase Boot Section page.
2637   pub const ERASE_BOOT_PAGE: u32 = 0x2A;
2638   /// Erase Flash page.
2639   pub const ERASE_FLASH_PAGE: u32 = 0x2B;
2640   /// Write Boot Section page.
2641   pub const WRITE_BOOT_PAGE: u32 = 0x2C;
2642   /// Erase-and-write Boot Section page.
2643   pub const ERASE_WRITE_BOOT_PAGE: u32 = 0x2D;
2644   /// Write Flash page.
2645   pub const WRITE_FLASH_PAGE: u32 = 0x2E;
2646   /// Erase and Write Flash page.
2647   pub const ERASE_WRITE_FLASH_PAGE: u32 = 0x2F;
2648   /// Erase EEPROM.
2649   pub const ERASE_EEPROM: u32 = 0x30;
2650   /// Erase EEPROM page.
2651   pub const ERASE_EEPROM_PAGE: u32 = 0x32;
2652   /// Load EEPROM page buffer.
2653   pub const LOAD_EEPROM_BUFFER: u32 = 0x33;
2654   /// Write EEPROM page.
2655   pub const WRITE_EEPROM_PAGE: u32 = 0x34;
2656   /// Erase-and-write EEPROM page.
2657   pub const ERASE_WRITE_EEPROM_PAGE: u32 = 0x35;
2658   /// Erase/flush EEPROM page buffer.
2659   pub const ERASE_EEPROM_BUFFER: u32 = 0x36;
2660   /// Generate Application section CRC.
2661   pub const APP_CRC: u32 = 0x38;
2662   /// Generate Boot Section CRC.
2663   pub const BOOT_CRC: u32 = 0x39;
2664   /// Generate Flash Range CRC.
2665   pub const FLASH_RANGE_CRC: u32 = 0x3A;
2666}
2667
2668/// EEPROM ready interrupt level
2669#[allow(non_upper_case_globals)]
2670pub mod nvm_eelvl {
2671   /// Interrupt disabled.
2672   pub const OFF: u32 = 0x0;
2673   /// Low level.
2674   pub const LO: u32 = 0x1;
2675   /// Medium level.
2676   pub const MED: u32 = 0x2;
2677   /// High level.
2678   pub const HI: u32 = 0x3;
2679}
2680
2681/// Lock bits
2682#[allow(non_upper_case_globals)]
2683pub mod nvm_lb {
2684   /// No locks.
2685   pub const NOLOCK: u32 = 0x3;
2686   /// Write not allowed.
2687   pub const WLOCK: u32 = 0x2;
2688   /// Read and write not allowed.
2689   pub const RWLOCK: u32 = 0x0;
2690}
2691
2692/// SPM ready interrupt level
2693#[allow(non_upper_case_globals)]
2694pub mod nvm_spmlvl {
2695   /// Interrupt disabled.
2696   pub const OFF: u32 = 0x0;
2697   /// Low level.
2698   pub const LO: u32 = 0x1;
2699   /// Medium level.
2700   pub const MED: u32 = 0x2;
2701   /// High level.
2702   pub const HI: u32 = 0x3;
2703}
2704
2705/// Oscillator Frequency Range
2706#[allow(non_upper_case_globals)]
2707pub mod osc_frqrange {
2708   /// 0.4 - 2 MHz.
2709   pub const _04TO2: u32 = 0x0;
2710   /// 2 - 9 MHz.
2711   pub const _2TO9: u32 = 0x1;
2712   /// 9 - 12 MHz.
2713   pub const _9TO12: u32 = 0x2;
2714   /// 12 - 16 MHz.
2715   pub const _12TO16: u32 = 0x3;
2716}
2717
2718/// PLL Clock Source
2719#[allow(non_upper_case_globals)]
2720pub mod osc_pllsrc {
2721   /// Internal 2MHz RC Oscillator.
2722   pub const RC2M: u32 = 0x0;
2723   /// Internal 32MHz RC Oscillator.
2724   pub const RC32M: u32 = 0x2;
2725   /// External Oscillator.
2726   pub const XOSC: u32 = 0x3;
2727}
2728
2729/// External Oscillator Selection and Startup Time
2730#[allow(non_upper_case_globals)]
2731pub mod osc_xoscsel {
2732   /// External Clock - 6 CLK.
2733   pub const EXTCLK: u32 = 0x0;
2734   /// 32kHz TOSC - 32K CLK.
2735   pub const _32KHz: u32 = 0x2;
2736   /// 0.4-16MHz XTAL - 256 CLK.
2737   pub const XTAL_256CLK: u32 = 0x3;
2738   /// 0.4-16MHz XTAL - 1K CLK.
2739   pub const XTAL_1KCLK: u32 = 0x7;
2740   /// 0.4-16MHz XTAL - 16K CLK.
2741   pub const XTAL_16KCLK: u32 = 0xB;
2742}
2743
2744/// Clock Output Port
2745#[allow(non_upper_case_globals)]
2746pub mod portcfg_clkout {
2747   /// Clock Output Disabled.
2748   pub const OFF: u32 = 0x0;
2749   /// Clock Output on Port C pin 7.
2750   pub const PC7: u32 = 0x1;
2751   /// Clock Output on Port D pin 7.
2752   pub const PD7: u32 = 0x2;
2753   /// Clock Output on Port E pin 7.
2754   pub const PE7: u32 = 0x3;
2755}
2756
2757/// Event Output Port
2758#[allow(non_upper_case_globals)]
2759pub mod portcfg_evout {
2760   /// Event Output Disabled.
2761   pub const OFF: u32 = 0x0;
2762   /// Event Channel 7 Output on Port C pin 7.
2763   pub const PC7: u32 = 0x1;
2764   /// Event Channel 7 Output on Port D pin 7.
2765   pub const PD7: u32 = 0x2;
2766   /// Event Channel 7 Output on Port E pin 7.
2767   pub const PE7: u32 = 0x3;
2768}
2769
2770/// Virtual Port 0 Mapping
2771#[allow(non_upper_case_globals)]
2772pub mod portcfg_vp0map {
2773   /// Mapped To PORTA.
2774   pub const PORTA: u32 = 0x0;
2775   /// Mapped To PORTB.
2776   pub const PORTB: u32 = 0x1;
2777   /// Mapped To PORTC.
2778   pub const PORTC: u32 = 0x2;
2779   /// Mapped To PORTD.
2780   pub const PORTD: u32 = 0x3;
2781   /// Mapped To PORTE.
2782   pub const PORTE: u32 = 0x4;
2783   /// Mapped To PORTF.
2784   pub const PORTF: u32 = 0x5;
2785   /// Mapped To PORTG.
2786   pub const PORTG: u32 = 0x6;
2787   /// Mapped To PORTH.
2788   pub const PORTH: u32 = 0x7;
2789   /// Mapped To PORTJ.
2790   pub const PORTJ: u32 = 0x8;
2791   /// Mapped To PORTK.
2792   pub const PORTK: u32 = 0x9;
2793   /// Mapped To PORTL.
2794   pub const PORTL: u32 = 0xA;
2795   /// Mapped To PORTM.
2796   pub const PORTM: u32 = 0xB;
2797   /// Mapped To PORTN.
2798   pub const PORTN: u32 = 0xC;
2799   /// Mapped To PORTP.
2800   pub const PORTP: u32 = 0xD;
2801   /// Mapped To PORTQ.
2802   pub const PORTQ: u32 = 0xE;
2803   /// Mapped To PORTR.
2804   pub const PORTR: u32 = 0xF;
2805}
2806
2807/// Virtual Port 1 Mapping
2808#[allow(non_upper_case_globals)]
2809pub mod portcfg_vp1map {
2810   /// Mapped To PORTA.
2811   pub const PORTA: u32 = 0x0;
2812   /// Mapped To PORTB.
2813   pub const PORTB: u32 = 0x1;
2814   /// Mapped To PORTC.
2815   pub const PORTC: u32 = 0x2;
2816   /// Mapped To PORTD.
2817   pub const PORTD: u32 = 0x3;
2818   /// Mapped To PORTE.
2819   pub const PORTE: u32 = 0x4;
2820   /// Mapped To PORTF.
2821   pub const PORTF: u32 = 0x5;
2822   /// Mapped To PORTG.
2823   pub const PORTG: u32 = 0x6;
2824   /// Mapped To PORTH.
2825   pub const PORTH: u32 = 0x7;
2826   /// Mapped To PORTJ.
2827   pub const PORTJ: u32 = 0x8;
2828   /// Mapped To PORTK.
2829   pub const PORTK: u32 = 0x9;
2830   /// Mapped To PORTL.
2831   pub const PORTL: u32 = 0xA;
2832   /// Mapped To PORTM.
2833   pub const PORTM: u32 = 0xB;
2834   /// Mapped To PORTN.
2835   pub const PORTN: u32 = 0xC;
2836   /// Mapped To PORTP.
2837   pub const PORTP: u32 = 0xD;
2838   /// Mapped To PORTQ.
2839   pub const PORTQ: u32 = 0xE;
2840   /// Mapped To PORTR.
2841   pub const PORTR: u32 = 0xF;
2842}
2843
2844/// Virtual Port 2 Mapping
2845#[allow(non_upper_case_globals)]
2846pub mod portcfg_vp2map {
2847   /// Mapped To PORTA.
2848   pub const PORTA: u32 = 0x0;
2849   /// Mapped To PORTB.
2850   pub const PORTB: u32 = 0x1;
2851   /// Mapped To PORTC.
2852   pub const PORTC: u32 = 0x2;
2853   /// Mapped To PORTD.
2854   pub const PORTD: u32 = 0x3;
2855   /// Mapped To PORTE.
2856   pub const PORTE: u32 = 0x4;
2857   /// Mapped To PORTF.
2858   pub const PORTF: u32 = 0x5;
2859   /// Mapped To PORTG.
2860   pub const PORTG: u32 = 0x6;
2861   /// Mapped To PORTH.
2862   pub const PORTH: u32 = 0x7;
2863   /// Mapped To PORTJ.
2864   pub const PORTJ: u32 = 0x8;
2865   /// Mapped To PORTK.
2866   pub const PORTK: u32 = 0x9;
2867   /// Mapped To PORTL.
2868   pub const PORTL: u32 = 0xA;
2869   /// Mapped To PORTM.
2870   pub const PORTM: u32 = 0xB;
2871   /// Mapped To PORTN.
2872   pub const PORTN: u32 = 0xC;
2873   /// Mapped To PORTP.
2874   pub const PORTP: u32 = 0xD;
2875   /// Mapped To PORTQ.
2876   pub const PORTQ: u32 = 0xE;
2877   /// Mapped To PORTR.
2878   pub const PORTR: u32 = 0xF;
2879}
2880
2881/// Virtual Port 3 Mapping
2882#[allow(non_upper_case_globals)]
2883pub mod portcfg_vp3map {
2884   /// Mapped To PORTA.
2885   pub const PORTA: u32 = 0x0;
2886   /// Mapped To PORTB.
2887   pub const PORTB: u32 = 0x1;
2888   /// Mapped To PORTC.
2889   pub const PORTC: u32 = 0x2;
2890   /// Mapped To PORTD.
2891   pub const PORTD: u32 = 0x3;
2892   /// Mapped To PORTE.
2893   pub const PORTE: u32 = 0x4;
2894   /// Mapped To PORTF.
2895   pub const PORTF: u32 = 0x5;
2896   /// Mapped To PORTG.
2897   pub const PORTG: u32 = 0x6;
2898   /// Mapped To PORTH.
2899   pub const PORTH: u32 = 0x7;
2900   /// Mapped To PORTJ.
2901   pub const PORTJ: u32 = 0x8;
2902   /// Mapped To PORTK.
2903   pub const PORTK: u32 = 0x9;
2904   /// Mapped To PORTL.
2905   pub const PORTL: u32 = 0xA;
2906   /// Mapped To PORTM.
2907   pub const PORTM: u32 = 0xB;
2908   /// Mapped To PORTN.
2909   pub const PORTN: u32 = 0xC;
2910   /// Mapped To PORTP.
2911   pub const PORTP: u32 = 0xD;
2912   /// Mapped To PORTQ.
2913   pub const PORTQ: u32 = 0xE;
2914   /// Mapped To PORTR.
2915   pub const PORTR: u32 = 0xF;
2916}
2917
2918/// Port Interrupt 0 Level
2919#[allow(non_upper_case_globals)]
2920pub mod port_int0lvl {
2921   /// Interrupt Disabled.
2922   pub const OFF: u32 = 0x0;
2923   /// Low Level.
2924   pub const LO: u32 = 0x1;
2925   /// Medium Level.
2926   pub const MED: u32 = 0x2;
2927   /// High Level.
2928   pub const HI: u32 = 0x3;
2929}
2930
2931/// Port Interrupt 1 Level
2932#[allow(non_upper_case_globals)]
2933pub mod port_int1lvl {
2934   /// Interrupt Disabled.
2935   pub const OFF: u32 = 0x0;
2936   /// Low Level.
2937   pub const LO: u32 = 0x1;
2938   /// Medium Level.
2939   pub const MED: u32 = 0x2;
2940   /// High Level.
2941   pub const HI: u32 = 0x3;
2942}
2943
2944/// Input/Sense Configuration
2945#[allow(non_upper_case_globals)]
2946pub mod port_isc {
2947   /// Sense Both Edges.
2948   pub const BOTHEDGES: u32 = 0x0;
2949   /// Sense Rising Edge.
2950   pub const RISING: u32 = 0x1;
2951   /// Sense Falling Edge.
2952   pub const FALLING: u32 = 0x2;
2953   /// Sense Level (Transparent For Events).
2954   pub const LEVEL: u32 = 0x3;
2955   /// Disable Digital Input Buffer.
2956   pub const INPUT_DISABLE: u32 = 0x7;
2957}
2958
2959/// Output/Pull Configuration
2960#[allow(non_upper_case_globals)]
2961pub mod port_opc {
2962   /// Totempole.
2963   pub const TOTEM: u32 = 0x0;
2964   /// Totempole w/ Bus keeper on Input and Output.
2965   pub const BUSKEEPER: u32 = 0x1;
2966   /// Totempole w/ Pull-down on Input.
2967   pub const PULLDOWN: u32 = 0x2;
2968   /// Totempole w/ Pull-up on Input.
2969   pub const PULLUP: u32 = 0x3;
2970   /// Wired OR.
2971   pub const WIREDOR: u32 = 0x4;
2972   /// Wired AND.
2973   pub const WIREDAND: u32 = 0x5;
2974   /// Wired OR w/ Pull-down.
2975   pub const WIREDORPULL: u32 = 0x6;
2976   /// Wired AND w/ Pull-up.
2977   pub const WIREDANDPULL: u32 = 0x7;
2978}
2979
2980/// Compare Interrupt level
2981#[allow(non_upper_case_globals)]
2982pub mod rtc_compintlvl {
2983   /// Interrupt Disabled.
2984   pub const OFF: u32 = 0x0;
2985   /// Low Level.
2986   pub const LO: u32 = 0x1;
2987   /// Medium Level.
2988   pub const MED: u32 = 0x2;
2989   /// High Level.
2990   pub const HI: u32 = 0x3;
2991}
2992
2993/// Overflow Interrupt level
2994#[allow(non_upper_case_globals)]
2995pub mod rtc_ovfintlvl {
2996   /// Interrupt Disabled.
2997   pub const OFF: u32 = 0x0;
2998   /// Low Level.
2999   pub const LO: u32 = 0x1;
3000   /// Medium Level.
3001   pub const MED: u32 = 0x2;
3002   /// High Level.
3003   pub const HI: u32 = 0x3;
3004}
3005
3006/// Prescaler Factor
3007#[allow(non_upper_case_globals)]
3008pub mod rtc_prescaler {
3009   /// RTC Off.
3010   pub const OFF: u32 = 0x0;
3011   /// RTC Clock.
3012   pub const DIV1: u32 = 0x1;
3013   /// RTC Clock / 2.
3014   pub const DIV2: u32 = 0x2;
3015   /// RTC Clock / 8.
3016   pub const DIV8: u32 = 0x3;
3017   /// RTC Clock / 16.
3018   pub const DIV16: u32 = 0x4;
3019   /// RTC Clock / 64.
3020   pub const DIV64: u32 = 0x5;
3021   /// RTC Clock / 256.
3022   pub const DIV256: u32 = 0x6;
3023   /// RTC Clock / 1024.
3024   pub const DIV1024: u32 = 0x7;
3025}
3026
3027/// SDA hold time
3028#[allow(non_upper_case_globals)]
3029pub mod sda_hold_time {
3030   /// SDA hold time off.
3031   pub const OFF: u32 = 0x0;
3032   /// Typical 50ns hold time.
3033   pub const _50NS: u32 = 0x1;
3034   /// Typical 300ns hold time.
3035   pub const _300NS: u32 = 0x2;
3036   /// Typical 400ns hold time.
3037   pub const _400NS: u32 = 0x3;
3038}
3039
3040/// Sleep Mode
3041#[allow(non_upper_case_globals)]
3042pub mod sleep_smode {
3043   /// Idle mode.
3044   pub const IDLE: u32 = 0x0;
3045   /// Power-down Mode.
3046   pub const PDOWN: u32 = 0x2;
3047   /// Power-save Mode.
3048   pub const PSAVE: u32 = 0x3;
3049   /// Standby Mode.
3050   pub const STDBY: u32 = 0x6;
3051   /// Extended Standby Mode.
3052   pub const ESTDBY: u32 = 0x7;
3053}
3054
3055/// Interrupt level
3056#[allow(non_upper_case_globals)]
3057pub mod spi_intlvl {
3058   /// Interrupt Disabled.
3059   pub const OFF: u32 = 0x0;
3060   /// Low Level.
3061   pub const LO: u32 = 0x1;
3062   /// Medium Level.
3063   pub const MED: u32 = 0x2;
3064   /// High Level.
3065   pub const HI: u32 = 0x3;
3066}
3067
3068/// SPI Mode
3069#[allow(non_upper_case_globals)]
3070pub mod spi_mode {
3071   /// SPI Mode 0.
3072   pub const _0: u32 = 0x0;
3073   /// SPI Mode 1.
3074   pub const _1: u32 = 0x1;
3075   /// SPI Mode 2.
3076   pub const _2: u32 = 0x2;
3077   /// SPI Mode 3.
3078   pub const _3: u32 = 0x3;
3079}
3080
3081/// Prescaler setting
3082#[allow(non_upper_case_globals)]
3083pub mod spi_prescaler {
3084   /// System Clock / 4.
3085   pub const DIV4: u32 = 0x0;
3086   /// System Clock / 16.
3087   pub const DIV16: u32 = 0x1;
3088   /// System Clock / 64.
3089   pub const DIV64: u32 = 0x2;
3090   /// System Clock / 128.
3091   pub const DIV128: u32 = 0x3;
3092}
3093
3094/// Start-up Time
3095#[allow(non_upper_case_globals)]
3096pub mod sut {
3097   /// 0 ms.
3098   pub const _0MS: u32 = 0x3;
3099   /// 4 ms.
3100   pub const _4MS: u32 = 0x1;
3101   /// 64 ms.
3102   pub const _64MS: u32 = 0x0;
3103}
3104
3105/// Compare or Capture A Interrupt Level
3106#[allow(non_upper_case_globals)]
3107pub mod tc_ccaintlvl {
3108   /// Interrupt Disabled.
3109   pub const OFF: u32 = 0x0;
3110   /// Low Level.
3111   pub const LO: u32 = 0x1;
3112   /// Medium Level.
3113   pub const MED: u32 = 0x2;
3114   /// High Level.
3115   pub const HI: u32 = 0x3;
3116}
3117
3118/// Compare or Capture B Interrupt Level
3119#[allow(non_upper_case_globals)]
3120pub mod tc_ccbintlvl {
3121   /// Interrupt Disabled.
3122   pub const OFF: u32 = 0x0;
3123   /// Low Level.
3124   pub const LO: u32 = 0x1;
3125   /// Medium Level.
3126   pub const MED: u32 = 0x2;
3127   /// High Level.
3128   pub const HI: u32 = 0x3;
3129}
3130
3131/// Compare or Capture C Interrupt Level
3132#[allow(non_upper_case_globals)]
3133pub mod tc_cccintlvl {
3134   /// Interrupt Disabled.
3135   pub const OFF: u32 = 0x0;
3136   /// Low Level.
3137   pub const LO: u32 = 0x1;
3138   /// Medium Level.
3139   pub const MED: u32 = 0x2;
3140   /// High Level.
3141   pub const HI: u32 = 0x3;
3142}
3143
3144/// Compare or Capture D Interrupt Level
3145#[allow(non_upper_case_globals)]
3146pub mod tc_ccdintlvl {
3147   /// Interrupt Disabled.
3148   pub const OFF: u32 = 0x0;
3149   /// Low Level.
3150   pub const LO: u32 = 0x1;
3151   /// Medium Level.
3152   pub const MED: u32 = 0x2;
3153   /// High Level.
3154   pub const HI: u32 = 0x3;
3155}
3156
3157/// Clock Selection
3158#[allow(non_upper_case_globals)]
3159pub mod tc_clksel {
3160   /// Timer Off.
3161   pub const OFF: u32 = 0x0;
3162   /// System Clock.
3163   pub const DIV1: u32 = 0x1;
3164   /// System Clock / 2.
3165   pub const DIV2: u32 = 0x2;
3166   /// System Clock / 4.
3167   pub const DIV4: u32 = 0x3;
3168   /// System Clock / 8.
3169   pub const DIV8: u32 = 0x4;
3170   /// System Clock / 64.
3171   pub const DIV64: u32 = 0x5;
3172   /// System Clock / 256.
3173   pub const DIV256: u32 = 0x6;
3174   /// System Clock / 1024.
3175   pub const DIV1024: u32 = 0x7;
3176   /// Event Channel 0.
3177   pub const EVCH0: u32 = 0x8;
3178   /// Event Channel 1.
3179   pub const EVCH1: u32 = 0x9;
3180   /// Event Channel 2.
3181   pub const EVCH2: u32 = 0xA;
3182   /// Event Channel 3.
3183   pub const EVCH3: u32 = 0xB;
3184   /// Event Channel 4.
3185   pub const EVCH4: u32 = 0xC;
3186   /// Event Channel 5.
3187   pub const EVCH5: u32 = 0xD;
3188   /// Event Channel 6.
3189   pub const EVCH6: u32 = 0xE;
3190   /// Event Channel 7.
3191   pub const EVCH7: u32 = 0xF;
3192}
3193
3194/// Timer/Counter Command
3195#[allow(non_upper_case_globals)]
3196pub mod tc_cmd {
3197   /// No Command.
3198   pub const NONE: u32 = 0x0;
3199   /// Force Update.
3200   pub const UPDATE: u32 = 0x1;
3201   /// Force Restart.
3202   pub const RESTART: u32 = 0x2;
3203   /// Force Hard Reset.
3204   pub const RESET: u32 = 0x3;
3205}
3206
3207/// Error Interrupt Level
3208#[allow(non_upper_case_globals)]
3209pub mod tc_errintlvl {
3210   /// Interrupt Disabled.
3211   pub const OFF: u32 = 0x0;
3212   /// Low Level.
3213   pub const LO: u32 = 0x1;
3214   /// Medium Level.
3215   pub const MED: u32 = 0x2;
3216   /// High Level.
3217   pub const HI: u32 = 0x3;
3218}
3219
3220/// Event Action
3221#[allow(non_upper_case_globals)]
3222pub mod tc_evact {
3223   /// No Event Action.
3224   pub const OFF: u32 = 0x0;
3225   /// Input Capture.
3226   pub const CAPT: u32 = 0x1;
3227   /// Externally Controlled Up/Down Count.
3228   pub const UPDOWN: u32 = 0x2;
3229   /// Quadrature Decode.
3230   pub const QDEC: u32 = 0x3;
3231   /// Restart.
3232   pub const RESTART: u32 = 0x4;
3233   /// Frequency Capture.
3234   pub const FRQ: u32 = 0x5;
3235   /// Pulse-width Capture.
3236   pub const PW: u32 = 0x6;
3237}
3238
3239/// Event Selection
3240#[allow(non_upper_case_globals)]
3241pub mod tc_evsel {
3242   /// No Event Source.
3243   pub const OFF: u32 = 0x0;
3244   /// Event Channel 0.
3245   pub const CH0: u32 = 0x8;
3246   /// Event Channel 1.
3247   pub const CH1: u32 = 0x9;
3248   /// Event Channel 2.
3249   pub const CH2: u32 = 0xA;
3250   /// Event Channel 3.
3251   pub const CH3: u32 = 0xB;
3252   /// Event Channel 4.
3253   pub const CH4: u32 = 0xC;
3254   /// Event Channel 5.
3255   pub const CH5: u32 = 0xD;
3256   /// Event Channel 6.
3257   pub const CH6: u32 = 0xE;
3258   /// Event Channel 7.
3259   pub const CH7: u32 = 0xF;
3260}
3261
3262/// Overflow Interrupt Level
3263#[allow(non_upper_case_globals)]
3264pub mod tc_ovfintlvl {
3265   /// Interrupt Disabled.
3266   pub const OFF: u32 = 0x0;
3267   /// Low Level.
3268   pub const LO: u32 = 0x1;
3269   /// Medium Level.
3270   pub const MED: u32 = 0x2;
3271   /// High Level.
3272   pub const HI: u32 = 0x3;
3273}
3274
3275/// Waveform Generation Mode
3276#[allow(non_upper_case_globals)]
3277pub mod tc_wgmode {
3278   /// Normal Mode.
3279   pub const NORMAL: u32 = 0x0;
3280   /// Frequency Generation Mode.
3281   pub const FRQ: u32 = 0x1;
3282   /// Single Slope.
3283   pub const SS: u32 = 0x3;
3284   /// Dual Slope, Update on TOP.
3285   pub const DS_T: u32 = 0x5;
3286   /// Dual Slope, Update on TOP and BOTTOM.
3287   pub const DS_TB: u32 = 0x6;
3288   /// Dual Slope, Update on BOTTOM.
3289   pub const DS_B: u32 = 0x7;
3290}
3291
3292/// 32.768kHz Timer Oscillator Pin Selection
3293#[allow(non_upper_case_globals)]
3294pub mod toscsel {
3295   /// TOSC1/2 on separate pins.
3296   pub const ALTERNATE: u32 = 0x0;
3297   /// TOSC1/2 shared with XTAL.
3298   pub const XTAL: u32 = 0x1;
3299}
3300
3301/// Master Bus State
3302#[allow(non_upper_case_globals)]
3303pub mod twi_master_busstate {
3304   /// Unknown Bus State.
3305   pub const UNKNOWN: u32 = 0x0;
3306   /// Bus is Idle.
3307   pub const IDLE: u32 = 0x1;
3308   /// This Module Controls The Bus.
3309   pub const OWNER: u32 = 0x2;
3310   /// The Bus is Busy.
3311   pub const BUSY: u32 = 0x3;
3312}
3313
3314/// Master Command
3315#[allow(non_upper_case_globals)]
3316pub mod twi_master_cmd {
3317   /// No Action.
3318   pub const NOACT: u32 = 0x0;
3319   /// Issue Repeated Start Condition.
3320   pub const REPSTART: u32 = 0x1;
3321   /// Receive or Transmit Data.
3322   pub const RECVTRANS: u32 = 0x2;
3323   /// Issue Stop Condition.
3324   pub const STOP: u32 = 0x3;
3325}
3326
3327/// Master Interrupt Level
3328#[allow(non_upper_case_globals)]
3329pub mod twi_master_intlvl {
3330   /// Interrupt Disabled.
3331   pub const OFF: u32 = 0x0;
3332   /// Low Level.
3333   pub const LO: u32 = 0x1;
3334   /// Medium Level.
3335   pub const MED: u32 = 0x2;
3336   /// High Level.
3337   pub const HI: u32 = 0x3;
3338}
3339
3340/// Inactive Timeout
3341#[allow(non_upper_case_globals)]
3342pub mod twi_master_timeout {
3343   /// Bus Timeout Disabled.
3344   pub const DISABLED: u32 = 0x0;
3345   /// 50 Microseconds.
3346   pub const _50US: u32 = 0x1;
3347   /// 100 Microseconds.
3348   pub const _100US: u32 = 0x2;
3349   /// 200 Microseconds.
3350   pub const _200US: u32 = 0x3;
3351}
3352
3353/// Slave Command
3354#[allow(non_upper_case_globals)]
3355pub mod twi_slave_cmd {
3356   /// No Action.
3357   pub const NOACT: u32 = 0x0;
3358   /// Used To Complete a Transaction.
3359   pub const COMPTRANS: u32 = 0x2;
3360   /// Used in Response to Address/Data Interrupt.
3361   pub const RESPONSE: u32 = 0x3;
3362}
3363
3364/// Slave Interrupt Level
3365#[allow(non_upper_case_globals)]
3366pub mod twi_slave_intlvl {
3367   /// Interrupt Disabled.
3368   pub const OFF: u32 = 0x0;
3369   /// Low Level.
3370   pub const LO: u32 = 0x1;
3371   /// Medium Level.
3372   pub const MED: u32 = 0x2;
3373   /// High Level.
3374   pub const HI: u32 = 0x3;
3375}
3376
3377/// Character Size
3378#[allow(non_upper_case_globals)]
3379pub mod usart_chsize {
3380   /// Character size: 5 bit.
3381   pub const _5BIT: u32 = 0x0;
3382   /// Character size: 6 bit.
3383   pub const _6BIT: u32 = 0x1;
3384   /// Character size: 7 bit.
3385   pub const _7BIT: u32 = 0x2;
3386   /// Character size: 8 bit.
3387   pub const _8BIT: u32 = 0x3;
3388   /// Character size: 9 bit.
3389   pub const _9BIT: u32 = 0x7;
3390}
3391
3392/// Communication Mode
3393#[allow(non_upper_case_globals)]
3394pub mod usart_cmode {
3395   /// Asynchronous Mode.
3396   pub const ASYNCHRONOUS: u32 = 0x0;
3397   /// Synchronous Mode.
3398   pub const SYNCHRONOUS: u32 = 0x1;
3399   /// IrDA Mode.
3400   pub const IRDA: u32 = 0x2;
3401   /// Master SPI Mode.
3402   pub const MSPI: u32 = 0x3;
3403}
3404
3405/// Data Register Empty Interrupt level
3406#[allow(non_upper_case_globals)]
3407pub mod usart_dreintlvl {
3408   /// Interrupt Disabled.
3409   pub const OFF: u32 = 0x0;
3410   /// Low Level.
3411   pub const LO: u32 = 0x1;
3412   /// Medium Level.
3413   pub const MED: u32 = 0x2;
3414   /// High Level.
3415   pub const HI: u32 = 0x3;
3416}
3417
3418/// Parity Mode
3419#[allow(non_upper_case_globals)]
3420pub mod usart_pmode {
3421   /// No Parity.
3422   pub const DISABLED: u32 = 0x0;
3423   /// Even Parity.
3424   pub const EVEN: u32 = 0x2;
3425   /// Odd Parity.
3426   pub const ODD: u32 = 0x3;
3427}
3428
3429/// Receive Complete Interrupt level
3430#[allow(non_upper_case_globals)]
3431pub mod usart_rxcintlvl {
3432   /// Interrupt Disabled.
3433   pub const OFF: u32 = 0x0;
3434   /// Low Level.
3435   pub const LO: u32 = 0x1;
3436   /// Medium Level.
3437   pub const MED: u32 = 0x2;
3438   /// High Level.
3439   pub const HI: u32 = 0x3;
3440}
3441
3442/// Transmit Complete Interrupt level
3443#[allow(non_upper_case_globals)]
3444pub mod usart_txcintlvl {
3445   /// Interrupt Disabled.
3446   pub const OFF: u32 = 0x0;
3447   /// Low Level.
3448   pub const LO: u32 = 0x1;
3449   /// Medium Level.
3450   pub const MED: u32 = 0x2;
3451   /// High Level.
3452   pub const HI: u32 = 0x3;
3453}
3454
3455/// Watchdog (Window) Timeout Period
3456#[allow(non_upper_case_globals)]
3457pub mod wd {
3458   /// 8 cycles (8ms @ 3.3V).
3459   pub const _8CLK: u32 = 0x0;
3460   /// 16 cycles (16ms @ 3.3V).
3461   pub const _16CLK: u32 = 0x1;
3462   /// 32 cycles (32ms @ 3.3V).
3463   pub const _32CLK: u32 = 0x2;
3464   /// 64 cycles (64ms @ 3.3V).
3465   pub const _64CLK: u32 = 0x3;
3466   /// 128 cycles (0.125s @ 3.3V).
3467   pub const _128CLK: u32 = 0x4;
3468   /// 256 cycles (0.25s @ 3.3V).
3469   pub const _256CLK: u32 = 0x5;
3470   /// 512 cycles (0.5s @ 3.3V).
3471   pub const _512CLK: u32 = 0x6;
3472   /// 1K cycles (1s @ 3.3V).
3473   pub const _1KCLK: u32 = 0x7;
3474   /// 2K cycles (2s @ 3.3V).
3475   pub const _2KCLK: u32 = 0x8;
3476   /// 4K cycles (4s @ 3.3V).
3477   pub const _4KCLK: u32 = 0x9;
3478   /// 8K cycles (8s @ 3.3V).
3479   pub const _8KCLK: u32 = 0xA;
3480}
3481
3482/// Period setting
3483#[allow(non_upper_case_globals)]
3484pub mod wdt_per {
3485   /// 8 cycles (8ms @ 3.3V).
3486   pub const _8CLK: u32 = 0x0;
3487   /// 16 cycles (16ms @ 3.3V).
3488   pub const _16CLK: u32 = 0x1;
3489   /// 32 cycles (32ms @ 3.3V).
3490   pub const _32CLK: u32 = 0x2;
3491   /// 64 cycles (64ms @ 3.3V).
3492   pub const _64CLK: u32 = 0x3;
3493   /// 128 cycles (0.128s @ 3.3V).
3494   pub const _128CLK: u32 = 0x4;
3495   /// 256 cycles (0.256s @ 3.3V).
3496   pub const _256CLK: u32 = 0x5;
3497   /// 512 cycles (0.512s @ 3.3V).
3498   pub const _512CLK: u32 = 0x6;
3499   /// 1K cycles (1s @ 3.3V).
3500   pub const _1KCLK: u32 = 0x7;
3501   /// 2K cycles (2s @ 3.3V).
3502   pub const _2KCLK: u32 = 0x8;
3503   /// 4K cycles (4s @ 3.3V).
3504   pub const _4KCLK: u32 = 0x9;
3505   /// 8K cycles (8s @ 3.3V).
3506   pub const _8KCLK: u32 = 0xA;
3507}
3508
3509/// Closed window period
3510#[allow(non_upper_case_globals)]
3511pub mod wdt_wper {
3512   /// 8 cycles (8ms @ 3.3V).
3513   pub const _8CLK: u32 = 0x0;
3514   /// 16 cycles (16ms @ 3.3V).
3515   pub const _16CLK: u32 = 0x1;
3516   /// 32 cycles (32ms @ 3.3V).
3517   pub const _32CLK: u32 = 0x2;
3518   /// 64 cycles (64ms @ 3.3V).
3519   pub const _64CLK: u32 = 0x3;
3520   /// 128 cycles (0.128s @ 3.3V).
3521   pub const _128CLK: u32 = 0x4;
3522   /// 256 cycles (0.256s @ 3.3V).
3523   pub const _256CLK: u32 = 0x5;
3524   /// 512 cycles (0.512s @ 3.3V).
3525   pub const _512CLK: u32 = 0x6;
3526   /// 1K cycles (1s @ 3.3V).
3527   pub const _1KCLK: u32 = 0x7;
3528   /// 2K cycles (2s @ 3.3V).
3529   pub const _2KCLK: u32 = 0x8;
3530   /// 4K cycles (4s @ 3.3V).
3531   pub const _4KCLK: u32 = 0x9;
3532   /// 8K cycles (8s @ 3.3V).
3533   pub const _8KCLK: u32 = 0xA;
3534}
3535