imxrt_ral/blocks/imxrt1021/
enc.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
#[doc = "Quadrature Decoder"]
#[repr(C)]
pub struct RegisterBlock {
    #[doc = "Control Register"]
    pub CTRL: crate::RWRegister<u16>,
    #[doc = "Input Filter Register"]
    pub FILT: crate::RWRegister<u16>,
    #[doc = "Watchdog Timeout Register"]
    pub WTR: crate::RWRegister<u16>,
    #[doc = "Position Difference Counter Register"]
    pub POSD: crate::RWRegister<u16>,
    #[doc = "Position Difference Hold Register"]
    pub POSDH: crate::RORegister<u16>,
    #[doc = "Revolution Counter Register"]
    pub REV: crate::RWRegister<u16>,
    #[doc = "Revolution Hold Register"]
    pub REVH: crate::RORegister<u16>,
    #[doc = "Upper Position Counter Register"]
    pub UPOS: crate::RWRegister<u16>,
    #[doc = "Lower Position Counter Register"]
    pub LPOS: crate::RWRegister<u16>,
    #[doc = "Upper Position Hold Register"]
    pub UPOSH: crate::RORegister<u16>,
    #[doc = "Lower Position Hold Register"]
    pub LPOSH: crate::RORegister<u16>,
    #[doc = "Upper Initialization Register"]
    pub UINIT: crate::RWRegister<u16>,
    #[doc = "Lower Initialization Register"]
    pub LINIT: crate::RWRegister<u16>,
    #[doc = "Input Monitor Register"]
    pub IMR: crate::RORegister<u16>,
    #[doc = "Test Register"]
    pub TST: crate::RWRegister<u16>,
    #[doc = "Control 2 Register"]
    pub CTRL2: crate::RWRegister<u16>,
    #[doc = "Upper Modulus Register"]
    pub UMOD: crate::RWRegister<u16>,
    #[doc = "Lower Modulus Register"]
    pub LMOD: crate::RWRegister<u16>,
    #[doc = "Upper Position Compare Register"]
    pub UCOMP: crate::RWRegister<u16>,
    #[doc = "Lower Position Compare Register"]
    pub LCOMP: crate::RWRegister<u16>,
}
#[doc = "Control Register"]
pub mod CTRL {
    #[doc = "Compare Interrupt Enable"]
    pub mod CMPIE {
        pub const offset: u16 = 0;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Compare interrupt is disabled"]
            pub const CMPIE_0: u16 = 0;
            #[doc = "Compare interrupt is enabled"]
            pub const CMPIE_1: u16 = 0x01;
        }
    }
    #[doc = "Compare Interrupt Request"]
    pub mod CMPIRQ {
        pub const offset: u16 = 1;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "No match has occurred"]
            pub const CMPIRQ_0: u16 = 0;
            #[doc = "COMP match has occurred"]
            pub const CMPIRQ_1: u16 = 0x01;
        }
    }
    #[doc = "Watchdog Enable"]
    pub mod WDE {
        pub const offset: u16 = 2;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Watchdog timer is disabled"]
            pub const WDE_0: u16 = 0;
            #[doc = "Watchdog timer is enabled"]
            pub const WDE_1: u16 = 0x01;
        }
    }
    #[doc = "Watchdog Timeout Interrupt Enable"]
    pub mod DIE {
        pub const offset: u16 = 3;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Watchdog timer interrupt is disabled"]
            pub const DIE_0: u16 = 0;
            #[doc = "Watchdog timer interrupt is enabled"]
            pub const DIE_1: u16 = 0x01;
        }
    }
    #[doc = "Watchdog Timeout Interrupt Request"]
    pub mod DIRQ {
        pub const offset: u16 = 4;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "No interrupt has occurred"]
            pub const DIRQ_0: u16 = 0;
            #[doc = "Watchdog timeout interrupt has occurred"]
            pub const DIRQ_1: u16 = 0x01;
        }
    }
    #[doc = "Use Negative Edge of INDEX Pulse"]
    pub mod XNE {
        pub const offset: u16 = 5;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Use positive transition edge of INDEX pulse"]
            pub const XNE_0: u16 = 0;
            #[doc = "Use negative transition edge of INDEX pulse"]
            pub const XNE_1: u16 = 0x01;
        }
    }
    #[doc = "INDEX Triggered Initialization of Position Counters UPOS and LPOS"]
    pub mod XIP {
        pub const offset: u16 = 6;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "No action"]
            pub const XIP_0: u16 = 0;
            #[doc = "INDEX pulse initializes the position counter"]
            pub const XIP_1: u16 = 0x01;
        }
    }
    #[doc = "INDEX Pulse Interrupt Enable"]
    pub mod XIE {
        pub const offset: u16 = 7;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "INDEX pulse interrupt is disabled"]
            pub const XIE_0: u16 = 0;
            #[doc = "INDEX pulse interrupt is enabled"]
            pub const XIE_1: u16 = 0x01;
        }
    }
    #[doc = "INDEX Pulse Interrupt Request"]
    pub mod XIRQ {
        pub const offset: u16 = 8;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "No interrupt has occurred"]
            pub const XIRQ_0: u16 = 0;
            #[doc = "INDEX pulse interrupt has occurred"]
            pub const XIRQ_1: u16 = 0x01;
        }
    }
    #[doc = "Enable Signal Phase Count Mode"]
    pub mod PH1 {
        pub const offset: u16 = 9;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Use standard quadrature decoder where PHASEA and PHASEB represent a two phase quadrature signal."]
            pub const PH1_0: u16 = 0;
            #[doc = "Bypass the quadrature decoder. A positive transition of the PHASEA input generates a count signal. The PHASEB input and the REV bit control the counter direction. If CTRL\\[REV\\] = 0, PHASEB = 0, then count up If CTRL\\[REV\\] = 0, PHASEB = 1, then count down If CTRL\\[REV\\] = 1, PHASEB = 0, then count down If CTRL\\[REV\\] = 1, PHASEB = 1, then count up"]
            pub const PH1_1: u16 = 0x01;
        }
    }
    #[doc = "Enable Reverse Direction Counting"]
    pub mod REV {
        pub const offset: u16 = 10;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Count normally"]
            pub const REV_0: u16 = 0;
            #[doc = "Count in the reverse direction"]
            pub const REV_1: u16 = 0x01;
        }
    }
    #[doc = "Software Triggered Initialization of Position Counters UPOS and LPOS"]
    pub mod SWIP {
        pub const offset: u16 = 11;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "No action"]
            pub const SWIP_0: u16 = 0;
            #[doc = "Initialize position counter"]
            pub const SWIP_1: u16 = 0x01;
        }
    }
    #[doc = "Use Negative Edge of HOME Input"]
    pub mod HNE {
        pub const offset: u16 = 12;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Use positive going edge-to-trigger initialization of position counters UPOS and LPOS"]
            pub const HNE_0: u16 = 0;
            #[doc = "Use negative going edge-to-trigger initialization of position counters UPOS and LPOS"]
            pub const HNE_1: u16 = 0x01;
        }
    }
    #[doc = "Enable HOME to Initialize Position Counters UPOS and LPOS"]
    pub mod HIP {
        pub const offset: u16 = 13;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "No action"]
            pub const HIP_0: u16 = 0;
            #[doc = "HOME signal initializes the position counter"]
            pub const HIP_1: u16 = 0x01;
        }
    }
    #[doc = "HOME Interrupt Enable"]
    pub mod HIE {
        pub const offset: u16 = 14;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disable HOME interrupts"]
            pub const HIE_0: u16 = 0;
            #[doc = "Enable HOME interrupts"]
            pub const HIE_1: u16 = 0x01;
        }
    }
    #[doc = "HOME Signal Transition Interrupt Request"]
    pub mod HIRQ {
        pub const offset: u16 = 15;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "No interrupt"]
            pub const HIRQ_0: u16 = 0;
            #[doc = "HOME signal transition interrupt request"]
            pub const HIRQ_1: u16 = 0x01;
        }
    }
}
#[doc = "Input Filter Register"]
pub mod FILT {
    #[doc = "Input Filter Sample Period"]
    pub mod FILT_PER {
        pub const offset: u16 = 0;
        pub const mask: u16 = 0xff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Input Filter Sample Count"]
    pub mod FILT_CNT {
        pub const offset: u16 = 8;
        pub const mask: u16 = 0x07 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Clock prescaler value"]
    pub mod FILT_PRSC {
        pub const offset: u16 = 13;
        pub const mask: u16 = 0x07 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "Watchdog Timeout Register"]
pub mod WTR {
    #[doc = "WDOG\\[15:0\\] is a binary representation of the number of clock cycles plus one that the watchdog timer counts before timing out and optionally generating an interrupt"]
    pub mod WDOG {
        pub const offset: u16 = 0;
        pub const mask: u16 = 0xffff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "Position Difference Counter Register"]
pub mod POSD {
    #[doc = "This read/write register contains the position change in value occurring between each read of the position register"]
    pub mod POSD {
        pub const offset: u16 = 0;
        pub const mask: u16 = 0xffff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "Position Difference Hold Register"]
pub mod POSDH {
    #[doc = "This read-only register contains a snapshot of the value of the POSD register"]
    pub mod POSDH {
        pub const offset: u16 = 0;
        pub const mask: u16 = 0xffff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "Revolution Counter Register"]
pub mod REV {
    #[doc = "This read/write register contains the current value of the revolution counter."]
    pub mod REV {
        pub const offset: u16 = 0;
        pub const mask: u16 = 0xffff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "Revolution Hold Register"]
pub mod REVH {
    #[doc = "This read-only register contains a snapshot of the value of the REV register."]
    pub mod REVH {
        pub const offset: u16 = 0;
        pub const mask: u16 = 0xffff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "Upper Position Counter Register"]
pub mod UPOS {
    #[doc = "This read/write register contains the upper (most significant) half of the position counter"]
    pub mod POS {
        pub const offset: u16 = 0;
        pub const mask: u16 = 0xffff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "Lower Position Counter Register"]
pub mod LPOS {
    #[doc = "This read/write register contains the lower (least significant) half of the position counter"]
    pub mod POS {
        pub const offset: u16 = 0;
        pub const mask: u16 = 0xffff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "Upper Position Hold Register"]
pub mod UPOSH {
    #[doc = "This read-only register contains a snapshot of the UPOS register."]
    pub mod POSH {
        pub const offset: u16 = 0;
        pub const mask: u16 = 0xffff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "Lower Position Hold Register"]
pub mod LPOSH {
    #[doc = "This read-only register contains a snapshot of the LPOS register."]
    pub mod POSH {
        pub const offset: u16 = 0;
        pub const mask: u16 = 0xffff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "Upper Initialization Register"]
pub mod UINIT {
    #[doc = "This read/write register contains the value to be used to initialize the upper half of the position counter (UPOS)"]
    pub mod INIT {
        pub const offset: u16 = 0;
        pub const mask: u16 = 0xffff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "Lower Initialization Register"]
pub mod LINIT {
    #[doc = "This read/write register contains the value to be used to initialize the lower half of the position counter (LPOS)"]
    pub mod INIT {
        pub const offset: u16 = 0;
        pub const mask: u16 = 0xffff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "Input Monitor Register"]
pub mod IMR {
    #[doc = "This is the raw HOME input."]
    pub mod HOME {
        pub const offset: u16 = 0;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "This is the raw INDEX input."]
    pub mod INDEX {
        pub const offset: u16 = 1;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "This is the raw PHASEB input."]
    pub mod PHB {
        pub const offset: u16 = 2;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "This is the raw PHASEA input."]
    pub mod PHA {
        pub const offset: u16 = 3;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "This is the filtered version of HOME input."]
    pub mod FHOM {
        pub const offset: u16 = 4;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "This is the filtered version of INDEX input."]
    pub mod FIND {
        pub const offset: u16 = 5;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "This is the filtered version of PHASEB input."]
    pub mod FPHB {
        pub const offset: u16 = 6;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "This is the filtered version of PHASEA input."]
    pub mod FPHA {
        pub const offset: u16 = 7;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "Test Register"]
pub mod TST {
    #[doc = "These bits hold the number of quadrature advances to generate."]
    pub mod TEST_COUNT {
        pub const offset: u16 = 0;
        pub const mask: u16 = 0xff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "These bits hold the period of quadrature phase in IPBus clock cycles."]
    pub mod TEST_PERIOD {
        pub const offset: u16 = 8;
        pub const mask: u16 = 0x1f << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Quadrature Decoder Negative Signal"]
    pub mod QDN {
        pub const offset: u16 = 13;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Leaves quadrature decoder signal in a positive direction"]
            pub const QDN_0: u16 = 0;
            #[doc = "Generates a negative quadrature decoder signal"]
            pub const QDN_1: u16 = 0x01;
        }
    }
    #[doc = "Test Counter Enable"]
    pub mod TCE {
        pub const offset: u16 = 14;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Test count is not enabled"]
            pub const TCE_0: u16 = 0;
            #[doc = "Test count is enabled"]
            pub const TCE_1: u16 = 0x01;
        }
    }
    #[doc = "Test Mode Enable"]
    pub mod TEN {
        pub const offset: u16 = 15;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Test module is not enabled"]
            pub const TEN_0: u16 = 0;
            #[doc = "Test module is enabled"]
            pub const TEN_1: u16 = 0x01;
        }
    }
}
#[doc = "Control 2 Register"]
pub mod CTRL2 {
    #[doc = "Update Hold Registers"]
    pub mod UPDHLD {
        pub const offset: u16 = 0;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disable updates of hold registers on rising edge of TRIGGER"]
            pub const UPDHLD_0: u16 = 0;
            #[doc = "Enable updates of hold registers on rising edge of TRIGGER"]
            pub const UPDHLD_1: u16 = 0x01;
        }
    }
    #[doc = "Update Position Registers"]
    pub mod UPDPOS {
        pub const offset: u16 = 1;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "No action for POSD, REV, UPOS and LPOS on rising edge of TRIGGER"]
            pub const UPDPOS_0: u16 = 0;
            #[doc = "Clear POSD, REV, UPOS and LPOS on rising edge of TRIGGER"]
            pub const UPDPOS_1: u16 = 0x01;
        }
    }
    #[doc = "Enable Modulo Counting"]
    pub mod MOD {
        pub const offset: u16 = 2;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disable modulo counting"]
            pub const MOD_0: u16 = 0;
            #[doc = "Enable modulo counting"]
            pub const MOD_1: u16 = 0x01;
        }
    }
    #[doc = "Count Direction Flag"]
    pub mod DIR {
        pub const offset: u16 = 3;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Last count was in the down direction"]
            pub const DIR_0: u16 = 0;
            #[doc = "Last count was in the up direction"]
            pub const DIR_1: u16 = 0x01;
        }
    }
    #[doc = "Roll-under Interrupt Enable"]
    pub mod RUIE {
        pub const offset: u16 = 4;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Roll-under interrupt is disabled"]
            pub const RUIE_0: u16 = 0;
            #[doc = "Roll-under interrupt is enabled"]
            pub const RUIE_1: u16 = 0x01;
        }
    }
    #[doc = "Roll-under Interrupt Request"]
    pub mod RUIRQ {
        pub const offset: u16 = 5;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "No roll-under has occurred"]
            pub const RUIRQ_0: u16 = 0;
            #[doc = "Roll-under has occurred"]
            pub const RUIRQ_1: u16 = 0x01;
        }
    }
    #[doc = "Roll-over Interrupt Enable"]
    pub mod ROIE {
        pub const offset: u16 = 6;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Roll-over interrupt is disabled"]
            pub const ROIE_0: u16 = 0;
            #[doc = "Roll-over interrupt is enabled"]
            pub const ROIE_1: u16 = 0x01;
        }
    }
    #[doc = "Roll-over Interrupt Request"]
    pub mod ROIRQ {
        pub const offset: u16 = 7;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "No roll-over has occurred"]
            pub const ROIRQ_0: u16 = 0;
            #[doc = "Roll-over has occurred"]
            pub const ROIRQ_1: u16 = 0x01;
        }
    }
    #[doc = "Revolution Counter Modulus Enable"]
    pub mod REVMOD {
        pub const offset: u16 = 8;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Use INDEX pulse to increment/decrement revolution counter (REV)."]
            pub const REVMOD_0: u16 = 0;
            #[doc = "Use modulus counting roll-over/under to increment/decrement revolution counter (REV)."]
            pub const REVMOD_1: u16 = 0x01;
        }
    }
    #[doc = "Output Control"]
    pub mod OUTCTL {
        pub const offset: u16 = 9;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "POSMATCH pulses when a match occurs between the position counters (POS) and the compare value (COMP)."]
            pub const OUTCTL_0: u16 = 0;
            #[doc = "POSMATCH pulses when the UPOS, LPOS, REV, or POSD registers are read."]
            pub const OUTCTL_1: u16 = 0x01;
        }
    }
    #[doc = "Simultaneous PHASEA and PHASEB Change Interrupt Enable"]
    pub mod SABIE {
        pub const offset: u16 = 10;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Simultaneous PHASEA and PHASEB change interrupt disabled."]
            pub const SABIE_0: u16 = 0;
            #[doc = "Simultaneous PHASEA and PHASEB change interrupt enabled."]
            pub const SABIE_1: u16 = 0x01;
        }
    }
    #[doc = "Simultaneous PHASEA and PHASEB Change Interrupt Request"]
    pub mod SABIRQ {
        pub const offset: u16 = 11;
        pub const mask: u16 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "No simultaneous change of PHASEA and PHASEB has occurred."]
            pub const SABIRQ_0: u16 = 0;
            #[doc = "A simultaneous change of PHASEA and PHASEB has occurred."]
            pub const SABIRQ_1: u16 = 0x01;
        }
    }
}
#[doc = "Upper Modulus Register"]
pub mod UMOD {
    #[doc = "This read/write register contains the upper (most significant) half of the modulus register"]
    pub mod MOD {
        pub const offset: u16 = 0;
        pub const mask: u16 = 0xffff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "Lower Modulus Register"]
pub mod LMOD {
    #[doc = "This read/write register contains the lower (least significant) half of the modulus register"]
    pub mod MOD {
        pub const offset: u16 = 0;
        pub const mask: u16 = 0xffff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "Upper Position Compare Register"]
pub mod UCOMP {
    #[doc = "This read/write register contains the upper (most significant) half of the position compare register"]
    pub mod COMP {
        pub const offset: u16 = 0;
        pub const mask: u16 = 0xffff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "Lower Position Compare Register"]
pub mod LCOMP {
    #[doc = "This read/write register contains the lower (least significant) half of the position compare register"]
    pub mod COMP {
        pub const offset: u16 = 0;
        pub const mask: u16 = 0xffff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}