avrd/gen/
atxmega64a3u.rs

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