avrd/gen/
atxmega128a4u.rs

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