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