avrd/gen/
attiny816.rs

1//! The AVR ATtiny816 microcontroller
2//!
3//! # Variants
4//! |        | Pinout | Mcu age | Operating temperature | Operating voltage | Max speed |
5//! |--------|--------|---------|-----------------------|-------------------|-----------|
6//! | ATtiny816-MFR | QFN20 | VQFN20 | -40°C - 125°C | 1.8V - 5.5V | 20 MHz |
7//! | ATtiny816-MNR | QFN20 | VQFN20 | -40°C - 105°C | 1.8V - 5.5V | 20 MHz |
8//! | ATtiny816-MNRES | QFN20 | VQFN20 | -40°C - 105°C | 1.8V - 5.5V | 20 MHz |
9//! | ATtiny816-SFR | SOIC20 | SOIC20 | -40°C - 125°C | 1.8V - 5.5V | 20 MHz |
10//! | ATtiny816-SNR | SOIC20 | SOIC20 | -40°C - 105°C | 1.8V - 5.5V | 20 MHz |
11//!
12
13#![allow(non_upper_case_globals)]
14
15/// Control A.
16pub const CTRLA: *mut u8 = 0x0 as *mut u8;
17
18/// Receive Data Low Byte.
19pub const RXDATAL: *mut u8 = 0x0 as *mut u8;
20
21/// General Purpose IO Register 0.
22pub const GPIOR0: *mut u8 = 0x0 as *mut u8;
23
24/// Watchdog Configuration.
25pub const WDTCFG: *mut u8 = 0x0 as *mut u8;
26
27/// Data Direction.
28pub const DIR: *mut u8 = 0x0 as *mut u8;
29
30/// Reset Flags.
31///
32/// Bitfields:
33///
34/// | Name | Mask (binary) |
35/// | ---- | ------------- |
36/// | EXTRF | 100 |
37/// | UPDIRF | 100000 |
38/// | PORF | 1 |
39/// | WDRF | 1000 |
40/// | BORF | 10 |
41/// | SWRF | 10000 |
42pub const RSTFR: *mut u8 = 0x0 as *mut u8;
43
44/// User Row Byte 0.
45pub const USERROW0: *mut u8 = 0x0 as *mut u8;
46
47/// Lock bits.
48pub const LOCKBIT: *mut u8 = 0x0 as *mut u8;
49
50/// Device ID Byte 0.
51pub const DEVICEID0: *mut u8 = 0x0 as *mut u8;
52
53/// MCLK Control A.
54///
55/// Bitfields:
56///
57/// | Name | Mask (binary) |
58/// | ---- | ------------- |
59/// | CLKOUT | 10000000 |
60pub const MCLKCTRLA: *mut u8 = 0x0 as *mut u8;
61
62/// Asynchronous Channel Strobe.
63pub const ASYNCSTROBE: *mut u8 = 0x0 as *mut u8;
64
65/// Control B.
66///
67/// Bitfields:
68///
69/// | Name | Mask (binary) |
70/// | ---- | ------------- |
71/// | DAC0REFEN | 1 |
72/// | ADC0REFEN | 10 |
73pub const CTRLB: *mut u8 = 0x1 as *mut u8;
74
75/// MCLK Control B.
76///
77/// Bitfields:
78///
79/// | Name | Mask (binary) |
80/// | ---- | ------------- |
81/// | PEN | 1 |
82/// | PDIV | 11110 |
83pub const MCLKCTRLB: *mut u8 = 0x1 as *mut u8;
84
85/// Sequential Control 0.
86///
87/// Bitfields:
88///
89/// | Name | Mask (binary) |
90/// | ---- | ------------- |
91/// | SEQSEL | 111 |
92pub const SEQCTRL0: *mut u8 = 0x1 as *mut u8;
93
94/// Output Value.
95pub const OUT: *mut u8 = 0x1 as *mut u8;
96
97/// Revision ID.
98pub const REVID: *mut u8 = 0x1 as *mut u8;
99
100/// Device ID Byte 1.
101pub const DEVICEID1: *mut u8 = 0x1 as *mut u8;
102
103/// Status.
104///
105/// Bitfields:
106///
107/// | Name | Mask (binary) |
108/// | ---- | ------------- |
109/// | SYNCBUSY | 1 |
110pub const STATUS: *mut u8 = 0x1 as *mut u8;
111
112/// General Purpose IO Register 1.
113pub const GPIOR1: *mut u8 = 0x1 as *mut u8;
114
115/// User Row Byte 1.
116pub const USERROW1: *mut u8 = 0x1 as *mut u8;
117
118/// Synchronous Channel Strobe.
119pub const SYNCSTROBE: *mut u8 = 0x1 as *mut u8;
120
121/// BOD Configuration.
122///
123/// Bitfields:
124///
125/// | Name | Mask (binary) |
126/// | ---- | ------------- |
127/// | ACTIVE | 1100 |
128/// | SLEEP | 11 |
129/// | LVL | 11100000 |
130/// | SAMPFREQ | 10000 |
131pub const BODCFG: *mut u8 = 0x1 as *mut u8;
132
133/// Receive Data High Byte.
134///
135/// Bitfields:
136///
137/// | Name | Mask (binary) |
138/// | ---- | ------------- |
139/// | RXCIF | 10000000 |
140/// | BUFOVF | 1000000 |
141/// | PERR | 10 |
142/// | FERR | 100 |
143pub const RXDATAH: *mut u8 = 0x1 as *mut u8;
144
145/// Software Reset.
146///
147/// Bitfields:
148///
149/// | Name | Mask (binary) |
150/// | ---- | ------------- |
151/// | SWRE | 1 |
152pub const SWRR: *mut u8 = 0x1 as *mut u8;
153
154/// Data Direction Set.
155pub const DIRSET: *mut u8 = 0x1 as *mut u8;
156
157/// Device ID Byte 2.
158pub const DEVICEID2: *mut u8 = 0x2 as *mut u8;
159
160/// Interrupt Level 0 Priority.
161pub const LVL0PRI: *mut u8 = 0x2 as *mut u8;
162
163/// MCLK Lock.
164///
165/// Bitfields:
166///
167/// | Name | Mask (binary) |
168/// | ---- | ------------- |
169/// | LOCKEN | 1 |
170pub const MCLKLOCK: *mut u8 = 0x2 as *mut u8;
171
172/// Transmit Data Low Byte.
173pub const TXDATAL: *mut u8 = 0x2 as *mut u8;
174
175/// External Break.
176///
177/// Bitfields:
178///
179/// | Name | Mask (binary) |
180/// | ---- | ------------- |
181/// | ENEXTBRK | 1 |
182pub const EXTBRK: *mut u8 = 0x2 as *mut u8;
183
184/// Asynchronous Channel 0 Generator Selection.
185pub const ASYNCCH0: *mut u8 = 0x2 as *mut u8;
186
187/// General Purpose IO Register 2.
188pub const GPIOR2: *mut u8 = 0x2 as *mut u8;
189
190/// Oscillator Configuration.
191///
192/// Bitfields:
193///
194/// | Name | Mask (binary) |
195/// | ---- | ------------- |
196/// | FREQSEL | 11 |
197/// | OSCLOCK | 10000000 |
198pub const OSCCFG: *mut u8 = 0x2 as *mut u8;
199
200/// Input Value.
201pub const IN: *mut u8 = 0x2 as *mut u8;
202
203/// Data Direction Clear.
204pub const DIRCLR: *mut u8 = 0x2 as *mut u8;
205
206/// User Row Byte 2.
207pub const USERROW2: *mut u8 = 0x2 as *mut u8;
208
209/// Mux Control A.
210///
211/// Bitfields:
212///
213/// | Name | Mask (binary) |
214/// | ---- | ------------- |
215/// | INVERT | 10000000 |
216/// | MUXNEG | 11 |
217pub const MUXCTRLA: *mut u8 = 0x2 as *mut u8;
218
219/// Transmit Data High Byte.
220pub const TXDATAH: *mut u8 = 0x3 as *mut u8;
221
222/// Master Control A.
223///
224/// Bitfields:
225///
226/// | Name | Mask (binary) |
227/// | ---- | ------------- |
228/// | QCEN | 10000 |
229/// | RIEN | 10000000 |
230/// | WIEN | 1000000 |
231/// | TIMEOUT | 1100 |
232pub const MCTRLA: *mut u8 = 0x3 as *mut u8;
233
234/// MCLK Status.
235///
236/// Bitfields:
237///
238/// | Name | Mask (binary) |
239/// | ---- | ------------- |
240/// | OSC32KS | 100000 |
241/// | OSC20MS | 10000 |
242/// | SOSC | 1 |
243/// | EXTS | 10000000 |
244/// | XOSC32KS | 1000000 |
245pub const MCLKSTATUS: *mut u8 = 0x3 as *mut u8;
246
247/// Control D.
248///
249/// Bitfields:
250///
251/// | Name | Mask (binary) |
252/// | ---- | ------------- |
253/// | CMPAVAL | 1111 |
254/// | CMPBVAL | 11110000 |
255pub const CTRLD: *mut u8 = 0x3 as *mut u8;
256
257/// Interrupt Level 1 Priority Vector.
258pub const LVL1VEC: *mut u8 = 0x3 as *mut u8;
259
260/// Data Direction Toggle.
261pub const DIRTGL: *mut u8 = 0x3 as *mut u8;
262
263/// General Purpose IO Register 3.
264pub const GPIOR3: *mut u8 = 0x3 as *mut u8;
265
266/// User Row Byte 3.
267pub const USERROW3: *mut u8 = 0x3 as *mut u8;
268
269/// Serial Number Byte 0.
270pub const SERNUM0: *mut u8 = 0x3 as *mut u8;
271
272/// Asynchronous Channel 1 Generator Selection.
273pub const ASYNCCH1: *mut u8 = 0x3 as *mut u8;
274
275/// Interrupt Flags.
276pub const INTFLAGS: *mut u8 = 0x3 as *mut u8;
277
278/// Control E Clear.
279pub const CTRLECLR: *mut u8 = 0x4 as *mut u8;
280
281/// TCD0 Configuration.
282pub const TCD0CFG: *mut u8 = 0x4 as *mut u8;
283
284/// Asynchronous Channel 2 Generator Selection.
285pub const ASYNCCH2: *mut u8 = 0x4 as *mut u8;
286
287/// Control E.
288///
289/// Bitfields:
290///
291/// | Name | Mask (binary) |
292/// | ---- | ------------- |
293/// | RESTART | 100 |
294/// | SCAPTUREA | 1000 |
295/// | SYNC | 10 |
296/// | DISEOC | 10000000 |
297/// | SYNCEOC | 1 |
298/// | SCAPTUREB | 10000 |
299pub const CTRLE: *mut u8 = 0x4 as *mut u8;
300
301/// Master Control B.
302///
303/// Bitfields:
304///
305/// | Name | Mask (binary) |
306/// | ---- | ------------- |
307/// | FLUSH | 1000 |
308/// | MCMD | 11 |
309pub const MCTRLB: *mut u8 = 0x4 as *mut u8;
310
311/// User Row Byte 4.
312pub const USERROW4: *mut u8 = 0x4 as *mut u8;
313
314/// Data.
315pub const DATA: *mut u8 = 0x4 as *mut u8;
316
317/// Configuration Change Protection.
318pub const CCP: *mut u8 = 0x4 as *mut u8;
319
320/// Serial Number Byte 1.
321pub const SERNUM1: *mut u8 = 0x4 as *mut u8;
322
323/// System Configuration 0.
324///
325/// Bitfields:
326///
327/// | Name | Mask (binary) |
328/// | ---- | ------------- |
329/// | EESAVE | 1 |
330/// | CRCSRC | 11000000 |
331/// | RSTPINCFG | 1100 |
332pub const SYSCFG0: *mut u8 = 0x5 as *mut u8;
333
334/// Serial Number Byte 2.
335pub const SERNUM2: *mut u8 = 0x5 as *mut u8;
336
337/// Asynchronous Channel 3 Generator Selection.
338pub const ASYNCCH3: *mut u8 = 0x5 as *mut u8;
339
340/// Master Status.
341///
342/// Bitfields:
343///
344/// | Name | Mask (binary) |
345/// | ---- | ------------- |
346/// | RIF | 10000000 |
347/// | ARBLOST | 1000 |
348/// | WIF | 1000000 |
349/// | BUSSTATE | 11 |
350pub const MSTATUS: *mut u8 = 0x5 as *mut u8;
351
352/// Output Value Set.
353pub const OUTSET: *mut u8 = 0x5 as *mut u8;
354
355/// Sample Control.
356///
357/// Bitfields:
358///
359/// | Name | Mask (binary) |
360/// | ---- | ------------- |
361/// | SAMPLEN | 11111 |
362pub const SAMPCTRL: *mut u8 = 0x5 as *mut u8;
363
364/// LUT Control 0 A.
365pub const LUT0CTRLA: *mut u8 = 0x5 as *mut u8;
366
367/// User Row Byte 5.
368pub const USERROW5: *mut u8 = 0x5 as *mut u8;
369
370/// Control E Set.
371pub const CTRLESET: *mut u8 = 0x5 as *mut u8;
372
373/// Master Baurd Rate Control.
374pub const MBAUD: *mut u8 = 0x6 as *mut u8;
375
376/// Output Value Clear.
377pub const OUTCLR: *mut u8 = 0x6 as *mut u8;
378
379/// Serial Number Byte 3.
380pub const SERNUM3: *mut u8 = 0x6 as *mut u8;
381
382/// LUT Control 0 B.
383pub const LUT0CTRLB: *mut u8 = 0x6 as *mut u8;
384
385/// Control F Clear.
386pub const CTRLFCLR: *mut u8 = 0x6 as *mut u8;
387
388/// System Configuration 1.
389///
390/// Bitfields:
391///
392/// | Name | Mask (binary) |
393/// | ---- | ------------- |
394/// | SUT | 111 |
395pub const SYSCFG1: *mut u8 = 0x6 as *mut u8;
396
397/// User Row Byte 6.
398pub const USERROW6: *mut u8 = 0x6 as *mut u8;
399
400/// Positive mux input.
401pub const MUXPOS: *mut u8 = 0x6 as *mut u8;
402
403/// User Row Byte 7.
404pub const USERROW7: *mut u8 = 0x7 as *mut u8;
405
406/// Control F Set.
407pub const CTRLFSET: *mut u8 = 0x7 as *mut u8;
408
409/// Control C.
410pub const CTRLC: *mut u8 = 0x7 as *mut u8;
411
412/// Serial Number Byte 4.
413pub const SERNUM4: *mut u8 = 0x7 as *mut u8;
414
415/// Output Value Toggle.
416pub const OUTTGL: *mut u8 = 0x7 as *mut u8;
417
418/// Application Code Section End.
419pub const APPEND: *mut u8 = 0x7 as *mut u8;
420
421/// Master Address.
422pub const MADDR: *mut u8 = 0x7 as *mut u8;
423
424/// LUT Control 0 C.
425pub const LUT0CTRLC: *mut u8 = 0x7 as *mut u8;
426
427/// Clock Select.
428pub const CLKSEL: *mut u8 = 0x7 as *mut u8;
429
430/// Address.
431pub const ADDR: *mut u16 = 0x8 as *mut u16;
432
433/// Serial Number Byte 5.
434pub const SERNUM5: *mut u8 = 0x8 as *mut u8;
435
436/// Voltage level monitor Control.
437///
438/// Bitfields:
439///
440/// | Name | Mask (binary) |
441/// | ---- | ------------- |
442/// | VLMLVL | 11 |
443pub const VLMCTRLA: *mut u8 = 0x8 as *mut u8;
444
445/// Address low byte.
446pub const ADDRL: *mut u8 = 0x8 as *mut u8;
447
448/// Baud Rate low byte.
449pub const BAUDL: *mut u8 = 0x8 as *mut u8;
450
451/// Boot Section End.
452pub const BOOTEND: *mut u8 = 0x8 as *mut u8;
453
454/// User Row Byte 8.
455pub const USERROW8: *mut u8 = 0x8 as *mut u8;
456
457/// Master Data.
458pub const MDATA: *mut u8 = 0x8 as *mut u8;
459
460/// Baud Rate.
461pub const BAUD: *mut u16 = 0x8 as *mut u16;
462
463/// Truth 0.
464pub const TRUTH0: *mut u8 = 0x8 as *mut u8;
465
466/// EVCTRLA.
467pub const EVCTRLA: *mut u8 = 0x8 as *mut u8;
468
469/// Command.
470///
471/// Bitfields:
472///
473/// | Name | Mask (binary) |
474/// | ---- | ------------- |
475/// | STCONV | 1 |
476pub const COMMAND: *mut u8 = 0x8 as *mut u8;
477
478/// Temporary Value.
479pub const TEMP: *mut u8 = 0x9 as *mut u8;
480
481/// User Row Byte 9.
482pub const USERROW9: *mut u8 = 0x9 as *mut u8;
483
484/// LUT Control 1 A.
485pub const LUT1CTRLA: *mut u8 = 0x9 as *mut u8;
486
487/// Serial Number Byte 6.
488pub const SERNUM6: *mut u8 = 0x9 as *mut u8;
489
490/// Slave Control A.
491///
492/// Bitfields:
493///
494/// | Name | Mask (binary) |
495/// | ---- | ------------- |
496/// | PIEN | 100000 |
497/// | PMEN | 100 |
498/// | APIEN | 1000000 |
499/// | DIEN | 10000000 |
500pub const SCTRLA: *mut u8 = 0x9 as *mut u8;
501
502/// Baud Rate high byte.
503pub const BAUDH: *mut u8 = 0x9 as *mut u8;
504
505/// Address high byte.
506pub const ADDRH: *mut u8 = 0x9 as *mut u8;
507
508/// EVCTRLB.
509pub const EVCTRLB: *mut u8 = 0x9 as *mut u8;
510
511/// LUT Control 1 B.
512pub const LUT1CTRLB: *mut u8 = 0xA as *mut u8;
513
514/// Serial Number Byte 7.
515pub const SERNUM7: *mut u8 = 0xA as *mut u8;
516
517/// Slave Control B.
518///
519/// Bitfields:
520///
521/// | Name | Mask (binary) |
522/// | ---- | ------------- |
523/// | SCMD | 11 |
524pub const SCTRLB: *mut u8 = 0xA as *mut u8;
525
526/// Count.
527pub const CNT: *mut u16 = 0xA as *mut u16;
528
529/// Count low byte.
530pub const CNTL: *mut u8 = 0xA as *mut u8;
531
532/// Synchronous Channel 0 Generator Selection.
533pub const SYNCCH0: *mut u8 = 0xA as *mut u8;
534
535/// User Row Byte 10.
536pub const USERROW10: *mut u8 = 0xA as *mut u8;
537
538/// Synchronous Channel 1 Generator Selection.
539pub const SYNCCH1: *mut u8 = 0xB as *mut u8;
540
541/// Slave Status.
542///
543/// Bitfields:
544///
545/// | Name | Mask (binary) |
546/// | ---- | ------------- |
547/// | COLL | 1000 |
548/// | APIF | 1000000 |
549/// | DIF | 10000000 |
550/// | AP | 1 |
551pub const SSTATUS: *mut u8 = 0xB as *mut u8;
552
553/// Count high byte.
554pub const CNTH: *mut u8 = 0xB as *mut u8;
555
556/// LUT Control 1 C.
557pub const LUT1CTRLC: *mut u8 = 0xB as *mut u8;
558
559/// User Row Byte 11.
560pub const USERROW11: *mut u8 = 0xB as *mut u8;
561
562/// Serial Number Byte 8.
563pub const SERNUM8: *mut u8 = 0xB as *mut u8;
564
565/// Debug Control.
566///
567/// Bitfields:
568///
569/// | Name | Mask (binary) |
570/// | ---- | ------------- |
571/// | ABMBP | 10000000 |
572pub const DBGCTRL: *mut u8 = 0xB as *mut u8;
573
574/// Serial Number Byte 9.
575pub const SERNUM9: *mut u8 = 0xC as *mut u8;
576
577/// Event Control.
578///
579/// Bitfields:
580///
581/// | Name | Mask (binary) |
582/// | ---- | ------------- |
583/// | IREI | 1 |
584pub const EVCTRL: *mut u8 = 0xC as *mut u8;
585
586/// Interrupt Control.
587///
588/// Bitfields:
589///
590/// | Name | Mask (binary) |
591/// | ---- | ------------- |
592/// | TRIGB | 1000 |
593/// | OVF | 1 |
594/// | TRIGA | 100 |
595pub const INTCTRL: *mut u8 = 0xC as *mut u8;
596
597/// Compare.
598pub const CMP: *mut u16 = 0xC as *mut u16;
599
600/// Compare low byte.
601pub const CMPL: *mut u8 = 0xC as *mut u8;
602
603/// Slave Address.
604pub const SADDR: *mut u8 = 0xC as *mut u8;
605
606/// Truth 1.
607pub const TRUTH1: *mut u8 = 0xC as *mut u8;
608
609/// Compare or Capture low byte.
610pub const CCMPL: *mut u8 = 0xC as *mut u8;
611
612/// Compare or Capture.
613pub const CCMP: *mut u16 = 0xC as *mut u16;
614
615/// User Row Byte 12.
616pub const USERROW12: *mut u8 = 0xC as *mut u8;
617
618/// Slave Data.
619pub const SDATA: *mut u8 = 0xD as *mut u8;
620
621/// Stack Pointer Low.
622pub const SPL: *mut u8 = 0xD as *mut u8;
623
624/// Compare high byte.
625pub const CMPH: *mut u8 = 0xD as *mut u8;
626
627/// Compare or Capture high byte.
628pub const CCMPH: *mut u8 = 0xD as *mut u8;
629
630/// User Row Byte 13.
631pub const USERROW13: *mut u8 = 0xD as *mut u8;
632
633/// IRCOM Transmitter Pulse Length Control.
634pub const TXPLCTRL: *mut u8 = 0xD as *mut u8;
635
636/// User Row Byte 14.
637pub const USERROW14: *mut u8 = 0xE as *mut u8;
638
639/// Slave Address Mask.
640///
641/// Bitfields:
642///
643/// | Name | Mask (binary) |
644/// | ---- | ------------- |
645/// | ADDREN | 1 |
646/// | ADDRMASK | 11111110 |
647pub const SADDRMASK: *mut u8 = 0xE as *mut u8;
648
649/// IRCOM Receiver Pulse Length Control.
650///
651/// Bitfields:
652///
653/// | Name | Mask (binary) |
654/// | ---- | ------------- |
655/// | RXPL | 1111111 |
656pub const RXPLCTRL: *mut u8 = 0xE as *mut u8;
657
658/// Stack Pointer High.
659pub const SPH: *mut u8 = 0xE as *mut u8;
660
661/// Status Register.
662///
663/// Bitfields:
664///
665/// | Name | Mask (binary) |
666/// | ---- | ------------- |
667/// | T | 1000000 |
668/// | I | 10000000 |
669/// | N | 100 |
670/// | H | 100000 |
671/// | S | 10000 |
672/// | V | 1000 |
673/// | Z | 10 |
674/// | C | 1 |
675pub const SREG: *mut u8 = 0xF as *mut u8;
676
677/// User Row Byte 15.
678pub const USERROW15: *mut u8 = 0xF as *mut u8;
679
680/// Input Control A.
681pub const INPUTCTRLA: *mut u8 = 0x10 as *mut u8;
682
683/// OSC20M Control A.
684pub const OSC20MCTRLA: *mut u8 = 0x10 as *mut u8;
685
686/// ADC Accumulator Result low byte.
687pub const RESL: *mut u8 = 0x10 as *mut u8;
688
689/// PIT Control A.
690///
691/// Bitfields:
692///
693/// | Name | Mask (binary) |
694/// | ---- | ------------- |
695/// | PITEN | 1 |
696pub const PITCTRLA: *mut u8 = 0x10 as *mut u8;
697
698/// ADC Accumulator Result.
699pub const RES: *mut u16 = 0x10 as *mut u16;
700
701/// Pin 0 Control.
702pub const PIN0CTRL: *mut u8 = 0x10 as *mut u8;
703
704/// User Row Byte 16.
705pub const USERROW16: *mut u8 = 0x10 as *mut u8;
706
707/// Pin 1 Control.
708pub const PIN1CTRL: *mut u8 = 0x11 as *mut u8;
709
710/// ADC Accumulator Result high byte.
711pub const RESH: *mut u8 = 0x11 as *mut u8;
712
713/// PIT Status.
714///
715/// Bitfields:
716///
717/// | Name | Mask (binary) |
718/// | ---- | ------------- |
719/// | CTRLBUSY | 1 |
720pub const PITSTATUS: *mut u8 = 0x11 as *mut u8;
721
722/// OSC20M Calibration A.
723///
724/// Bitfields:
725///
726/// | Name | Mask (binary) |
727/// | ---- | ------------- |
728/// | CALSEL20M | 11000000 |
729/// | CAL20M | 111111 |
730pub const OSC20MCALIBA: *mut u8 = 0x11 as *mut u8;
731
732/// Input Control B.
733pub const INPUTCTRLB: *mut u8 = 0x11 as *mut u8;
734
735/// User Row Byte 17.
736pub const USERROW17: *mut u8 = 0x11 as *mut u8;
737
738/// Asynchronous User Ch 0 Input Selection - TCB0.
739pub const ASYNCUSER0: *mut u8 = 0x12 as *mut u8;
740
741/// PIT Interrupt Control.
742pub const PITINTCTRL: *mut u8 = 0x12 as *mut u8;
743
744/// Window comparator low threshold.
745pub const WINLT: *mut u16 = 0x12 as *mut u16;
746
747/// Pin 2 Control.
748pub const PIN2CTRL: *mut u8 = 0x12 as *mut u8;
749
750/// OSC20M Calibration B.
751///
752/// Bitfields:
753///
754/// | Name | Mask (binary) |
755/// | ---- | ------------- |
756/// | TEMPCAL20M | 1111 |
757pub const OSC20MCALIBB: *mut u8 = 0x12 as *mut u8;
758
759/// User Row Byte 18.
760pub const USERROW18: *mut u8 = 0x12 as *mut u8;
761
762/// Fault Control.
763pub const FAULTCTRL: *mut u8 = 0x12 as *mut u8;
764
765/// Window comparator low threshold low byte.
766pub const WINLTL: *mut u8 = 0x12 as *mut u8;
767
768/// User Row Byte 19.
769pub const USERROW19: *mut u8 = 0x13 as *mut u8;
770
771/// PIT Interrupt Flags.
772pub const PITINTFLAGS: *mut u8 = 0x13 as *mut u8;
773
774/// Asynchronous User Ch 1 Input Selection - ADC0.
775pub const ASYNCUSER1: *mut u8 = 0x13 as *mut u8;
776
777/// Pin 3 Control.
778pub const PIN3CTRL: *mut u8 = 0x13 as *mut u8;
779
780/// Window comparator low threshold high byte.
781pub const WINLTH: *mut u8 = 0x13 as *mut u8;
782
783/// Pin 4 Control.
784pub const PIN4CTRL: *mut u8 = 0x14 as *mut u8;
785
786/// Delay Control.
787///
788/// Bitfields:
789///
790/// | Name | Mask (binary) |
791/// | ---- | ------------- |
792/// | DLYTRIG | 1100 |
793/// | DLYSEL | 11 |
794/// | DLYPRESC | 110000 |
795pub const DLYCTRL: *mut u8 = 0x14 as *mut u8;
796
797/// Window comparator high threshold low byte.
798pub const WINHTL: *mut u8 = 0x14 as *mut u8;
799
800/// Asynchronous User Ch 2 Input Selection - CCL LUT0 Event 0.
801pub const ASYNCUSER2: *mut u8 = 0x14 as *mut u8;
802
803/// Window comparator high threshold.
804pub const WINHT: *mut u16 = 0x14 as *mut u16;
805
806/// User Row Byte 20.
807pub const USERROW20: *mut u8 = 0x14 as *mut u8;
808
809/// PIT Debug control.
810pub const PITDBGCTRL: *mut u8 = 0x15 as *mut u8;
811
812/// Window comparator high threshold high byte.
813pub const WINHTH: *mut u8 = 0x15 as *mut u8;
814
815/// Asynchronous User Ch 3 Input Selection - CCL LUT1 Event 0.
816pub const ASYNCUSER3: *mut u8 = 0x15 as *mut u8;
817
818/// User Row Byte 21.
819pub const USERROW21: *mut u8 = 0x15 as *mut u8;
820
821/// Delay value.
822pub const DLYVAL: *mut u8 = 0x15 as *mut u8;
823
824/// Pin 5 Control.
825pub const PIN5CTRL: *mut u8 = 0x15 as *mut u8;
826
827/// Pin 6 Control.
828pub const PIN6CTRL: *mut u8 = 0x16 as *mut u8;
829
830/// Calibration.
831///
832/// Bitfields:
833///
834/// | Name | Mask (binary) |
835/// | ---- | ------------- |
836/// | DUTYCYC | 1 |
837pub const CALIB: *mut u8 = 0x16 as *mut u8;
838
839/// User Row Byte 22.
840pub const USERROW22: *mut u8 = 0x16 as *mut u8;
841
842/// Asynchronous User Ch 4 Input Selection - CCL LUT0 Event 1.
843pub const ASYNCUSER4: *mut u8 = 0x16 as *mut u8;
844
845/// Pin 7 Control.
846pub const PIN7CTRL: *mut u8 = 0x17 as *mut u8;
847
848/// User Row Byte 23.
849pub const USERROW23: *mut u8 = 0x17 as *mut u8;
850
851/// Asynchronous User Ch 5 Input Selection - CCL LUT1 Event 1.
852pub const ASYNCUSER5: *mut u8 = 0x17 as *mut u8;
853
854/// OSC32K Control A.
855pub const OSC32KCTRLA: *mut u8 = 0x18 as *mut u8;
856
857/// Dither Control A.
858///
859/// Bitfields:
860///
861/// | Name | Mask (binary) |
862/// | ---- | ------------- |
863/// | DITHERSEL | 11 |
864pub const DITCTRL: *mut u8 = 0x18 as *mut u8;
865
866/// Asynchronous User Ch 6 Input Selection - TCD0 Event 0.
867pub const ASYNCUSER6: *mut u8 = 0x18 as *mut u8;
868
869/// User Row Byte 24.
870pub const USERROW24: *mut u8 = 0x18 as *mut u8;
871
872/// Dither value.
873///
874/// Bitfields:
875///
876/// | Name | Mask (binary) |
877/// | ---- | ------------- |
878/// | DITHER | 1111 |
879pub const DITVAL: *mut u8 = 0x19 as *mut u8;
880
881/// Asynchronous User Ch 7 Input Selection - TCD0 Event 1.
882pub const ASYNCUSER7: *mut u8 = 0x19 as *mut u8;
883
884/// User Row Byte 25.
885pub const USERROW25: *mut u8 = 0x19 as *mut u8;
886
887/// User Row Byte 26.
888pub const USERROW26: *mut u8 = 0x1A as *mut u8;
889
890/// Asynchronous User Ch 8 Input Selection - Event Out 0.
891pub const ASYNCUSER8: *mut u8 = 0x1A as *mut u8;
892
893/// Asynchronous User Ch 9 Input Selection - Event Out 1.
894pub const ASYNCUSER9: *mut u8 = 0x1B as *mut u8;
895
896/// User Row Byte 27.
897pub const USERROW27: *mut u8 = 0x1B as *mut u8;
898
899/// XOSC32K Control A.
900///
901/// Bitfields:
902///
903/// | Name | Mask (binary) |
904/// | ---- | ------------- |
905/// | SEL | 100 |
906/// | CSUT | 110000 |
907pub const XOSC32KCTRLA: *mut u8 = 0x1C as *mut u8;
908
909/// Asynchronous User Ch 10 Input Selection - Event Out 2.
910pub const ASYNCUSER10: *mut u8 = 0x1C as *mut u8;
911
912/// User Row Byte 28.
913pub const USERROW28: *mut u8 = 0x1C as *mut u8;
914
915/// User Row Byte 29.
916pub const USERROW29: *mut u8 = 0x1D as *mut u8;
917
918/// User Row Byte 30.
919pub const USERROW30: *mut u8 = 0x1E as *mut u8;
920
921/// User Row Byte 31.
922pub const USERROW31: *mut u8 = 0x1F as *mut u8;
923
924/// Temperature Sensor Calibration Byte 0.
925pub const TEMPSENSE0: *mut u8 = 0x20 as *mut u8;
926
927/// Low Count.
928pub const LCNT: *mut u8 = 0x20 as *mut u8;
929
930/// High Count.
931pub const HCNT: *mut u8 = 0x21 as *mut u8;
932
933/// Temperature Sensor Calibration Byte 1.
934pub const TEMPSENSE1: *mut u8 = 0x21 as *mut u8;
935
936/// OSC16 error at 3V.
937pub const OSC16ERR3V: *mut u8 = 0x22 as *mut u8;
938
939/// Capture A.
940pub const CAPTUREA: *mut u16 = 0x22 as *mut u16;
941
942/// Synchronous User Ch 0 Input Selection - TCA0.
943pub const SYNCUSER0: *mut u8 = 0x22 as *mut u8;
944
945/// Capture A low byte.
946pub const CAPTUREAL: *mut u8 = 0x22 as *mut u8;
947
948/// Capture A high byte.
949pub const CAPTUREAH: *mut u8 = 0x23 as *mut u8;
950
951/// Synchronous User Ch 1 Input Selection - USART0.
952pub const SYNCUSER1: *mut u8 = 0x23 as *mut u8;
953
954/// OSC16 error at 5V.
955pub const OSC16ERR5V: *mut u8 = 0x23 as *mut u8;
956
957/// Capture B low byte.
958pub const CAPTUREBL: *mut u8 = 0x24 as *mut u8;
959
960/// Capture B.
961pub const CAPTUREB: *mut u16 = 0x24 as *mut u16;
962
963/// OSC20 error at 3V.
964pub const OSC20ERR3V: *mut u8 = 0x24 as *mut u8;
965
966/// OSC20 error at 5V.
967pub const OSC20ERR5V: *mut u8 = 0x25 as *mut u8;
968
969/// Capture B high byte.
970pub const CAPTUREBH: *mut u8 = 0x25 as *mut u8;
971
972/// Low Period.
973pub const LPER: *mut u8 = 0x26 as *mut u8;
974
975/// Period.
976pub const PER: *mut u16 = 0x26 as *mut u16;
977
978/// Period low byte.
979pub const PERL: *mut u8 = 0x26 as *mut u8;
980
981/// Period high byte.
982pub const PERH: *mut u8 = 0x27 as *mut u8;
983
984/// High Period.
985pub const HPER: *mut u8 = 0x27 as *mut u8;
986
987/// Compare A Set.
988pub const CMPASET: *mut u16 = 0x28 as *mut u16;
989
990/// Compare 0 low byte.
991pub const CMP0L: *mut u8 = 0x28 as *mut u8;
992
993/// Low Compare.
994pub const LCMP0: *mut u8 = 0x28 as *mut u8;
995
996/// Compare 0.
997pub const CMP0: *mut u16 = 0x28 as *mut u16;
998
999/// Compare A Set low byte.
1000pub const CMPASETL: *mut u8 = 0x28 as *mut u8;
1001
1002/// Compare A Set high byte.
1003pub const CMPASETH: *mut u8 = 0x29 as *mut u8;
1004
1005/// High Compare.
1006pub const HCMP0: *mut u8 = 0x29 as *mut u8;
1007
1008/// Compare 0 high byte.
1009pub const CMP0H: *mut u8 = 0x29 as *mut u8;
1010
1011/// Low Compare.
1012pub const LCMP1: *mut u8 = 0x2A as *mut u8;
1013
1014/// Compare 1 low byte.
1015pub const CMP1L: *mut u8 = 0x2A as *mut u8;
1016
1017/// Compare A Clear low byte.
1018pub const CMPACLRL: *mut u8 = 0x2A as *mut u8;
1019
1020/// Compare A Clear.
1021pub const CMPACLR: *mut u16 = 0x2A as *mut u16;
1022
1023/// Compare 1.
1024pub const CMP1: *mut u16 = 0x2A as *mut u16;
1025
1026/// Compare A Clear high byte.
1027pub const CMPACLRH: *mut u8 = 0x2B as *mut u8;
1028
1029/// Compare 1 high byte.
1030pub const CMP1H: *mut u8 = 0x2B as *mut u8;
1031
1032/// High Compare.
1033pub const HCMP1: *mut u8 = 0x2B as *mut u8;
1034
1035/// Compare 2 low byte.
1036pub const CMP2L: *mut u8 = 0x2C as *mut u8;
1037
1038/// Compare 2.
1039pub const CMP2: *mut u16 = 0x2C as *mut u16;
1040
1041/// Compare B Set.
1042pub const CMPBSET: *mut u16 = 0x2C as *mut u16;
1043
1044/// Compare B Set low byte.
1045pub const CMPBSETL: *mut u8 = 0x2C as *mut u8;
1046
1047/// Low Compare.
1048pub const LCMP2: *mut u8 = 0x2C as *mut u8;
1049
1050/// High Compare.
1051pub const HCMP2: *mut u8 = 0x2D as *mut u8;
1052
1053/// Compare 2 high byte.
1054pub const CMP2H: *mut u8 = 0x2D as *mut u8;
1055
1056/// Compare B Set high byte.
1057pub const CMPBSETH: *mut u8 = 0x2D as *mut u8;
1058
1059/// Compare B Clear.
1060pub const CMPBCLR: *mut u16 = 0x2E as *mut u16;
1061
1062/// Compare B Clear low byte.
1063pub const CMPBCLRL: *mut u8 = 0x2E as *mut u8;
1064
1065/// Compare B Clear high byte.
1066pub const CMPBCLRH: *mut u8 = 0x2F as *mut u8;
1067
1068/// Period Buffer.
1069pub const PERBUF: *mut u16 = 0x36 as *mut u16;
1070
1071/// Period Buffer low byte.
1072pub const PERBUFL: *mut u8 = 0x36 as *mut u8;
1073
1074/// Period Buffer high byte.
1075pub const PERBUFH: *mut u8 = 0x37 as *mut u8;
1076
1077/// Compare 0 Buffer.
1078pub const CMP0BUF: *mut u16 = 0x38 as *mut u16;
1079
1080/// Compare 0 Buffer low byte.
1081pub const CMP0BUFL: *mut u8 = 0x38 as *mut u8;
1082
1083/// Compare 0 Buffer high byte.
1084pub const CMP0BUFH: *mut u8 = 0x39 as *mut u8;
1085
1086/// Compare 1 Buffer low byte.
1087pub const CMP1BUFL: *mut u8 = 0x3A as *mut u8;
1088
1089/// Compare 1 Buffer.
1090pub const CMP1BUF: *mut u16 = 0x3A as *mut u16;
1091
1092/// Compare 1 Buffer high byte.
1093pub const CMP1BUFH: *mut u8 = 0x3B as *mut u8;
1094
1095/// Compare 2 Buffer low byte.
1096pub const CMP2BUFL: *mut u8 = 0x3C as *mut u8;
1097
1098/// Compare 2 Buffer.
1099pub const CMP2BUF: *mut u16 = 0x3C as *mut u16;
1100
1101/// Compare 2 Buffer high byte.
1102pub const CMP2BUFH: *mut u8 = 0x3D as *mut u8;
1103
1104/// Bitfield on register `BODCFG`
1105pub const ACTIVE: *mut u8 = 0xC as *mut u8;
1106
1107/// Bitfield on register `BODCFG`
1108pub const SLEEP: *mut u8 = 0x3 as *mut u8;
1109
1110/// Bitfield on register `BODCFG`
1111pub const LVL: *mut u8 = 0xE0 as *mut u8;
1112
1113/// Bitfield on register `BODCFG`
1114pub const SAMPFREQ: *mut u8 = 0x10 as *mut u8;
1115
1116/// Bitfield on register `CALIB`
1117pub const DUTYCYC: *mut u8 = 0x1 as *mut u8;
1118
1119/// Bitfield on register `COMMAND`
1120pub const STCONV: *mut u8 = 0x1 as *mut u8;
1121
1122/// Bitfield on register `CTRLB`
1123pub const DAC0REFEN: *mut u8 = 0x1 as *mut u8;
1124
1125/// Bitfield on register `CTRLB`
1126pub const ADC0REFEN: *mut u8 = 0x2 as *mut u8;
1127
1128/// Bitfield on register `CTRLD`
1129pub const CMPAVAL: *mut u8 = 0xF as *mut u8;
1130
1131/// Bitfield on register `CTRLD`
1132pub const CMPBVAL: *mut u8 = 0xF0 as *mut u8;
1133
1134/// Bitfield on register `CTRLE`
1135pub const RESTART: *mut u8 = 0x4 as *mut u8;
1136
1137/// Bitfield on register `CTRLE`
1138pub const SCAPTUREA: *mut u8 = 0x8 as *mut u8;
1139
1140/// Bitfield on register `CTRLE`
1141pub const SYNC: *mut u8 = 0x2 as *mut u8;
1142
1143/// Bitfield on register `CTRLE`
1144pub const DISEOC: *mut u8 = 0x80 as *mut u8;
1145
1146/// Bitfield on register `CTRLE`
1147pub const SYNCEOC: *mut u8 = 0x1 as *mut u8;
1148
1149/// Bitfield on register `CTRLE`
1150pub const SCAPTUREB: *mut u8 = 0x10 as *mut u8;
1151
1152/// Bitfield on register `DBGCTRL`
1153pub const ABMBP: *mut u8 = 0x80 as *mut u8;
1154
1155/// Bitfield on register `DITCTRL`
1156pub const DITHERSEL: *mut u8 = 0x3 as *mut u8;
1157
1158/// Bitfield on register `DITVAL`
1159pub const DITHER: *mut u8 = 0xF as *mut u8;
1160
1161/// Bitfield on register `DLYCTRL`
1162pub const DLYTRIG: *mut u8 = 0xC as *mut u8;
1163
1164/// Bitfield on register `DLYCTRL`
1165pub const DLYSEL: *mut u8 = 0x3 as *mut u8;
1166
1167/// Bitfield on register `DLYCTRL`
1168pub const DLYPRESC: *mut u8 = 0x30 as *mut u8;
1169
1170/// Bitfield on register `EVCTRL`
1171pub const IREI: *mut u8 = 0x1 as *mut u8;
1172
1173/// Bitfield on register `EXTBRK`
1174pub const ENEXTBRK: *mut u8 = 0x1 as *mut u8;
1175
1176/// Bitfield on register `INTCTRL`
1177pub const TRIGB: *mut u8 = 0x8 as *mut u8;
1178
1179/// Bitfield on register `INTCTRL`
1180pub const OVF: *mut u8 = 0x1 as *mut u8;
1181
1182/// Bitfield on register `INTCTRL`
1183pub const TRIGA: *mut u8 = 0x4 as *mut u8;
1184
1185/// Bitfield on register `MCLKCTRLA`
1186pub const CLKOUT: *mut u8 = 0x80 as *mut u8;
1187
1188/// Bitfield on register `MCLKCTRLB`
1189pub const PEN: *mut u8 = 0x1 as *mut u8;
1190
1191/// Bitfield on register `MCLKCTRLB`
1192pub const PDIV: *mut u8 = 0x1E as *mut u8;
1193
1194/// Bitfield on register `MCLKLOCK`
1195pub const LOCKEN: *mut u8 = 0x1 as *mut u8;
1196
1197/// Bitfield on register `MCLKSTATUS`
1198pub const OSC32KS: *mut u8 = 0x20 as *mut u8;
1199
1200/// Bitfield on register `MCLKSTATUS`
1201pub const OSC20MS: *mut u8 = 0x10 as *mut u8;
1202
1203/// Bitfield on register `MCLKSTATUS`
1204pub const SOSC: *mut u8 = 0x1 as *mut u8;
1205
1206/// Bitfield on register `MCLKSTATUS`
1207pub const EXTS: *mut u8 = 0x80 as *mut u8;
1208
1209/// Bitfield on register `MCLKSTATUS`
1210pub const XOSC32KS: *mut u8 = 0x40 as *mut u8;
1211
1212/// Bitfield on register `MCTRLA`
1213pub const QCEN: *mut u8 = 0x10 as *mut u8;
1214
1215/// Bitfield on register `MCTRLA`
1216pub const RIEN: *mut u8 = 0x80 as *mut u8;
1217
1218/// Bitfield on register `MCTRLA`
1219pub const WIEN: *mut u8 = 0x40 as *mut u8;
1220
1221/// Bitfield on register `MCTRLA`
1222pub const TIMEOUT: *mut u8 = 0xC as *mut u8;
1223
1224/// Bitfield on register `MCTRLB`
1225pub const FLUSH: *mut u8 = 0x8 as *mut u8;
1226
1227/// Bitfield on register `MCTRLB`
1228pub const MCMD: *mut u8 = 0x3 as *mut u8;
1229
1230/// Bitfield on register `MSTATUS`
1231pub const RIF: *mut u8 = 0x80 as *mut u8;
1232
1233/// Bitfield on register `MSTATUS`
1234pub const ARBLOST: *mut u8 = 0x8 as *mut u8;
1235
1236/// Bitfield on register `MSTATUS`
1237pub const WIF: *mut u8 = 0x40 as *mut u8;
1238
1239/// Bitfield on register `MSTATUS`
1240pub const BUSSTATE: *mut u8 = 0x3 as *mut u8;
1241
1242/// Bitfield on register `MUXCTRLA`
1243pub const INVERT: *mut u8 = 0x80 as *mut u8;
1244
1245/// Bitfield on register `MUXCTRLA`
1246pub const MUXNEG: *mut u8 = 0x3 as *mut u8;
1247
1248/// Bitfield on register `OSC20MCALIBA`
1249pub const CALSEL20M: *mut u8 = 0xC0 as *mut u8;
1250
1251/// Bitfield on register `OSC20MCALIBA`
1252pub const CAL20M: *mut u8 = 0x3F as *mut u8;
1253
1254/// Bitfield on register `OSC20MCALIBB`
1255pub const TEMPCAL20M: *mut u8 = 0xF as *mut u8;
1256
1257/// Bitfield on register `OSCCFG`
1258pub const FREQSEL: *mut u8 = 0x3 as *mut u8;
1259
1260/// Bitfield on register `OSCCFG`
1261pub const OSCLOCK: *mut u8 = 0x80 as *mut u8;
1262
1263/// Bitfield on register `PITCTRLA`
1264pub const PITEN: *mut u8 = 0x1 as *mut u8;
1265
1266/// Bitfield on register `PITSTATUS`
1267pub const CTRLBUSY: *mut u8 = 0x1 as *mut u8;
1268
1269/// Bitfield on register `RSTFR`
1270pub const EXTRF: *mut u8 = 0x4 as *mut u8;
1271
1272/// Bitfield on register `RSTFR`
1273pub const UPDIRF: *mut u8 = 0x20 as *mut u8;
1274
1275/// Bitfield on register `RSTFR`
1276pub const PORF: *mut u8 = 0x1 as *mut u8;
1277
1278/// Bitfield on register `RSTFR`
1279pub const WDRF: *mut u8 = 0x8 as *mut u8;
1280
1281/// Bitfield on register `RSTFR`
1282pub const BORF: *mut u8 = 0x2 as *mut u8;
1283
1284/// Bitfield on register `RSTFR`
1285pub const SWRF: *mut u8 = 0x10 as *mut u8;
1286
1287/// Bitfield on register `RXDATAH`
1288pub const RXCIF: *mut u8 = 0x80 as *mut u8;
1289
1290/// Bitfield on register `RXDATAH`
1291pub const BUFOVF: *mut u8 = 0x40 as *mut u8;
1292
1293/// Bitfield on register `RXDATAH`
1294pub const PERR: *mut u8 = 0x2 as *mut u8;
1295
1296/// Bitfield on register `RXDATAH`
1297pub const FERR: *mut u8 = 0x4 as *mut u8;
1298
1299/// Bitfield on register `RXPLCTRL`
1300pub const RXPL: *mut u8 = 0x7F as *mut u8;
1301
1302/// Bitfield on register `SADDRMASK`
1303pub const ADDREN: *mut u8 = 0x1 as *mut u8;
1304
1305/// Bitfield on register `SADDRMASK`
1306pub const ADDRMASK: *mut u8 = 0xFE as *mut u8;
1307
1308/// Bitfield on register `SAMPCTRL`
1309pub const SAMPLEN: *mut u8 = 0x1F as *mut u8;
1310
1311/// Bitfield on register `SCTRLA`
1312pub const PIEN: *mut u8 = 0x20 as *mut u8;
1313
1314/// Bitfield on register `SCTRLA`
1315pub const PMEN: *mut u8 = 0x4 as *mut u8;
1316
1317/// Bitfield on register `SCTRLA`
1318pub const APIEN: *mut u8 = 0x40 as *mut u8;
1319
1320/// Bitfield on register `SCTRLA`
1321pub const DIEN: *mut u8 = 0x80 as *mut u8;
1322
1323/// Bitfield on register `SCTRLB`
1324pub const SCMD: *mut u8 = 0x3 as *mut u8;
1325
1326/// Bitfield on register `SEQCTRL0`
1327pub const SEQSEL: *mut u8 = 0x7 as *mut u8;
1328
1329/// Bitfield on register `SREG`
1330pub const T: *mut u8 = 0x40 as *mut u8;
1331
1332/// Bitfield on register `SREG`
1333pub const I: *mut u8 = 0x80 as *mut u8;
1334
1335/// Bitfield on register `SREG`
1336pub const N: *mut u8 = 0x4 as *mut u8;
1337
1338/// Bitfield on register `SREG`
1339pub const H: *mut u8 = 0x20 as *mut u8;
1340
1341/// Bitfield on register `SREG`
1342pub const S: *mut u8 = 0x10 as *mut u8;
1343
1344/// Bitfield on register `SREG`
1345pub const V: *mut u8 = 0x8 as *mut u8;
1346
1347/// Bitfield on register `SREG`
1348pub const Z: *mut u8 = 0x2 as *mut u8;
1349
1350/// Bitfield on register `SREG`
1351pub const C: *mut u8 = 0x1 as *mut u8;
1352
1353/// Bitfield on register `SSTATUS`
1354pub const COLL: *mut u8 = 0x8 as *mut u8;
1355
1356/// Bitfield on register `SSTATUS`
1357pub const APIF: *mut u8 = 0x40 as *mut u8;
1358
1359/// Bitfield on register `SSTATUS`
1360pub const DIF: *mut u8 = 0x80 as *mut u8;
1361
1362/// Bitfield on register `SSTATUS`
1363pub const AP: *mut u8 = 0x1 as *mut u8;
1364
1365/// Bitfield on register `STATUS`
1366pub const SYNCBUSY: *mut u8 = 0x1 as *mut u8;
1367
1368/// Bitfield on register `SWRR`
1369pub const SWRE: *mut u8 = 0x1 as *mut u8;
1370
1371/// Bitfield on register `SYSCFG0`
1372pub const EESAVE: *mut u8 = 0x1 as *mut u8;
1373
1374/// Bitfield on register `SYSCFG0`
1375pub const CRCSRC: *mut u8 = 0xC0 as *mut u8;
1376
1377/// Bitfield on register `SYSCFG0`
1378pub const RSTPINCFG: *mut u8 = 0xC as *mut u8;
1379
1380/// Bitfield on register `SYSCFG1`
1381pub const SUT: *mut u8 = 0x7 as *mut u8;
1382
1383/// Bitfield on register `VLMCTRLA`
1384pub const VLMLVL: *mut u8 = 0x3 as *mut u8;
1385
1386/// Bitfield on register `XOSC32KCTRLA`
1387pub const SEL: *mut u8 = 0x4 as *mut u8;
1388
1389/// Bitfield on register `XOSC32KCTRLA`
1390pub const CSUT: *mut u8 = 0x30 as *mut u8;
1391
1392/// Hysteresis Mode select
1393#[allow(non_upper_case_globals)]
1394pub mod ac_hysmode {
1395   /// No hysteresis.
1396   pub const OFF: u32 = 0x0;
1397   /// 10mV hysteresis.
1398   pub const _10mV: u32 = 0x1;
1399   /// 25mV hysteresis.
1400   pub const _25mV: u32 = 0x2;
1401   /// 50mV hysteresis.
1402   pub const _50mV: u32 = 0x3;
1403}
1404
1405/// Interrupt Mode select
1406#[allow(non_upper_case_globals)]
1407pub mod ac_intmode {
1408   /// Any Edge.
1409   pub const BOTHEDGE: u32 = 0x0;
1410   /// Negative Edge.
1411   pub const NEGEDGE: u32 = 0x2;
1412   /// Positive Edge.
1413   pub const POSEDGE: u32 = 0x3;
1414}
1415
1416/// Low Power Mode select
1417#[allow(non_upper_case_globals)]
1418pub mod ac_lpmode {
1419   /// Low power mode disabled.
1420   pub const DIS: u32 = 0x0;
1421   /// Low power mode enabled.
1422   pub const EN: u32 = 0x1;
1423}
1424
1425/// Negative Input MUX Selection select
1426#[allow(non_upper_case_globals)]
1427pub mod ac_muxneg {
1428   /// Negative Pin 0.
1429   pub const PIN0: u32 = 0x0;
1430   /// Negative Pin 1.
1431   pub const PIN1: u32 = 0x1;
1432   /// Voltage Reference.
1433   pub const VREF: u32 = 0x2;
1434   /// DAC output.
1435   pub const DAC: u32 = 0x3;
1436}
1437
1438/// Positive Input MUX Selection select
1439#[allow(non_upper_case_globals)]
1440pub mod ac_muxpos {
1441   /// Positive Pin 0.
1442   pub const PIN0: u32 = 0x0;
1443   /// Positive Pin 1.
1444   pub const PIN1: u32 = 0x1;
1445}
1446
1447/// Automatic Sampling Delay Variation select
1448#[allow(non_upper_case_globals)]
1449pub mod adc_asdv {
1450   /// The Automatic Sampling Delay Variation is disabled.
1451   pub const ASVOFF: u32 = 0x0;
1452   /// The Automatic Sampling Delay Variation is enabled.
1453   pub const ASVON: u32 = 0x1;
1454}
1455
1456/// Duty Cycle select
1457#[allow(non_upper_case_globals)]
1458pub mod adc_dutycyc {
1459   /// 50% Duty cycle.
1460   pub const DUTY50: u32 = 0x0;
1461   /// 25% Duty cycle.
1462   pub const DUTY25: u32 = 0x1;
1463}
1464
1465/// Initial Delay Selection select
1466#[allow(non_upper_case_globals)]
1467pub mod adc_initdly {
1468   /// Delay 0 CLK_ADC cycles.
1469   pub const DLY0: u32 = 0x0;
1470   /// Delay 16 CLK_ADC cycles.
1471   pub const DLY16: u32 = 0x1;
1472   /// Delay 32 CLK_ADC cycles.
1473   pub const DLY32: u32 = 0x2;
1474   /// Delay 64 CLK_ADC cycles.
1475   pub const DLY64: u32 = 0x3;
1476   /// Delay 128 CLK_ADC cycles.
1477   pub const DLY128: u32 = 0x4;
1478   /// Delay 256 CLK_ADC cycles.
1479   pub const DLY256: u32 = 0x5;
1480}
1481
1482/// Analog Channel Selection Bits select
1483#[allow(non_upper_case_globals)]
1484pub mod adc_muxpos {
1485   /// ADC input pin 0.
1486   pub const AIN0: u32 = 0x0;
1487   /// ADC input pin 1.
1488   pub const AIN1: u32 = 0x1;
1489   /// ADC input pin 2.
1490   pub const AIN2: u32 = 0x2;
1491   /// ADC input pin 3.
1492   pub const AIN3: u32 = 0x3;
1493   /// ADC input pin 4.
1494   pub const AIN4: u32 = 0x4;
1495   /// ADC input pin 5.
1496   pub const AIN5: u32 = 0x5;
1497   /// ADC input pin 6.
1498   pub const AIN6: u32 = 0x6;
1499   /// ADC input pin 7.
1500   pub const AIN7: u32 = 0x7;
1501   /// ADC input pin 8.
1502   pub const AIN8: u32 = 0x8;
1503   /// ADC input pin 9.
1504   pub const AIN9: u32 = 0x9;
1505   /// ADC input pin 10.
1506   pub const AIN10: u32 = 0xA;
1507   /// ADC input pin 11.
1508   pub const AIN11: u32 = 0xB;
1509   /// DAC0.
1510   pub const DAC0: u32 = 0x1C;
1511   /// Internal Ref.
1512   pub const INTREF: u32 = 0x1D;
1513   /// Temp sensor.
1514   pub const TEMPSENSE: u32 = 0x1E;
1515   /// GND.
1516   pub const GND: u32 = 0x1F;
1517}
1518
1519/// Clock Pre-scaler select
1520#[allow(non_upper_case_globals)]
1521pub mod adc_presc {
1522   /// CLK_PER divided by 2.
1523   pub const DIV2: u32 = 0x0;
1524   /// CLK_PER divided by 4.
1525   pub const DIV4: u32 = 0x1;
1526   /// CLK_PER divided by 8.
1527   pub const DIV8: u32 = 0x2;
1528   /// CLK_PER divided by 16.
1529   pub const DIV16: u32 = 0x3;
1530   /// CLK_PER divided by 32.
1531   pub const DIV32: u32 = 0x4;
1532   /// CLK_PER divided by 64.
1533   pub const DIV64: u32 = 0x5;
1534   /// CLK_PER divided by 128.
1535   pub const DIV128: u32 = 0x6;
1536   /// CLK_PER divided by 256.
1537   pub const DIV256: u32 = 0x7;
1538}
1539
1540/// Reference Selection select
1541#[allow(non_upper_case_globals)]
1542pub mod adc_refsel {
1543   /// Internal reference.
1544   pub const INTREF: u32 = 0x0;
1545   /// VDD.
1546   pub const VDDREF: u32 = 0x1;
1547}
1548
1549/// ADC Resolution select
1550#[allow(non_upper_case_globals)]
1551pub mod adc_ressel {
1552   /// 10-bit mode.
1553   pub const _10BIT: u32 = 0x0;
1554   /// 8-bit mode.
1555   pub const _8BIT: u32 = 0x1;
1556}
1557
1558/// Accumulation Samples select
1559#[allow(non_upper_case_globals)]
1560pub mod adc_sampnum {
1561   /// 1 ADC sample.
1562   pub const ACC1: u32 = 0x0;
1563   /// Accumulate 2 samples.
1564   pub const ACC2: u32 = 0x1;
1565   /// Accumulate 4 samples.
1566   pub const ACC4: u32 = 0x2;
1567   /// Accumulate 8 samples.
1568   pub const ACC8: u32 = 0x3;
1569   /// Accumulate 16 samples.
1570   pub const ACC16: u32 = 0x4;
1571   /// Accumulate 32 samples.
1572   pub const ACC32: u32 = 0x5;
1573   /// Accumulate 64 samples.
1574   pub const ACC64: u32 = 0x6;
1575}
1576
1577/// Window Comparator Mode select
1578#[allow(non_upper_case_globals)]
1579pub mod adc_wincm {
1580   /// No Window Comparison.
1581   pub const NONE: u32 = 0x0;
1582   /// Below Window.
1583   pub const BELOW: u32 = 0x1;
1584   /// Above Window.
1585   pub const ABOVE: u32 = 0x2;
1586   /// Inside Window.
1587   pub const INSIDE: u32 = 0x3;
1588   /// Outside Window.
1589   pub const OUTSIDE: u32 = 0x4;
1590}
1591
1592/// Operation in active mode select
1593#[allow(non_upper_case_globals)]
1594pub mod bod_active {
1595   /// Disabled.
1596   pub const DIS: u32 = 0x0;
1597   /// Enabled.
1598   pub const ENABLED: u32 = 0x1;
1599   /// Sampled.
1600   pub const SAMPLED: u32 = 0x2;
1601   /// Enabled with wakeup halt.
1602   pub const ENWAKE: u32 = 0x3;
1603}
1604
1605/// Bod level select
1606#[allow(non_upper_case_globals)]
1607pub mod bod_lvl {
1608   /// 1.8 V.
1609   pub const BODLEVEL0: u32 = 0x0;
1610   /// 2.1 V.
1611   pub const BODLEVEL1: u32 = 0x1;
1612   /// 2.6 V.
1613   pub const BODLEVEL2: u32 = 0x2;
1614   /// 2.9 V.
1615   pub const BODLEVEL3: u32 = 0x3;
1616   /// 3.3 V.
1617   pub const BODLEVEL4: u32 = 0x4;
1618   /// 3.7 V.
1619   pub const BODLEVEL5: u32 = 0x5;
1620   /// 4.0 V.
1621   pub const BODLEVEL6: u32 = 0x6;
1622   /// 4.2 V.
1623   pub const BODLEVEL7: u32 = 0x7;
1624}
1625
1626/// Sample frequency select
1627#[allow(non_upper_case_globals)]
1628pub mod bod_sampfreq {
1629   /// 1kHz sampling.
1630   pub const _1KHZ: u32 = 0x0;
1631   /// 125Hz sampling.
1632   pub const _125Hz: u32 = 0x1;
1633}
1634
1635/// Operation in sleep mode select
1636#[allow(non_upper_case_globals)]
1637pub mod bod_sleep {
1638   /// Disabled.
1639   pub const DIS: u32 = 0x0;
1640   /// Enabled.
1641   pub const ENABLED: u32 = 0x1;
1642   /// Sampled.
1643   pub const SAMPLED: u32 = 0x2;
1644}
1645
1646/// Configuration select
1647#[allow(non_upper_case_globals)]
1648pub mod bod_vlmcfg {
1649   /// Interrupt when supply goes below VLM level.
1650   pub const BELOW: u32 = 0x0;
1651   /// Interrupt when supply goes above VLM level.
1652   pub const ABOVE: u32 = 0x1;
1653   /// Interrupt when supply crosses VLM level.
1654   pub const CROSS: u32 = 0x2;
1655}
1656
1657/// voltage level monitor level select
1658#[allow(non_upper_case_globals)]
1659pub mod bod_vlmlvl {
1660   /// VLM threshold 5% above BOD level.
1661   pub const _5ABOVE: u32 = 0x0;
1662   /// VLM threshold 15% above BOD level.
1663   pub const _15ABOVE: u32 = 0x1;
1664   /// VLM threshold 25% above BOD level.
1665   pub const _25ABOVE: u32 = 0x2;
1666}
1667
1668/// Edge Detection Enable select
1669#[allow(non_upper_case_globals)]
1670pub mod ccl_edgedet {
1671   /// Edge detector is disabled.
1672   pub const DIS: u32 = 0x0;
1673   /// Edge detector is enabled.
1674   pub const EN: u32 = 0x1;
1675}
1676
1677/// Filter Selection select
1678#[allow(non_upper_case_globals)]
1679pub mod ccl_filtsel {
1680   /// Filter disabled.
1681   pub const DISABLE: u32 = 0x0;
1682   /// Synchronizer enabled.
1683   pub const SYNCH: u32 = 0x1;
1684   /// Filter enabled.
1685   pub const FILTER: u32 = 0x2;
1686}
1687
1688/// LUT Input 0 Source Selection select
1689#[allow(non_upper_case_globals)]
1690pub mod ccl_insel0 {
1691   /// Masked input.
1692   pub const MASK: u32 = 0x0;
1693   /// Feedback input source.
1694   pub const FEEDBACK: u32 = 0x1;
1695   /// Linked LUT input source.
1696   pub const LINK: u32 = 0x2;
1697   /// Event input source 0.
1698   pub const EVENT0: u32 = 0x3;
1699   /// Event input source 1.
1700   pub const EVENT1: u32 = 0x4;
1701   /// IO pin LUTn-IN0 input source.
1702   pub const IO: u32 = 0x5;
1703   /// AC0 OUT input source.
1704   pub const AC0: u32 = 0x6;
1705   /// TCB0 WO input source.
1706   pub const TCB0: u32 = 0x7;
1707   /// TCA0 WO0 input source.
1708   pub const TCA0: u32 = 0x8;
1709   /// TCD0 WOA input source.
1710   pub const TCD0: u32 = 0x9;
1711   /// USART0 XCK input source.
1712   pub const USART0: u32 = 0xA;
1713   /// SPI0 SCK source.
1714   pub const SPI0: u32 = 0xB;
1715}
1716
1717/// LUT Input 1 Source Selection select
1718#[allow(non_upper_case_globals)]
1719pub mod ccl_insel1 {
1720   /// Masked input.
1721   pub const MASK: u32 = 0x0;
1722   /// Feedback input source.
1723   pub const FEEDBACK: u32 = 0x1;
1724   /// Linked LUT input source.
1725   pub const LINK: u32 = 0x2;
1726   /// Event input source 0.
1727   pub const EVENT0: u32 = 0x3;
1728   /// Event input source 1.
1729   pub const EVENT1: u32 = 0x4;
1730   /// IO pin LUTn-N1 input source.
1731   pub const IO: u32 = 0x5;
1732   /// AC0 OUT input source.
1733   pub const AC0: u32 = 0x6;
1734   /// TCB0 WO input source.
1735   pub const TCB0: u32 = 0x7;
1736   /// TCA0 WO1 input source.
1737   pub const TCA0: u32 = 0x8;
1738   /// TCD0 WOB input source.
1739   pub const TCD0: u32 = 0x9;
1740   /// USART0 TXD input source.
1741   pub const USART0: u32 = 0xA;
1742   /// SPI0 MOSI input source.
1743   pub const SPI0: u32 = 0xB;
1744}
1745
1746/// LUT Input 2 Source Selection select
1747#[allow(non_upper_case_globals)]
1748pub mod ccl_insel2 {
1749   /// Masked input.
1750   pub const MASK: u32 = 0x0;
1751   /// Feedback input source.
1752   pub const FEEDBACK: u32 = 0x1;
1753   /// Linked LUT input source.
1754   pub const LINK: u32 = 0x2;
1755   /// Event input source 0.
1756   pub const EVENT0: u32 = 0x3;
1757   /// Event input source 1.
1758   pub const EVENT1: u32 = 0x4;
1759   /// IO pin LUTn-IN2 input source.
1760   pub const IO: u32 = 0x5;
1761   /// AC0 OUT input source.
1762   pub const AC0: u32 = 0x6;
1763   /// TCB0 WO input source.
1764   pub const TCB0: u32 = 0x7;
1765   /// TCA0 WO2 input source.
1766   pub const TCA0: u32 = 0x8;
1767   /// TCD0 WOA input source.
1768   pub const TCD0: u32 = 0x9;
1769   /// SPI0 MISO source.
1770   pub const SPI0: u32 = 0xB;
1771}
1772
1773/// Sequential Selection select
1774#[allow(non_upper_case_globals)]
1775pub mod ccl_seqsel {
1776   /// Sequential logic disabled.
1777   pub const DISABLE: u32 = 0x0;
1778   /// D FlipFlop.
1779   pub const DFF: u32 = 0x1;
1780   /// JK FlipFlop.
1781   pub const JK: u32 = 0x2;
1782   /// D Latch.
1783   pub const LATCH: u32 = 0x3;
1784   /// RS Latch.
1785   pub const RS: u32 = 0x4;
1786}
1787
1788/// clock select select
1789#[allow(non_upper_case_globals)]
1790pub mod clkctrl_clksel {
1791   /// 20MHz internal oscillator.
1792   pub const OSC20M: u32 = 0x0;
1793   /// 32KHz internal Ultra Low Power oscillator.
1794   pub const OSCULP32K: u32 = 0x1;
1795   /// 32.768kHz external crystal oscillator.
1796   pub const XOSC32K: u32 = 0x2;
1797   /// External clock.
1798   pub const EXTCLK: u32 = 0x3;
1799}
1800
1801/// Crystal startup time select
1802#[allow(non_upper_case_globals)]
1803pub mod clkctrl_csut {
1804   /// 1K cycles.
1805   pub const _1K: u32 = 0x0;
1806   /// 16K cycles.
1807   pub const _16K: u32 = 0x1;
1808   /// 32K cycles.
1809   pub const _32K: u32 = 0x2;
1810   /// 64K cycles.
1811   pub const _64K: u32 = 0x3;
1812}
1813
1814/// Prescaler division select
1815#[allow(non_upper_case_globals)]
1816pub mod clkctrl_pdiv {
1817   /// 2X.
1818   pub const _2X: u32 = 0x0;
1819   /// 4X.
1820   pub const _4X: u32 = 0x1;
1821   /// 8X.
1822   pub const _8X: u32 = 0x2;
1823   /// 16X.
1824   pub const _16X: u32 = 0x3;
1825   /// 32X.
1826   pub const _32X: u32 = 0x4;
1827   /// 64X.
1828   pub const _64X: u32 = 0x5;
1829   /// 6X.
1830   pub const _6X: u32 = 0x8;
1831   /// 10X.
1832   pub const _10X: u32 = 0x9;
1833   /// 12X.
1834   pub const _12X: u32 = 0xA;
1835   /// 24X.
1836   pub const _24X: u32 = 0xB;
1837   /// 48X.
1838   pub const _48X: u32 = 0xC;
1839}
1840
1841/// CCP signature select
1842#[allow(non_upper_case_globals)]
1843pub mod cpu_ccp {
1844   /// SPM Instruction Protection.
1845   pub const SPM: u32 = 0x9D;
1846   /// IO Register Protection.
1847   pub const IOREG: u32 = 0xD8;
1848}
1849
1850/// CRC Flash Access Mode select
1851#[allow(non_upper_case_globals)]
1852pub mod crcscan_mode {
1853   /// Priority to flash.
1854   pub const PRIORITY: u32 = 0x0;
1855   /// Reserved.
1856   pub const RESERVED: u32 = 0x1;
1857   /// Lowest priority to flash.
1858   pub const BACKGROUND: u32 = 0x2;
1859   /// Continuous checks in background.
1860   pub const CONTINUOUS: u32 = 0x3;
1861}
1862
1863/// CRC Source select
1864#[allow(non_upper_case_globals)]
1865pub mod crcscan_src {
1866   /// CRC on entire flash.
1867   pub const FLASH: u32 = 0x0;
1868   /// CRC on boot and appl section of flash.
1869   pub const APPLICATION: u32 = 0x1;
1870   /// CRC on boot section of flash.
1871   pub const BOOT: u32 = 0x2;
1872}
1873
1874/// Asynchronous Channel 0 Generator Selection select
1875#[allow(non_upper_case_globals)]
1876pub mod evsys_asyncch0 {
1877   /// Off.
1878   pub const OFF: u32 = 0x0;
1879   /// Configurable Custom Logic LUT0.
1880   pub const CCL_LUT0: u32 = 0x1;
1881   /// Configurable Custom Logic LUT1.
1882   pub const CCL_LUT1: u32 = 0x2;
1883   /// Analog Comparator 0 out.
1884   pub const AC0_OUT: u32 = 0x3;
1885   /// Timer/Counter D0 compare B clear.
1886   pub const TCD0_CMPBCLR: u32 = 0x4;
1887   /// Timer/Counter D0 compare A set.
1888   pub const TCD0_CMPASET: u32 = 0x5;
1889   /// Timer/Counter D0 compare B set.
1890   pub const TCD0_CMPBSET: u32 = 0x6;
1891   /// Timer/Counter D0 program event.
1892   pub const TCD0_PROGEV: u32 = 0x7;
1893   /// Real Time Counter overflow.
1894   pub const RTC_OVF: u32 = 0x8;
1895   /// Real Time Counter compare.
1896   pub const RTC_CMP: u32 = 0x9;
1897   /// Asynchronous Event from Pin PA0.
1898   pub const PORTA_PIN0: u32 = 0xA;
1899   /// Asynchronous Event from Pin PA1.
1900   pub const PORTA_PIN1: u32 = 0xB;
1901   /// Asynchronous Event from Pin PA2.
1902   pub const PORTA_PIN2: u32 = 0xC;
1903   /// Asynchronous Event from Pin PA3.
1904   pub const PORTA_PIN3: u32 = 0xD;
1905   /// Asynchronous Event from Pin PA4.
1906   pub const PORTA_PIN4: u32 = 0xE;
1907   /// Asynchronous Event from Pin PA5.
1908   pub const PORTA_PIN5: u32 = 0xF;
1909   /// Asynchronous Event from Pin PA6.
1910   pub const PORTA_PIN6: u32 = 0x10;
1911   /// Asynchronous Event from Pin PA7.
1912   pub const PORTA_PIN7: u32 = 0x11;
1913   /// Unified Program and debug interface.
1914   pub const UPDI: u32 = 0x12;
1915}
1916
1917/// Asynchronous Channel 1 Generator Selection select
1918#[allow(non_upper_case_globals)]
1919pub mod evsys_asyncch1 {
1920   /// Off.
1921   pub const OFF: u32 = 0x0;
1922   /// Configurable custom logic LUT0.
1923   pub const CCL_LUT0: u32 = 0x1;
1924   /// Configurable custom logic LUT1.
1925   pub const CCL_LUT1: u32 = 0x2;
1926   /// Analog Comparator 0 out.
1927   pub const AC0_OUT: u32 = 0x3;
1928   /// Timer/Counter D0 compare B clear.
1929   pub const TCD0_CMPBCLR: u32 = 0x4;
1930   /// Timer/Counter D0 compare A set.
1931   pub const TCD0_CMPASET: u32 = 0x5;
1932   /// Timer/Counter D0 compare B set.
1933   pub const TCD0_CMPBSET: u32 = 0x6;
1934   /// Timer/Counter D0 program event.
1935   pub const TCD0_PROGEV: u32 = 0x7;
1936   /// Real Time Counter overflow.
1937   pub const RTC_OVF: u32 = 0x8;
1938   /// Real Time Counter compare.
1939   pub const RTC_CMP: u32 = 0x9;
1940   /// Asynchronous Event from Pin PB0.
1941   pub const PORTB_PIN0: u32 = 0xA;
1942   /// Asynchronous Event from Pin PB1.
1943   pub const PORTB_PIN1: u32 = 0xB;
1944   /// Asynchronous Event from Pin PB2.
1945   pub const PORTB_PIN2: u32 = 0xC;
1946   /// Asynchronous Event from Pin PB3.
1947   pub const PORTB_PIN3: u32 = 0xD;
1948   /// Asynchronous Event from Pin PB4.
1949   pub const PORTB_PIN4: u32 = 0xE;
1950   /// Asynchronous Event from Pin PB5.
1951   pub const PORTB_PIN5: u32 = 0xF;
1952   /// Asynchronous Event from Pin PB6.
1953   pub const PORTB_PIN6: u32 = 0x10;
1954   /// Asynchronous Event from Pin PB7.
1955   pub const PORTB_PIN7: u32 = 0x11;
1956}
1957
1958/// Asynchronous Channel 2 Generator Selection select
1959#[allow(non_upper_case_globals)]
1960pub mod evsys_asyncch2 {
1961   /// Off.
1962   pub const OFF: u32 = 0x0;
1963   /// Configurable Custom Logic LUT0.
1964   pub const CCL_LUT0: u32 = 0x1;
1965   /// Configurable Custom Logic LUT1.
1966   pub const CCL_LUT1: u32 = 0x2;
1967   /// Analog Comparator 0 out.
1968   pub const AC0_OUT: u32 = 0x3;
1969   /// Timer/Counter D0 compare B clear.
1970   pub const TCD0_CMPBCLR: u32 = 0x4;
1971   /// Timer/Counter D0 compare A set.
1972   pub const TCD0_CMPASET: u32 = 0x5;
1973   /// Timer/Counter D0 compare B set.
1974   pub const TCD0_CMPBSET: u32 = 0x6;
1975   /// Timer/Counter D0 program event.
1976   pub const TCD0_PROGEV: u32 = 0x7;
1977   /// Real Time Counter overflow.
1978   pub const RTC_OVF: u32 = 0x8;
1979   /// Real Time Counter compare.
1980   pub const RTC_CMP: u32 = 0x9;
1981   /// Asynchronous Event from Pin PC0.
1982   pub const PORTC_PIN0: u32 = 0xA;
1983   /// Asynchronous Event from Pin PC1.
1984   pub const PORTC_PIN1: u32 = 0xB;
1985   /// Asynchronous Event from Pin PC2.
1986   pub const PORTC_PIN2: u32 = 0xC;
1987   /// Asynchronous Event from Pin PC3.
1988   pub const PORTC_PIN3: u32 = 0xD;
1989   /// Asynchronous Event from Pin PC4.
1990   pub const PORTC_PIN4: u32 = 0xE;
1991   /// Asynchronous Event from Pin PC5.
1992   pub const PORTC_PIN5: u32 = 0xF;
1993}
1994
1995/// Asynchronous Channel 3 Generator Selection select
1996#[allow(non_upper_case_globals)]
1997pub mod evsys_asyncch3 {
1998   /// Off.
1999   pub const OFF: u32 = 0x0;
2000   /// Configurable custom logic LUT0.
2001   pub const CCL_LUT0: u32 = 0x1;
2002   /// Configurable custom logic LUT1.
2003   pub const CCL_LUT1: u32 = 0x2;
2004   /// Analog Comparator 0 out.
2005   pub const AC0_OUT: u32 = 0x3;
2006   /// Timer/Counter type D compare B clear.
2007   pub const TCD0_CMPBCLR: u32 = 0x4;
2008   /// Timer/Counter type D compare A set.
2009   pub const TCD0_CMPASET: u32 = 0x5;
2010   /// Timer/Counter type D compare B set.
2011   pub const TCD0_CMPBSET: u32 = 0x6;
2012   /// Timer/Counter type D program event.
2013   pub const TCD0_PROGEV: u32 = 0x7;
2014   /// Real Time Counter overflow.
2015   pub const RTC_OVF: u32 = 0x8;
2016   /// Real Time Counter compare.
2017   pub const RTC_CMP: u32 = 0x9;
2018   /// Periodic Interrupt CLK_RTC div 8192.
2019   pub const PIT_DIV8192: u32 = 0xA;
2020   /// Periodic Interrupt CLK_RTC div 4096.
2021   pub const PIT_DIV4096: u32 = 0xB;
2022   /// Periodic Interrupt CLK_RTC div 2048.
2023   pub const PIT_DIV2048: u32 = 0xC;
2024   /// Periodic Interrupt CLK_RTC div 1024.
2025   pub const PIT_DIV1024: u32 = 0xD;
2026   /// Periodic Interrupt CLK_RTC div 512.
2027   pub const PIT_DIV512: u32 = 0xE;
2028   /// Periodic Interrupt CLK_RTC div 256.
2029   pub const PIT_DIV256: u32 = 0xF;
2030   /// Periodic Interrupt CLK_RTC div 128.
2031   pub const PIT_DIV128: u32 = 0x10;
2032   /// Periodic Interrupt CLK_RTC div 64.
2033   pub const PIT_DIV64: u32 = 0x11;
2034}
2035
2036/// Asynchronous User Ch 0 Input Selection - TCB0 select
2037#[allow(non_upper_case_globals)]
2038pub mod evsys_asyncuser0 {
2039   /// Off.
2040   pub const OFF: u32 = 0x0;
2041   /// Synchronous Event Channel 0.
2042   pub const SYNCCH0: u32 = 0x1;
2043   /// Synchronous Event Channel 1.
2044   pub const SYNCCH1: u32 = 0x2;
2045   /// Asynchronous Event Channel 0.
2046   pub const ASYNCCH0: u32 = 0x3;
2047   /// Asynchronous Event Channel 1.
2048   pub const ASYNCCH1: u32 = 0x4;
2049   /// Asynchronous Event Channel 2.
2050   pub const ASYNCCH2: u32 = 0x5;
2051   /// Asynchronous Event Channel 3.
2052   pub const ASYNCCH3: u32 = 0x6;
2053}
2054
2055/// Asynchronous User Ch 1 Input Selection - ADC0 select
2056#[allow(non_upper_case_globals)]
2057pub mod evsys_asyncuser1 {
2058   /// Off.
2059   pub const OFF: u32 = 0x0;
2060   /// Synchronous Event Channel 0.
2061   pub const SYNCCH0: u32 = 0x1;
2062   /// Synchronous Event Channel 1.
2063   pub const SYNCCH1: u32 = 0x2;
2064   /// Asynchronous Event Channel 0.
2065   pub const ASYNCCH0: u32 = 0x3;
2066   /// Asynchronous Event Channel 1.
2067   pub const ASYNCCH1: u32 = 0x4;
2068   /// Asynchronous Event Channel 2.
2069   pub const ASYNCCH2: u32 = 0x5;
2070   /// Asynchronous Event Channel 3.
2071   pub const ASYNCCH3: u32 = 0x6;
2072}
2073
2074/// Asynchronous User Ch 10 Input Selection - Event Out 2 select
2075#[allow(non_upper_case_globals)]
2076pub mod evsys_asyncuser10 {
2077   /// Off.
2078   pub const OFF: u32 = 0x0;
2079   /// Synchronous Event Channel 0.
2080   pub const SYNCCH0: u32 = 0x1;
2081   /// Synchronous Event Channel 1.
2082   pub const SYNCCH1: u32 = 0x2;
2083   /// Asynchronous Event Channel 0.
2084   pub const ASYNCCH0: u32 = 0x3;
2085   /// Asynchronous Event Channel 1.
2086   pub const ASYNCCH1: u32 = 0x4;
2087   /// Asynchronous Event Channel 2.
2088   pub const ASYNCCH2: u32 = 0x5;
2089   /// Asynchronous Event Channel 3.
2090   pub const ASYNCCH3: u32 = 0x6;
2091}
2092
2093/// Asynchronous User Ch 2 Input Selection - CCL LUT0 Event 0 select
2094#[allow(non_upper_case_globals)]
2095pub mod evsys_asyncuser2 {
2096   /// Off.
2097   pub const OFF: u32 = 0x0;
2098   /// Synchronous Event Channel 0.
2099   pub const SYNCCH0: u32 = 0x1;
2100   /// Synchronous Event Channel 1.
2101   pub const SYNCCH1: u32 = 0x2;
2102   /// Asynchronous Event Channel 0.
2103   pub const ASYNCCH0: u32 = 0x3;
2104   /// Asynchronous Event Channel 1.
2105   pub const ASYNCCH1: u32 = 0x4;
2106   /// Asynchronous Event Channel 2.
2107   pub const ASYNCCH2: u32 = 0x5;
2108   /// Asynchronous Event Channel 3.
2109   pub const ASYNCCH3: u32 = 0x6;
2110}
2111
2112/// Asynchronous User Ch 3 Input Selection - CCL LUT1 Event 0 select
2113#[allow(non_upper_case_globals)]
2114pub mod evsys_asyncuser3 {
2115   /// Off.
2116   pub const OFF: u32 = 0x0;
2117   /// Synchronous Event Channel 0.
2118   pub const SYNCCH0: u32 = 0x1;
2119   /// Synchronous Event Channel 1.
2120   pub const SYNCCH1: u32 = 0x2;
2121   /// Asynchronous Event Channel 0.
2122   pub const ASYNCCH0: u32 = 0x3;
2123   /// Asynchronous Event Channel 1.
2124   pub const ASYNCCH1: u32 = 0x4;
2125   /// Asynchronous Event Channel 2.
2126   pub const ASYNCCH2: u32 = 0x5;
2127   /// Asynchronous Event Channel 3.
2128   pub const ASYNCCH3: u32 = 0x6;
2129}
2130
2131/// synchronous User Ch 4 Input Selection - CCL LUT0 Event 1 select
2132#[allow(non_upper_case_globals)]
2133pub mod evsys_asyncuser4 {
2134   /// Off.
2135   pub const OFF: u32 = 0x0;
2136   /// Synchronous Event Channel 0.
2137   pub const SYNCCH0: u32 = 0x1;
2138   /// Synchronous Event Channel 1.
2139   pub const SYNCCH1: u32 = 0x2;
2140   /// Asynchronous Event Channel 0.
2141   pub const ASYNCCH0: u32 = 0x3;
2142   /// Asynchronous Event Channel 1.
2143   pub const ASYNCCH1: u32 = 0x4;
2144   /// Asynchronous Event Channel 2.
2145   pub const ASYNCCH2: u32 = 0x5;
2146   /// Asynchronous Event Channel 3.
2147   pub const ASYNCCH3: u32 = 0x6;
2148}
2149
2150/// Asynchronous User Ch 5 Input Selection - CCL LUT1 Event 1 select
2151#[allow(non_upper_case_globals)]
2152pub mod evsys_asyncuser5 {
2153   /// Off.
2154   pub const OFF: u32 = 0x0;
2155   /// Synchronous Event Channel 0.
2156   pub const SYNCCH0: u32 = 0x1;
2157   /// Synchronous Event Channel 1.
2158   pub const SYNCCH1: u32 = 0x2;
2159   /// Asynchronous Event Channel 0.
2160   pub const ASYNCCH0: u32 = 0x3;
2161   /// Asynchronous Event Channel 1.
2162   pub const ASYNCCH1: u32 = 0x4;
2163   /// Asynchronous Event Channel 2.
2164   pub const ASYNCCH2: u32 = 0x5;
2165   /// Asynchronous Event Channel 3.
2166   pub const ASYNCCH3: u32 = 0x6;
2167}
2168
2169/// Asynchronous User Ch 6 Input Selection - TCD0 Event 0 select
2170#[allow(non_upper_case_globals)]
2171pub mod evsys_asyncuser6 {
2172   /// Off.
2173   pub const OFF: u32 = 0x0;
2174   /// Synchronous Event Channel 0.
2175   pub const SYNCCH0: u32 = 0x1;
2176   /// Synchronous Event Channel 1.
2177   pub const SYNCCH1: u32 = 0x2;
2178   /// Asynchronous Event Channel 0.
2179   pub const ASYNCCH0: u32 = 0x3;
2180   /// Asynchronous Event Channel 1.
2181   pub const ASYNCCH1: u32 = 0x4;
2182   /// Asynchronous Event Channel 2.
2183   pub const ASYNCCH2: u32 = 0x5;
2184   /// Asynchronous Event Channel 3.
2185   pub const ASYNCCH3: u32 = 0x6;
2186}
2187
2188/// Asynchronous User Ch 7 Input Selection - TCD0 Event 1 select
2189#[allow(non_upper_case_globals)]
2190pub mod evsys_asyncuser7 {
2191   /// Off.
2192   pub const OFF: u32 = 0x0;
2193   /// Synchronous Event Channel 0.
2194   pub const SYNCCH0: u32 = 0x1;
2195   /// Synchronous Event Channel 1.
2196   pub const SYNCCH1: u32 = 0x2;
2197   /// Asynchronous Event Channel 0.
2198   pub const ASYNCCH0: u32 = 0x3;
2199   /// Asynchronous Event Channel 1.
2200   pub const ASYNCCH1: u32 = 0x4;
2201   /// Asynchronous Event Channel 2.
2202   pub const ASYNCCH2: u32 = 0x5;
2203   /// Asynchronous Event Channel 3.
2204   pub const ASYNCCH3: u32 = 0x6;
2205}
2206
2207/// Asynchronous User Ch 8 Input Selection - Event Out 0 select
2208#[allow(non_upper_case_globals)]
2209pub mod evsys_asyncuser8 {
2210   /// Off.
2211   pub const OFF: u32 = 0x0;
2212   /// Synchronous Event Channel 0.
2213   pub const SYNCCH0: u32 = 0x1;
2214   /// Synchronous Event Channel 1.
2215   pub const SYNCCH1: u32 = 0x2;
2216   /// Asynchronous Event Channel 0.
2217   pub const ASYNCCH0: u32 = 0x3;
2218   /// Asynchronous Event Channel 1.
2219   pub const ASYNCCH1: u32 = 0x4;
2220   /// Asynchronous Event Channel 2.
2221   pub const ASYNCCH2: u32 = 0x5;
2222   /// Asynchronous Event Channel 3.
2223   pub const ASYNCCH3: u32 = 0x6;
2224}
2225
2226/// Asynchronous User Ch 9 Input Selection - Event Out 1 select
2227#[allow(non_upper_case_globals)]
2228pub mod evsys_asyncuser9 {
2229   /// Off.
2230   pub const OFF: u32 = 0x0;
2231   /// Synchronous Event Channel 0.
2232   pub const SYNCCH0: u32 = 0x1;
2233   /// Synchronous Event Channel 1.
2234   pub const SYNCCH1: u32 = 0x2;
2235   /// Asynchronous Event Channel 0.
2236   pub const ASYNCCH0: u32 = 0x3;
2237   /// Asynchronous Event Channel 1.
2238   pub const ASYNCCH1: u32 = 0x4;
2239   /// Asynchronous Event Channel 2.
2240   pub const ASYNCCH2: u32 = 0x5;
2241   /// Asynchronous Event Channel 3.
2242   pub const ASYNCCH3: u32 = 0x6;
2243}
2244
2245/// Synchronous Channel 0 Generator Selection select
2246#[allow(non_upper_case_globals)]
2247pub mod evsys_syncch0 {
2248   /// Off.
2249   pub const OFF: u32 = 0x0;
2250   /// Timer/Counter B0.
2251   pub const TCB0: u32 = 0x1;
2252   /// Timer/Counter A0 overflow.
2253   pub const TCA0_OVF_LUNF: u32 = 0x2;
2254   /// Timer/Counter A0 underflow high byte (split mode).
2255   pub const TCA0_HUNF: u32 = 0x3;
2256   /// Timer/Counter A0 compare 0.
2257   pub const TCA0_CMP0: u32 = 0x4;
2258   /// Timer/Counter A0 compare 1.
2259   pub const TCA0_CMP1: u32 = 0x5;
2260   /// Timer/Counter A0 compare 2.
2261   pub const TCA0_CMP2: u32 = 0x6;
2262   /// Synchronous Event from Pin PC0.
2263   pub const PORTC_PIN0: u32 = 0x7;
2264   /// Synchronous Event from Pin PC1.
2265   pub const PORTC_PIN1: u32 = 0x8;
2266   /// Synchronous Event from Pin PC2.
2267   pub const PORTC_PIN2: u32 = 0x9;
2268   /// Synchronous Event from Pin PC3.
2269   pub const PORTC_PIN3: u32 = 0xA;
2270   /// Synchronous Event from Pin PC4.
2271   pub const PORTC_PIN4: u32 = 0xB;
2272   /// Synchronous Event from Pin PC5.
2273   pub const PORTC_PIN5: u32 = 0xC;
2274   /// Synchronous Event from Pin PA0.
2275   pub const PORTA_PIN0: u32 = 0xD;
2276   /// Synchronous Event from Pin PA1.
2277   pub const PORTA_PIN1: u32 = 0xE;
2278   /// Synchronous Event from Pin PA2.
2279   pub const PORTA_PIN2: u32 = 0xF;
2280   /// Synchronous Event from Pin PA3.
2281   pub const PORTA_PIN3: u32 = 0x10;
2282   /// Synchronous Event from Pin PA4.
2283   pub const PORTA_PIN4: u32 = 0x11;
2284   /// Synchronous Event from Pin PA5.
2285   pub const PORTA_PIN5: u32 = 0x12;
2286   /// Synchronous Event from Pin PA6.
2287   pub const PORTA_PIN6: u32 = 0x13;
2288   /// Synchronous Event from Pin PA7.
2289   pub const PORTA_PIN7: u32 = 0x14;
2290}
2291
2292/// Synchronous Channel 1 Generator Selection select
2293#[allow(non_upper_case_globals)]
2294pub mod evsys_syncch1 {
2295   /// Off.
2296   pub const OFF: u32 = 0x0;
2297   /// Timer/Counter B0.
2298   pub const TCB0: u32 = 0x1;
2299   /// Timer/Counter A0 overflow.
2300   pub const TCA0_OVF_LUNF: u32 = 0x2;
2301   /// Timer/Counter A0 underflow high byte (split mode).
2302   pub const TCA0_HUNF: u32 = 0x3;
2303   /// Timer/Counter A0 compare 0.
2304   pub const TCA0_CMP0: u32 = 0x4;
2305   /// Timer/Counter A0 compare 1.
2306   pub const TCA0_CMP1: u32 = 0x5;
2307   /// Timer/Counter A0 compare 2.
2308   pub const TCA0_CMP2: u32 = 0x6;
2309   /// Synchronous Event from Pin PB0.
2310   pub const PORTB_PIN0: u32 = 0x8;
2311   /// Synchronous Event from Pin PB1.
2312   pub const PORTB_PIN1: u32 = 0x9;
2313   /// Synchronous Event from Pin PB2.
2314   pub const PORTB_PIN2: u32 = 0xA;
2315   /// Synchronous Event from Pin PB3.
2316   pub const PORTB_PIN3: u32 = 0xB;
2317   /// Synchronous Event from Pin PB4.
2318   pub const PORTB_PIN4: u32 = 0xC;
2319   /// Synchronous Event from Pin PB5.
2320   pub const PORTB_PIN5: u32 = 0xD;
2321   /// Synchronous Event from Pin PB6.
2322   pub const PORTB_PIN6: u32 = 0xE;
2323   /// Synchronous Event from Pin PB7.
2324   pub const PORTB_PIN7: u32 = 0xF;
2325}
2326
2327/// Synchronous User Ch 0 Input Selection - TCA0 select
2328#[allow(non_upper_case_globals)]
2329pub mod evsys_syncuser0 {
2330   /// Off.
2331   pub const OFF: u32 = 0x0;
2332   /// Synchronous Event Channel 0.
2333   pub const SYNCCH0: u32 = 0x1;
2334   /// Synchronous Event Channel 1.
2335   pub const SYNCCH1: u32 = 0x2;
2336}
2337
2338/// Synchronous User Ch 1 Input Selection - USART0 select
2339#[allow(non_upper_case_globals)]
2340pub mod evsys_syncuser1 {
2341   /// Off.
2342   pub const OFF: u32 = 0x0;
2343   /// Synchronous Event Channel 0.
2344   pub const SYNCCH0: u32 = 0x1;
2345   /// Synchronous Event Channel 1.
2346   pub const SYNCCH1: u32 = 0x2;
2347}
2348
2349/// BOD Operation in Active Mode select
2350#[allow(non_upper_case_globals)]
2351pub mod fuse_active {
2352   /// Disabled.
2353   pub const DIS: u32 = 0x0;
2354   /// Enabled.
2355   pub const ENABLED: u32 = 0x1;
2356   /// Sampled.
2357   pub const SAMPLED: u32 = 0x2;
2358   /// Enabled with wake-up halted until BOD is ready.
2359   pub const ENWAKE: u32 = 0x3;
2360}
2361
2362/// CRC Source select
2363#[allow(non_upper_case_globals)]
2364pub mod fuse_crcsrc {
2365   /// The CRC is performed on the entire Flash (boot, application code and application data section).
2366   pub const FLASH: u32 = 0x0;
2367   /// The CRC is performed on the boot section of Flash.
2368   pub const BOOT: u32 = 0x1;
2369   /// The CRC is performed on the boot and application code section of Flash.
2370   pub const BOOTAPP: u32 = 0x2;
2371   /// Disable CRC.
2372   pub const NOCRC: u32 = 0x3;
2373}
2374
2375/// Frequency Select select
2376#[allow(non_upper_case_globals)]
2377pub mod fuse_freqsel {
2378   /// 16 MHz.
2379   pub const _16MHZ: u32 = 0x1;
2380   /// 20 MHz.
2381   pub const _20MHZ: u32 = 0x2;
2382}
2383
2384/// BOD Level select
2385#[allow(non_upper_case_globals)]
2386pub mod fuse_lvl {
2387   /// 1.8 V.
2388   pub const BODLEVEL0: u32 = 0x0;
2389   /// 2.1 V.
2390   pub const BODLEVEL1: u32 = 0x1;
2391   /// 2.6 V.
2392   pub const BODLEVEL2: u32 = 0x2;
2393   /// 2.9 V.
2394   pub const BODLEVEL3: u32 = 0x3;
2395   /// 3.3 V.
2396   pub const BODLEVEL4: u32 = 0x4;
2397   /// 3.7 V.
2398   pub const BODLEVEL5: u32 = 0x5;
2399   /// 4.0 V.
2400   pub const BODLEVEL6: u32 = 0x6;
2401   /// 4.2 V.
2402   pub const BODLEVEL7: u32 = 0x7;
2403}
2404
2405/// Watchdog Timeout Period select
2406#[allow(non_upper_case_globals)]
2407pub mod fuse_period {
2408   /// Watch-Dog timer Off.
2409   pub const OFF: u32 = 0x0;
2410   /// 8 cycles (8ms).
2411   pub const _8CLK: u32 = 0x1;
2412   /// 16 cycles (16ms).
2413   pub const _16CLK: u32 = 0x2;
2414   /// 32 cycles (32ms).
2415   pub const _32CLK: u32 = 0x3;
2416   /// 64 cycles (64ms).
2417   pub const _64CLK: u32 = 0x4;
2418   /// 128 cycles (0.128s).
2419   pub const _128CLK: u32 = 0x5;
2420   /// 256 cycles (0.256s).
2421   pub const _256CLK: u32 = 0x6;
2422   /// 512 cycles (0.512s).
2423   pub const _512CLK: u32 = 0x7;
2424   /// 1K cycles (1.0s).
2425   pub const _1KCLK: u32 = 0x8;
2426   /// 2K cycles (2.0s).
2427   pub const _2KCLK: u32 = 0x9;
2428   /// 4K cycles (4.1s).
2429   pub const _4KCLK: u32 = 0xA;
2430   /// 8K cycles (8.2s).
2431   pub const _8KCLK: u32 = 0xB;
2432}
2433
2434/// Reset Pin Configuration select
2435#[allow(non_upper_case_globals)]
2436pub mod fuse_rstpincfg {
2437   /// GPIO mode.
2438   pub const GPIO: u32 = 0x0;
2439   /// UPDI mode.
2440   pub const UPDI: u32 = 0x1;
2441   /// Reset mode.
2442   pub const RST: u32 = 0x2;
2443}
2444
2445/// BOD Sample Frequency select
2446#[allow(non_upper_case_globals)]
2447pub mod fuse_sampfreq {
2448   /// 1kHz sampling frequency.
2449   pub const _1KHz: u32 = 0x0;
2450   /// 125Hz sampling frequency.
2451   pub const _125Hz: u32 = 0x1;
2452}
2453
2454/// BOD Operation in Sleep Mode select
2455#[allow(non_upper_case_globals)]
2456pub mod fuse_sleep {
2457   /// Disabled.
2458   pub const DIS: u32 = 0x0;
2459   /// Enabled.
2460   pub const ENABLED: u32 = 0x1;
2461   /// Sampled.
2462   pub const SAMPLED: u32 = 0x2;
2463}
2464
2465/// Startup Time select
2466#[allow(non_upper_case_globals)]
2467pub mod fuse_sut {
2468   /// 0 ms.
2469   pub const _0MS: u32 = 0x0;
2470   /// 1 ms.
2471   pub const _1MS: u32 = 0x1;
2472   /// 2 ms.
2473   pub const _2MS: u32 = 0x2;
2474   /// 4 ms.
2475   pub const _4MS: u32 = 0x3;
2476   /// 8 ms.
2477   pub const _8MS: u32 = 0x4;
2478   /// 16 ms.
2479   pub const _16MS: u32 = 0x5;
2480   /// 32 ms.
2481   pub const _32MS: u32 = 0x6;
2482   /// 64 ms.
2483   pub const _64MS: u32 = 0x7;
2484}
2485
2486/// Watchdog Window Timeout Period select
2487#[allow(non_upper_case_globals)]
2488pub mod fuse_window {
2489   /// Window mode off.
2490   pub const OFF: u32 = 0x0;
2491   /// 8 cycles (8ms).
2492   pub const _8CLK: u32 = 0x1;
2493   /// 16 cycles (16ms).
2494   pub const _16CLK: u32 = 0x2;
2495   /// 32 cycles (32ms).
2496   pub const _32CLK: u32 = 0x3;
2497   /// 64 cycles (64ms).
2498   pub const _64CLK: u32 = 0x4;
2499   /// 128 cycles (0.128s).
2500   pub const _128CLK: u32 = 0x5;
2501   /// 256 cycles (0.256s).
2502   pub const _256CLK: u32 = 0x6;
2503   /// 512 cycles (0.512s).
2504   pub const _512CLK: u32 = 0x7;
2505   /// 1K cycles (1.0s).
2506   pub const _1KCLK: u32 = 0x8;
2507   /// 2K cycles (2.0s).
2508   pub const _2KCLK: u32 = 0x9;
2509   /// 4K cycles (4.1s).
2510   pub const _4KCLK: u32 = 0xA;
2511   /// 8K cycles (8.2s).
2512   pub const _8KCLK: u32 = 0xB;
2513}
2514
2515/// Lock Bits select
2516#[allow(non_upper_case_globals)]
2517pub mod lockbit_lb {
2518   /// Read and write lock.
2519   pub const RWLOCK: u32 = 0x3A;
2520   /// No locks.
2521   pub const NOLOCK: u32 = 0xC5;
2522}
2523
2524/// Command select
2525#[allow(non_upper_case_globals)]
2526pub mod nvmctrl_cmd {
2527   /// No Command.
2528   pub const NONE: u32 = 0x0;
2529   /// Write page.
2530   pub const PAGEWRITE: u32 = 0x1;
2531   /// Erase page.
2532   pub const PAGEERASE: u32 = 0x2;
2533   /// Erase and write page.
2534   pub const PAGEERASEWRITE: u32 = 0x3;
2535   /// Page buffer clear.
2536   pub const PAGEBUFCLR: u32 = 0x4;
2537   /// Chip erase.
2538   pub const CHIPERASE: u32 = 0x5;
2539   /// EEPROM erase.
2540   pub const EEERASE: u32 = 0x6;
2541   /// Write fuse (PDI only).
2542   pub const FUSEWRITE: u32 = 0x7;
2543}
2544
2545/// Configurable Custom Logic LUT0 select
2546#[allow(non_upper_case_globals)]
2547pub mod portmux_lut0 {
2548   /// Default pin.
2549   pub const DEFAULT: u32 = 0x0;
2550   /// Alternate pin.
2551   pub const ALTERNATE: u32 = 0x1;
2552}
2553
2554/// Configurable Custom Logic LUT1 select
2555#[allow(non_upper_case_globals)]
2556pub mod portmux_lut1 {
2557   /// Default pin.
2558   pub const DEFAULT: u32 = 0x0;
2559   /// Alternate pin.
2560   pub const ALTERNATE: u32 = 0x1;
2561}
2562
2563/// Port Multiplexer SPI0 select
2564#[allow(non_upper_case_globals)]
2565pub mod portmux_spi0 {
2566   /// Default pins.
2567   pub const DEFAULT: u32 = 0x0;
2568   /// Alternate pins.
2569   pub const ALTERNATE: u32 = 0x1;
2570}
2571
2572/// Port Multiplexer TCA0 Output 0 select
2573#[allow(non_upper_case_globals)]
2574pub mod portmux_tca00 {
2575   /// Default pin.
2576   pub const DEFAULT: u32 = 0x0;
2577   /// Alternate pin.
2578   pub const ALTERNATE: u32 = 0x1;
2579}
2580
2581/// Port Multiplexer TCA0 output 1 select
2582#[allow(non_upper_case_globals)]
2583pub mod portmux_tca01 {
2584   /// Default pin.
2585   pub const DEFAULT: u32 = 0x0;
2586   /// Alternate pin.
2587   pub const ALTERNATE: u32 = 0x1;
2588}
2589
2590/// Port Multiplexer TCA0 Output 2 select
2591#[allow(non_upper_case_globals)]
2592pub mod portmux_tca02 {
2593   /// Default pin.
2594   pub const DEFAULT: u32 = 0x0;
2595   /// Alternate pin.
2596   pub const ALTERNATE: u32 = 0x1;
2597}
2598
2599/// Port Multiplexer TCA0 Output 3 select
2600#[allow(non_upper_case_globals)]
2601pub mod portmux_tca03 {
2602   /// Default pin.
2603   pub const DEFAULT: u32 = 0x0;
2604   /// Alternate pin.
2605   pub const ALTERNATE: u32 = 0x1;
2606}
2607
2608/// Port Multiplexer TCA0 Output 4 select
2609#[allow(non_upper_case_globals)]
2610pub mod portmux_tca04 {
2611   /// Default pin.
2612   pub const DEFAULT: u32 = 0x0;
2613   /// Alternate pin.
2614   pub const ALTERNATE: u32 = 0x1;
2615}
2616
2617/// Port Multiplexer TCA0 Output 5 select
2618#[allow(non_upper_case_globals)]
2619pub mod portmux_tca05 {
2620   /// Default pin.
2621   pub const DEFAULT: u32 = 0x0;
2622   /// Alternate pin.
2623   pub const ALTERNATE: u32 = 0x1;
2624}
2625
2626/// Port Multiplexer TCB select
2627#[allow(non_upper_case_globals)]
2628pub mod portmux_tcb0 {
2629   /// Default pin.
2630   pub const DEFAULT: u32 = 0x0;
2631   /// Alternate pin.
2632   pub const ALTERNATE: u32 = 0x1;
2633}
2634
2635/// Port Multiplexer TWI0 select
2636#[allow(non_upper_case_globals)]
2637pub mod portmux_twi0 {
2638   /// Default pins.
2639   pub const DEFAULT: u32 = 0x0;
2640   /// Alternate pins.
2641   pub const ALTERNATE: u32 = 0x1;
2642}
2643
2644/// Port Multiplexer USART0 select
2645#[allow(non_upper_case_globals)]
2646pub mod portmux_usart0 {
2647   /// Default pins.
2648   pub const DEFAULT: u32 = 0x0;
2649   /// Alternate pins.
2650   pub const ALTERNATE: u32 = 0x1;
2651}
2652
2653/// Input/Sense Configuration select
2654#[allow(non_upper_case_globals)]
2655pub mod port_isc {
2656   /// Iterrupt disabled but input buffer enabled.
2657   pub const INTDISABLE: u32 = 0x0;
2658   /// Sense Both Edges.
2659   pub const BOTHEDGES: u32 = 0x1;
2660   /// Sense Rising Edge.
2661   pub const RISING: u32 = 0x2;
2662   /// Sense Falling Edge.
2663   pub const FALLING: u32 = 0x3;
2664   /// Digital Input Buffer disabled.
2665   pub const INPUT_DISABLE: u32 = 0x4;
2666   /// Sense low Level.
2667   pub const LEVEL: u32 = 0x5;
2668}
2669
2670/// Clock Select select
2671#[allow(non_upper_case_globals)]
2672pub mod rtc_clksel {
2673   /// Internal 32kHz OSC.
2674   pub const INT32K: u32 = 0x0;
2675   /// Internal 1kHz OSC.
2676   pub const INT1K: u32 = 0x1;
2677   /// 32KHz Crystal OSC.
2678   pub const TOSC32K: u32 = 0x2;
2679   /// External Clock.
2680   pub const EXTCLK: u32 = 0x3;
2681}
2682
2683/// Period select
2684#[allow(non_upper_case_globals)]
2685pub mod rtc_period {
2686   /// Off.
2687   pub const OFF: u32 = 0x0;
2688   /// RTC Clock Cycles 4.
2689   pub const CYC4: u32 = 0x1;
2690   /// RTC Clock Cycles 8.
2691   pub const CYC8: u32 = 0x2;
2692   /// RTC Clock Cycles 16.
2693   pub const CYC16: u32 = 0x3;
2694   /// RTC Clock Cycles 32.
2695   pub const CYC32: u32 = 0x4;
2696   /// RTC Clock Cycles 64.
2697   pub const CYC64: u32 = 0x5;
2698   /// RTC Clock Cycles 128.
2699   pub const CYC128: u32 = 0x6;
2700   /// RTC Clock Cycles 256.
2701   pub const CYC256: u32 = 0x7;
2702   /// RTC Clock Cycles 512.
2703   pub const CYC512: u32 = 0x8;
2704   /// RTC Clock Cycles 1024.
2705   pub const CYC1024: u32 = 0x9;
2706   /// RTC Clock Cycles 2048.
2707   pub const CYC2048: u32 = 0xA;
2708   /// RTC Clock Cycles 4096.
2709   pub const CYC4096: u32 = 0xB;
2710   /// RTC Clock Cycles 8192.
2711   pub const CYC8192: u32 = 0xC;
2712   /// RTC Clock Cycles 16384.
2713   pub const CYC16384: u32 = 0xD;
2714   /// RTC Clock Cycles 32768.
2715   pub const CYC32768: u32 = 0xE;
2716}
2717
2718/// Prescaling Factor select
2719#[allow(non_upper_case_globals)]
2720pub mod rtc_prescaler {
2721   /// RTC Clock / 1.
2722   pub const DIV1: u32 = 0x0;
2723   /// RTC Clock / 2.
2724   pub const DIV2: u32 = 0x1;
2725   /// RTC Clock / 4.
2726   pub const DIV4: u32 = 0x2;
2727   /// RTC Clock / 8.
2728   pub const DIV8: u32 = 0x3;
2729   /// RTC Clock / 16.
2730   pub const DIV16: u32 = 0x4;
2731   /// RTC Clock / 32.
2732   pub const DIV32: u32 = 0x5;
2733   /// RTC Clock / 64.
2734   pub const DIV64: u32 = 0x6;
2735   /// RTC Clock / 128.
2736   pub const DIV128: u32 = 0x7;
2737   /// RTC Clock / 256.
2738   pub const DIV256: u32 = 0x8;
2739   /// RTC Clock / 512.
2740   pub const DIV512: u32 = 0x9;
2741   /// RTC Clock / 1024.
2742   pub const DIV1024: u32 = 0xA;
2743   /// RTC Clock / 2048.
2744   pub const DIV2048: u32 = 0xB;
2745   /// RTC Clock / 4096.
2746   pub const DIV4096: u32 = 0xC;
2747   /// RTC Clock / 8192.
2748   pub const DIV8192: u32 = 0xD;
2749   /// RTC Clock / 16384.
2750   pub const DIV16384: u32 = 0xE;
2751   /// RTC Clock / 32768.
2752   pub const DIV32768: u32 = 0xF;
2753}
2754
2755/// Sleep mode select
2756#[allow(non_upper_case_globals)]
2757pub mod slpctrl_smode {
2758   /// Idle mode.
2759   pub const IDLE: u32 = 0x0;
2760   /// Standby Mode.
2761   pub const STDBY: u32 = 0x1;
2762   /// Power-down Mode.
2763   pub const PDOWN: u32 = 0x2;
2764}
2765
2766/// SPI Mode select
2767#[allow(non_upper_case_globals)]
2768pub mod spi_mode {
2769   /// SPI Mode 0.
2770   pub const _0: u32 = 0x0;
2771   /// SPI Mode 1.
2772   pub const _1: u32 = 0x1;
2773   /// SPI Mode 2.
2774   pub const _2: u32 = 0x2;
2775   /// SPI Mode 3.
2776   pub const _3: u32 = 0x3;
2777}
2778
2779/// Prescaler select
2780#[allow(non_upper_case_globals)]
2781pub mod spi_presc {
2782   /// System Clock / 4.
2783   pub const DIV4: u32 = 0x0;
2784   /// System Clock / 16.
2785   pub const DIV16: u32 = 0x1;
2786   /// System Clock / 64.
2787   pub const DIV64: u32 = 0x2;
2788   /// System Clock / 128.
2789   pub const DIV128: u32 = 0x3;
2790}
2791
2792/// Clock Selection select
2793#[allow(non_upper_case_globals)]
2794pub mod tca_single_clksel {
2795   /// System Clock.
2796   pub const DIV1: u32 = 0x0;
2797   /// System Clock / 2.
2798   pub const DIV2: u32 = 0x1;
2799   /// System Clock / 4.
2800   pub const DIV4: u32 = 0x2;
2801   /// System Clock / 8.
2802   pub const DIV8: u32 = 0x3;
2803   /// System Clock / 16.
2804   pub const DIV16: u32 = 0x4;
2805   /// System Clock / 64.
2806   pub const DIV64: u32 = 0x5;
2807   /// System Clock / 256.
2808   pub const DIV256: u32 = 0x6;
2809   /// System Clock / 1024.
2810   pub const DIV1024: u32 = 0x7;
2811}
2812
2813/// Command select
2814#[allow(non_upper_case_globals)]
2815pub mod tca_single_cmd {
2816   /// No Command.
2817   pub const NONE: u32 = 0x0;
2818   /// Force Update.
2819   pub const UPDATE: u32 = 0x1;
2820   /// Force Restart.
2821   pub const RESTART: u32 = 0x2;
2822   /// Force Hard Reset.
2823   pub const RESET: u32 = 0x3;
2824}
2825
2826/// Direction select
2827#[allow(non_upper_case_globals)]
2828pub mod tca_single_dir {
2829   /// Count up.
2830   pub const UP: u32 = 0x0;
2831   /// Count down.
2832   pub const DOWN: u32 = 0x1;
2833}
2834
2835/// Event Action select
2836#[allow(non_upper_case_globals)]
2837pub mod tca_single_evact {
2838   /// Count on positive edge event.
2839   pub const POSEDGE: u32 = 0x0;
2840   /// Count on any edge event.
2841   pub const ANYEDGE: u32 = 0x1;
2842   /// Count on prescaled clock while event line is 1.
2843   pub const HIGHLVL: u32 = 0x2;
2844   /// Count on prescaled clock. Event controls count direction. Up-count when event line is 0, down-count when event line is 1.
2845   pub const UPDOWN: u32 = 0x3;
2846}
2847
2848/// Waveform generation mode select
2849#[allow(non_upper_case_globals)]
2850pub mod tca_single_wgmode {
2851   /// Normal Mode.
2852   pub const NORMAL: u32 = 0x0;
2853   /// Frequency Generation Mode.
2854   pub const FRQ: u32 = 0x1;
2855   /// Single Slope PWM.
2856   pub const SINGLESLOPE: u32 = 0x3;
2857   /// Dual Slope PWM, overflow on TOP.
2858   pub const DSTOP: u32 = 0x5;
2859   /// Dual Slope PWM, overflow on TOP and BOTTOM.
2860   pub const DSBOTH: u32 = 0x6;
2861   /// Dual Slope PWM, overflow on BOTTOM.
2862   pub const DSBOTTOM: u32 = 0x7;
2863}
2864
2865/// Clock Selection select
2866#[allow(non_upper_case_globals)]
2867pub mod tca_split_clksel {
2868   /// System Clock.
2869   pub const DIV1: u32 = 0x0;
2870   /// System Clock / 2.
2871   pub const DIV2: u32 = 0x1;
2872   /// System Clock / 4.
2873   pub const DIV4: u32 = 0x2;
2874   /// System Clock / 8.
2875   pub const DIV8: u32 = 0x3;
2876   /// System Clock / 16.
2877   pub const DIV16: u32 = 0x4;
2878   /// System Clock / 64.
2879   pub const DIV64: u32 = 0x5;
2880   /// System Clock / 256.
2881   pub const DIV256: u32 = 0x6;
2882   /// System Clock / 1024.
2883   pub const DIV1024: u32 = 0x7;
2884}
2885
2886/// Command select
2887#[allow(non_upper_case_globals)]
2888pub mod tca_split_cmd {
2889   /// No Command.
2890   pub const NONE: u32 = 0x0;
2891   /// Force Update.
2892   pub const UPDATE: u32 = 0x1;
2893   /// Force Restart.
2894   pub const RESTART: u32 = 0x2;
2895   /// Force Hard Reset.
2896   pub const RESET: u32 = 0x3;
2897}
2898
2899/// Clock Select select
2900#[allow(non_upper_case_globals)]
2901pub mod tcb_clksel {
2902   /// CLK_PER (No Prescaling).
2903   pub const CLKDIV1: u32 = 0x0;
2904   /// CLK_PER/2 (From Prescaler).
2905   pub const CLKDIV2: u32 = 0x1;
2906   /// Use Clock from TCA.
2907   pub const CLKTCA: u32 = 0x2;
2908}
2909
2910/// Timer Mode select
2911#[allow(non_upper_case_globals)]
2912pub mod tcb_cntmode {
2913   /// Periodic Interrupt.
2914   pub const INT: u32 = 0x0;
2915   /// Periodic Timeout.
2916   pub const TIMEOUT: u32 = 0x1;
2917   /// Input Capture Event.
2918   pub const CAPT: u32 = 0x2;
2919   /// Input Capture Frequency measurement.
2920   pub const FRQ: u32 = 0x3;
2921   /// Input Capture Pulse-Width measurement.
2922   pub const PW: u32 = 0x4;
2923   /// Input Capture Frequency and Pulse-Width measurement.
2924   pub const FRQPW: u32 = 0x5;
2925   /// Single Shot.
2926   pub const SINGLE: u32 = 0x6;
2927   /// 8-bit PWM.
2928   pub const PWM8: u32 = 0x7;
2929}
2930
2931/// event action select
2932#[allow(non_upper_case_globals)]
2933pub mod tcd_action {
2934   /// Event trigger a fault.
2935   pub const FAULT: u32 = 0x0;
2936   /// Event trigger a fault and capture.
2937   pub const CAPTURE: u32 = 0x1;
2938}
2939
2940/// event config select
2941#[allow(non_upper_case_globals)]
2942pub mod tcd_cfg {
2943   /// Neither Filter nor Asynchronous Event is enabled.
2944   pub const NEITHER: u32 = 0x0;
2945   /// Input Capture Noise Cancellation Filter enabled.
2946   pub const FILTER: u32 = 0x1;
2947   /// Asynchronous Event output qualification enabled.
2948   pub const ASYNC: u32 = 0x2;
2949}
2950
2951/// clock select select
2952#[allow(non_upper_case_globals)]
2953pub mod tcd_clksel {
2954   /// 20 MHz oscillator.
2955   pub const _20MHZ: u32 = 0x0;
2956   /// External clock.
2957   pub const EXTCLK: u32 = 0x2;
2958   /// System clock.
2959   pub const SYSCLK: u32 = 0x3;
2960}
2961
2962/// Compare C output select select
2963#[allow(non_upper_case_globals)]
2964pub mod tcd_cmpcsel {
2965   /// PWM A output.
2966   pub const PWMA: u32 = 0x0;
2967   /// PWM B output.
2968   pub const PWMB: u32 = 0x1;
2969}
2970
2971/// Compare D output select select
2972#[allow(non_upper_case_globals)]
2973pub mod tcd_cmpdsel {
2974   /// PWM A output.
2975   pub const PWMA: u32 = 0x0;
2976   /// PWM B output.
2977   pub const PWMB: u32 = 0x1;
2978}
2979
2980/// counter prescaler select
2981#[allow(non_upper_case_globals)]
2982pub mod tcd_cntpres {
2983   /// Sync clock divided by 1.
2984   pub const DIV1: u32 = 0x0;
2985   /// Sync clock divided by 4.
2986   pub const DIV4: u32 = 0x1;
2987   /// Sync clock divided by 32.
2988   pub const DIV32: u32 = 0x2;
2989}
2990
2991/// dither select select
2992#[allow(non_upper_case_globals)]
2993pub mod tcd_dithersel {
2994   /// On-time ramp B.
2995   pub const ONTIMEB: u32 = 0x0;
2996   /// On-time ramp A and B.
2997   pub const ONTIMEAB: u32 = 0x1;
2998   /// Dead-time rampB.
2999   pub const DEADTIMEB: u32 = 0x2;
3000   /// Dead-time ramp A and B.
3001   pub const DEADTIMEAB: u32 = 0x3;
3002}
3003
3004/// Delay prescaler select
3005#[allow(non_upper_case_globals)]
3006pub mod tcd_dlypresc {
3007   /// No prescaling.
3008   pub const DIV1: u32 = 0x0;
3009   /// Prescale with 2.
3010   pub const DIV2: u32 = 0x1;
3011   /// Prescale with 4.
3012   pub const DIV4: u32 = 0x2;
3013   /// Prescale with 8.
3014   pub const DIV8: u32 = 0x3;
3015}
3016
3017/// Delay select select
3018#[allow(non_upper_case_globals)]
3019pub mod tcd_dlysel {
3020   /// No delay.
3021   pub const OFF: u32 = 0x0;
3022   /// Input blanking enabled.
3023   pub const INBLANK: u32 = 0x1;
3024   /// Event delay enabled.
3025   pub const EVENT: u32 = 0x2;
3026}
3027
3028/// Delay trigger select
3029#[allow(non_upper_case_globals)]
3030pub mod tcd_dlytrig {
3031   /// Compare A set.
3032   pub const CMPASET: u32 = 0x0;
3033   /// Compare A clear.
3034   pub const CMPACLR: u32 = 0x1;
3035   /// Compare B set.
3036   pub const CMPBSET: u32 = 0x2;
3037   /// Compare B clear.
3038   pub const CMPBCLR: u32 = 0x3;
3039}
3040
3041/// edge select select
3042#[allow(non_upper_case_globals)]
3043pub mod tcd_edge {
3044   /// The falling edge or low level of event generates retrigger or fault action.
3045   pub const FALL_LOW: u32 = 0x0;
3046   /// The rising edge or high level of event generates retrigger or fault action.
3047   pub const RISE_HIGH: u32 = 0x1;
3048}
3049
3050/// Input mode select
3051#[allow(non_upper_case_globals)]
3052pub mod tcd_inputmode {
3053   /// Input has no actions.
3054   pub const NONE: u32 = 0x0;
3055   /// Stop output, jump to opposite compare cycle and wait.
3056   pub const JMPWAIT: u32 = 0x1;
3057   /// Stop output, execute opposite compare cycle and wait.
3058   pub const EXECWAIT: u32 = 0x2;
3059   /// stop output, execute opposite compare cycle while fault active.
3060   pub const EXECFAULT: u32 = 0x3;
3061   /// Stop all outputs, maintain frequency.
3062   pub const FREQ: u32 = 0x4;
3063   /// Stop all outputs, execute dead time while fault active.
3064   pub const EXECDT: u32 = 0x5;
3065   /// Stop all outputs, jump to next compare cycle and wait.
3066   pub const WAIT: u32 = 0x6;
3067   /// Stop all outputs, wait for software action.
3068   pub const WAITSW: u32 = 0x7;
3069   /// Stop output on edge, jump to next compare cycle.
3070   pub const EDGETRIG: u32 = 0x8;
3071   /// Stop output on edge, maintain frequency.
3072   pub const EDGETRIGFREQ: u32 = 0x9;
3073   /// Stop output at level, maintain frequency.
3074   pub const LVLTRIGFREQ: u32 = 0xA;
3075}
3076
3077/// Syncronization prescaler select
3078#[allow(non_upper_case_globals)]
3079pub mod tcd_syncpres {
3080   /// Selevted clock source divided by 1.
3081   pub const DIV1: u32 = 0x0;
3082   /// Selevted clock source divided by 2.
3083   pub const DIV2: u32 = 0x1;
3084   /// Selevted clock source divided by 4.
3085   pub const DIV4: u32 = 0x2;
3086   /// Selevted clock source divided by 8.
3087   pub const DIV8: u32 = 0x3;
3088}
3089
3090/// Waveform generation mode select
3091#[allow(non_upper_case_globals)]
3092pub mod tcd_wgmode {
3093   /// One ramp mode.
3094   pub const ONERAMP: u32 = 0x0;
3095   /// Two ramp mode.
3096   pub const TWORAMP: u32 = 0x1;
3097   /// Four ramp mode.
3098   pub const FOURRAMP: u32 = 0x2;
3099   /// Dual slope mode.
3100   pub const DS: u32 = 0x3;
3101}
3102
3103/// Acknowledge Action select
3104#[allow(non_upper_case_globals)]
3105pub mod twi_ackact {
3106   /// Send ACK.
3107   pub const ACK: u32 = 0x0;
3108   /// Send NACK.
3109   pub const NACK: u32 = 0x1;
3110}
3111
3112/// Slave Address or Stop select
3113#[allow(non_upper_case_globals)]
3114pub mod twi_ap {
3115   /// Stop condition generated APIF.
3116   pub const STOP: u32 = 0x0;
3117   /// Address detection generated APIF.
3118   pub const ADR: u32 = 0x1;
3119}
3120
3121/// Bus State select
3122#[allow(non_upper_case_globals)]
3123pub mod twi_busstate {
3124   /// Unknown Bus State.
3125   pub const UNKNOWN: u32 = 0x0;
3126   /// Bus is Idle.
3127   pub const IDLE: u32 = 0x1;
3128   /// This Module Controls The Bus.
3129   pub const OWNER: u32 = 0x2;
3130   /// The Bus is Busy.
3131   pub const BUSY: u32 = 0x3;
3132}
3133
3134/// Command select
3135#[allow(non_upper_case_globals)]
3136pub mod twi_mcmd {
3137   /// No Action.
3138   pub const NOACT: u32 = 0x0;
3139   /// Issue Repeated Start Condition.
3140   pub const REPSTART: u32 = 0x1;
3141   /// Receive or Transmit Data, depending on DIR.
3142   pub const RECVTRANS: u32 = 0x2;
3143   /// Issue Stop Condition.
3144   pub const STOP: u32 = 0x3;
3145}
3146
3147/// Command select
3148#[allow(non_upper_case_globals)]
3149pub mod twi_scmd {
3150   /// No Action.
3151   pub const NOACT: u32 = 0x0;
3152   /// Used To Complete a Transaction.
3153   pub const COMPTRANS: u32 = 0x2;
3154   /// Used in Response to Address/Data Interrupt.
3155   pub const RESPONSE: u32 = 0x3;
3156}
3157
3158/// SDA Hold Time select
3159#[allow(non_upper_case_globals)]
3160pub mod twi_sdahold {
3161   /// SDA hold time off.
3162   pub const OFF: u32 = 0x0;
3163   /// Typical 50ns hold time.
3164   pub const _50NS: u32 = 0x1;
3165   /// Typical 300ns hold time.
3166   pub const _300NS: u32 = 0x2;
3167   /// Typical 500ns hold time.
3168   pub const _500NS: u32 = 0x3;
3169}
3170
3171/// SDA Setup Time select
3172#[allow(non_upper_case_globals)]
3173pub mod twi_sdasetup {
3174   /// SDA setup time is 4 clock cycles.
3175   pub const _4CYC: u32 = 0x0;
3176   /// SDA setup time is 8 clock cycles.
3177   pub const _8CYC: u32 = 0x1;
3178}
3179
3180/// Inactive Bus Timeout select
3181#[allow(non_upper_case_globals)]
3182pub mod twi_timeout {
3183   /// Bus Timeout Disabled.
3184   pub const DISABLED: u32 = 0x0;
3185   /// 50 Microseconds.
3186   pub const _50US: u32 = 0x1;
3187   /// 100 Microseconds.
3188   pub const _100US: u32 = 0x2;
3189   /// 200 Microseconds.
3190   pub const _200US: u32 = 0x3;
3191}
3192
3193/// Communication Mode select
3194#[allow(non_upper_case_globals)]
3195pub mod usart_mspi_cmode {
3196   /// Asynchronous Mode.
3197   pub const ASYNCHRONOUS: u32 = 0x0;
3198   /// Synchronous Mode.
3199   pub const SYNCHRONOUS: u32 = 0x1;
3200   /// Infrared Communication.
3201   pub const IRCOM: u32 = 0x2;
3202   /// Master SPI Mode.
3203   pub const MSPI: u32 = 0x3;
3204}
3205
3206/// Character Size select
3207#[allow(non_upper_case_globals)]
3208pub mod usart_normal_chsize {
3209   /// Character size: 5 bit.
3210   pub const _5BIT: u32 = 0x0;
3211   /// Character size: 6 bit.
3212   pub const _6BIT: u32 = 0x1;
3213   /// Character size: 7 bit.
3214   pub const _7BIT: u32 = 0x2;
3215   /// Character size: 8 bit.
3216   pub const _8BIT: u32 = 0x3;
3217   /// Character size: 9 bit read low byte first.
3218   pub const _9BITL: u32 = 0x6;
3219   /// Character size: 9 bit read high byte first.
3220   pub const _9BITH: u32 = 0x7;
3221}
3222
3223/// Communication Mode select
3224#[allow(non_upper_case_globals)]
3225pub mod usart_normal_cmode {
3226   /// Asynchronous Mode.
3227   pub const ASYNCHRONOUS: u32 = 0x0;
3228   /// Synchronous Mode.
3229   pub const SYNCHRONOUS: u32 = 0x1;
3230   /// Infrared Communication.
3231   pub const IRCOM: u32 = 0x2;
3232   /// Master SPI Mode.
3233   pub const MSPI: u32 = 0x3;
3234}
3235
3236/// Parity Mode select
3237#[allow(non_upper_case_globals)]
3238pub mod usart_normal_pmode {
3239   /// No Parity.
3240   pub const DISABLED: u32 = 0x0;
3241   /// Even Parity.
3242   pub const EVEN: u32 = 0x2;
3243   /// Odd Parity.
3244   pub const ODD: u32 = 0x3;
3245}
3246
3247/// Stop Bit Mode select
3248#[allow(non_upper_case_globals)]
3249pub mod usart_normal_sbmode {
3250   /// 1 stop bit.
3251   pub const _1BIT: u32 = 0x0;
3252   /// 2 stop bits.
3253   pub const _2BIT: u32 = 0x1;
3254}
3255
3256/// RS485 Mode internal transmitter select
3257#[allow(non_upper_case_globals)]
3258pub mod usart_rs485 {
3259   /// RS485 Mode disabled.
3260   pub const OFF: u32 = 0x0;
3261   /// RS485 Mode External drive.
3262   pub const EXT: u32 = 0x1;
3263   /// RS485 Mode Internal drive.
3264   pub const INT: u32 = 0x2;
3265}
3266
3267/// Receiver Mode select
3268#[allow(non_upper_case_globals)]
3269pub mod usart_rxmode {
3270   /// Normal mode.
3271   pub const NORMAL: u32 = 0x0;
3272   /// CLK2x mode.
3273   pub const CLK2X: u32 = 0x1;
3274   /// Generic autobaud mode.
3275   pub const GENAUTO: u32 = 0x2;
3276   /// LIN constrained autobaud mode.
3277   pub const LINAUTO: u32 = 0x3;
3278}
3279
3280/// ADC0 reference select select
3281#[allow(non_upper_case_globals)]
3282pub mod vref_adc0refsel {
3283   /// Voltage reference at 0.55V.
3284   pub const _0V55: u32 = 0x0;
3285   /// Voltage reference at 1.1V.
3286   pub const _1V1: u32 = 0x1;
3287   /// Voltage reference at 2.5V.
3288   pub const _2V5: u32 = 0x2;
3289   /// Voltage reference at 4.34V.
3290   pub const _4V34: u32 = 0x3;
3291   /// Voltage reference at 1.5V.
3292   pub const _1V5: u32 = 0x4;
3293}
3294
3295/// DAC0/AC0 reference select select
3296#[allow(non_upper_case_globals)]
3297pub mod vref_dac0refsel {
3298   /// Voltage reference at 0.55V.
3299   pub const _0V55: u32 = 0x0;
3300   /// Voltage reference at 1.1V.
3301   pub const _1V1: u32 = 0x1;
3302   /// Voltage reference at 2.5V.
3303   pub const _2V5: u32 = 0x2;
3304   /// Voltage reference at 4.34V.
3305   pub const _4V34: u32 = 0x3;
3306   /// Voltage reference at 1.5V.
3307   pub const _1V5: u32 = 0x4;
3308}
3309
3310/// Period select
3311#[allow(non_upper_case_globals)]
3312pub mod wdt_period {
3313   /// Watch-Dog timer Off.
3314   pub const OFF: u32 = 0x0;
3315   /// 8 cycles (8ms).
3316   pub const _8CLK: u32 = 0x1;
3317   /// 16 cycles (16ms).
3318   pub const _16CLK: u32 = 0x2;
3319   /// 32 cycles (32ms).
3320   pub const _32CLK: u32 = 0x3;
3321   /// 64 cycles (64ms).
3322   pub const _64CLK: u32 = 0x4;
3323   /// 128 cycles (0.128s).
3324   pub const _128CLK: u32 = 0x5;
3325   /// 256 cycles (0.256s).
3326   pub const _256CLK: u32 = 0x6;
3327   /// 512 cycles (0.512s).
3328   pub const _512CLK: u32 = 0x7;
3329   /// 1K cycles (1.0s).
3330   pub const _1KCLK: u32 = 0x8;
3331   /// 2K cycles (2.0s).
3332   pub const _2KCLK: u32 = 0x9;
3333   /// 4K cycles (4.1s).
3334   pub const _4KCLK: u32 = 0xA;
3335   /// 8K cycles (8.2s).
3336   pub const _8KCLK: u32 = 0xB;
3337}
3338
3339/// Window select
3340#[allow(non_upper_case_globals)]
3341pub mod wdt_window {
3342   /// Window mode off.
3343   pub const OFF: u32 = 0x0;
3344   /// 8 cycles (8ms).
3345   pub const _8CLK: u32 = 0x1;
3346   /// 16 cycles (16ms).
3347   pub const _16CLK: u32 = 0x2;
3348   /// 32 cycles (32ms).
3349   pub const _32CLK: u32 = 0x3;
3350   /// 64 cycles (64ms).
3351   pub const _64CLK: u32 = 0x4;
3352   /// 128 cycles (0.128s).
3353   pub const _128CLK: u32 = 0x5;
3354   /// 256 cycles (0.256s).
3355   pub const _256CLK: u32 = 0x6;
3356   /// 512 cycles (0.512s).
3357   pub const _512CLK: u32 = 0x7;
3358   /// 1K cycles (1.0s).
3359   pub const _1KCLK: u32 = 0x8;
3360   /// 2K cycles (2.0s).
3361   pub const _2KCLK: u32 = 0x9;
3362   /// 4K cycles (4.1s).
3363   pub const _4KCLK: u32 = 0xA;
3364   /// 8K cycles (8.2s).
3365   pub const _8KCLK: u32 = 0xB;
3366}
3367