imxrt_ral/blocks/imxrt1011/
lpspi.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
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
#[doc = "LPSPI"]
#[repr(C)]
pub struct RegisterBlock {
    #[doc = "Version ID Register"]
    pub VERID: crate::RORegister<u32>,
    #[doc = "Parameter Register"]
    pub PARAM: crate::RORegister<u32>,
    _reserved0: [u8; 0x08],
    #[doc = "Control Register"]
    pub CR: crate::RWRegister<u32>,
    #[doc = "Status Register"]
    pub SR: crate::RWRegister<u32>,
    #[doc = "Interrupt Enable Register"]
    pub IER: crate::RWRegister<u32>,
    #[doc = "DMA Enable Register"]
    pub DER: crate::RWRegister<u32>,
    #[doc = "Configuration Register 0"]
    pub CFGR0: crate::RWRegister<u32>,
    #[doc = "Configuration Register 1"]
    pub CFGR1: crate::RWRegister<u32>,
    _reserved1: [u8; 0x08],
    #[doc = "Data Match Register 0"]
    pub DMR0: crate::RWRegister<u32>,
    #[doc = "Data Match Register 1"]
    pub DMR1: crate::RWRegister<u32>,
    _reserved2: [u8; 0x08],
    #[doc = "Clock Configuration Register"]
    pub CCR: crate::RWRegister<u32>,
    _reserved3: [u8; 0x14],
    #[doc = "FIFO Control Register"]
    pub FCR: crate::RWRegister<u32>,
    #[doc = "FIFO Status Register"]
    pub FSR: crate::RORegister<u32>,
    #[doc = "Transmit Command Register"]
    pub TCR: crate::RWRegister<u32>,
    #[doc = "Transmit Data Register"]
    pub TDR: crate::WORegister<u32>,
    _reserved4: [u8; 0x08],
    #[doc = "Receive Status Register"]
    pub RSR: crate::RORegister<u32>,
    #[doc = "Receive Data Register"]
    pub RDR: crate::RORegister<u32>,
}
#[doc = "Version ID Register"]
pub mod VERID {
    #[doc = "Module Identification Number"]
    pub mod FEATURE {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0xffff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Standard feature set supporting a 32-bit shift register."]
            pub const FEATURE_4: u32 = 0x04;
        }
    }
    #[doc = "Minor Version Number"]
    pub mod MINOR {
        pub const offset: u32 = 16;
        pub const mask: u32 = 0xff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Major Version Number"]
    pub mod MAJOR {
        pub const offset: u32 = 24;
        pub const mask: u32 = 0xff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "Parameter Register"]
pub mod PARAM {
    #[doc = "Transmit FIFO Size"]
    pub mod TXFIFO {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0xff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Receive FIFO Size"]
    pub mod RXFIFO {
        pub const offset: u32 = 8;
        pub const mask: u32 = 0xff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "PCS Number"]
    pub mod PCSNUM {
        pub const offset: u32 = 16;
        pub const mask: u32 = 0xff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "Control Register"]
pub mod CR {
    #[doc = "Module Enable"]
    pub mod MEN {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Module is disabled"]
            pub const MEN_0: u32 = 0;
            #[doc = "Module is enabled"]
            pub const MEN_1: u32 = 0x01;
        }
    }
    #[doc = "Software Reset"]
    pub mod RST {
        pub const offset: u32 = 1;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Module is not reset"]
            pub const RST_0: u32 = 0;
            #[doc = "Module is reset"]
            pub const RST_1: u32 = 0x01;
        }
    }
    #[doc = "Doze Mode Enable"]
    pub mod DOZEN {
        pub const offset: u32 = 2;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "LPSPI module is enabled in Doze mode"]
            pub const DOZEN_0: u32 = 0;
            #[doc = "LPSPI module is disabled in Doze mode"]
            pub const DOZEN_1: u32 = 0x01;
        }
    }
    #[doc = "Debug Enable"]
    pub mod DBGEN {
        pub const offset: u32 = 3;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "LPSPI module is disabled in debug mode"]
            pub const DBGEN_0: u32 = 0;
            #[doc = "LPSPI module is enabled in debug mode"]
            pub const DBGEN_1: u32 = 0x01;
        }
    }
    #[doc = "Reset Transmit FIFO"]
    pub mod RTF {
        pub const offset: u32 = 8;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "No effect"]
            pub const RTF_0: u32 = 0;
            #[doc = "Transmit FIFO is reset"]
            pub const RTF_1: u32 = 0x01;
        }
    }
    #[doc = "Reset Receive FIFO"]
    pub mod RRF {
        pub const offset: u32 = 9;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "No effect"]
            pub const RRF_0: u32 = 0;
            #[doc = "Receive FIFO is reset"]
            pub const RRF_1: u32 = 0x01;
        }
    }
}
#[doc = "Status Register"]
pub mod SR {
    #[doc = "Transmit Data Flag"]
    pub mod TDF {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Transmit data not requested"]
            pub const TDF_0: u32 = 0;
            #[doc = "Transmit data is requested"]
            pub const TDF_1: u32 = 0x01;
        }
    }
    #[doc = "Receive Data Flag"]
    pub mod RDF {
        pub const offset: u32 = 1;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Receive Data is not ready"]
            pub const RDF_0: u32 = 0;
            #[doc = "Receive data is ready"]
            pub const RDF_1: u32 = 0x01;
        }
    }
    #[doc = "Word Complete Flag"]
    pub mod WCF {
        pub const offset: u32 = 8;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Transfer of a received word has not yet completed"]
            pub const WCF_0: u32 = 0;
            #[doc = "Transfer of a received word has completed"]
            pub const WCF_1: u32 = 0x01;
        }
    }
    #[doc = "Frame Complete Flag"]
    pub mod FCF {
        pub const offset: u32 = 9;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Frame transfer has not completed"]
            pub const FCF_0: u32 = 0;
            #[doc = "Frame transfer has completed"]
            pub const FCF_1: u32 = 0x01;
        }
    }
    #[doc = "Transfer Complete Flag"]
    pub mod TCF {
        pub const offset: u32 = 10;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "All transfers have not completed"]
            pub const TCF_0: u32 = 0;
            #[doc = "All transfers have completed"]
            pub const TCF_1: u32 = 0x01;
        }
    }
    #[doc = "Transmit Error Flag"]
    pub mod TEF {
        pub const offset: u32 = 11;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Transmit FIFO underrun has not occurred"]
            pub const TEF_0: u32 = 0;
            #[doc = "Transmit FIFO underrun has occurred"]
            pub const TEF_1: u32 = 0x01;
        }
    }
    #[doc = "Receive Error Flag"]
    pub mod REF {
        pub const offset: u32 = 12;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Receive FIFO has not overflowed"]
            pub const REF_0: u32 = 0;
            #[doc = "Receive FIFO has overflowed"]
            pub const REF_1: u32 = 0x01;
        }
    }
    #[doc = "Data Match Flag"]
    pub mod DMF {
        pub const offset: u32 = 13;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Have not received matching data"]
            pub const DMF_0: u32 = 0;
            #[doc = "Have received matching data"]
            pub const DMF_1: u32 = 0x01;
        }
    }
    #[doc = "Module Busy Flag"]
    pub mod MBF {
        pub const offset: u32 = 24;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "LPSPI is idle"]
            pub const MBF_0: u32 = 0;
            #[doc = "LPSPI is busy"]
            pub const MBF_1: u32 = 0x01;
        }
    }
}
#[doc = "Interrupt Enable Register"]
pub mod IER {
    #[doc = "Transmit Data Interrupt Enable"]
    pub mod TDIE {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disabled"]
            pub const TDIE_0: u32 = 0;
            #[doc = "Enabled"]
            pub const TDIE_1: u32 = 0x01;
        }
    }
    #[doc = "Receive Data Interrupt Enable"]
    pub mod RDIE {
        pub const offset: u32 = 1;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disabled"]
            pub const RDIE_0: u32 = 0;
            #[doc = "Enabled"]
            pub const RDIE_1: u32 = 0x01;
        }
    }
    #[doc = "Word Complete Interrupt Enable"]
    pub mod WCIE {
        pub const offset: u32 = 8;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disabled"]
            pub const WCIE_0: u32 = 0;
            #[doc = "Enabled"]
            pub const WCIE_1: u32 = 0x01;
        }
    }
    #[doc = "Frame Complete Interrupt Enable"]
    pub mod FCIE {
        pub const offset: u32 = 9;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disabled"]
            pub const FCIE_0: u32 = 0;
            #[doc = "Enabled"]
            pub const FCIE_1: u32 = 0x01;
        }
    }
    #[doc = "Transfer Complete Interrupt Enable"]
    pub mod TCIE {
        pub const offset: u32 = 10;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disabled"]
            pub const TCIE_0: u32 = 0;
            #[doc = "Enabled"]
            pub const TCIE_1: u32 = 0x01;
        }
    }
    #[doc = "Transmit Error Interrupt Enable"]
    pub mod TEIE {
        pub const offset: u32 = 11;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disabled"]
            pub const TEIE_0: u32 = 0;
            #[doc = "Enabled"]
            pub const TEIE_1: u32 = 0x01;
        }
    }
    #[doc = "Receive Error Interrupt Enable"]
    pub mod REIE {
        pub const offset: u32 = 12;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disabled"]
            pub const REIE_0: u32 = 0;
            #[doc = "Enabled"]
            pub const REIE_1: u32 = 0x01;
        }
    }
    #[doc = "Data Match Interrupt Enable"]
    pub mod DMIE {
        pub const offset: u32 = 13;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disabled"]
            pub const DMIE_0: u32 = 0;
            #[doc = "Enabled"]
            pub const DMIE_1: u32 = 0x01;
        }
    }
}
#[doc = "DMA Enable Register"]
pub mod DER {
    #[doc = "Transmit Data DMA Enable"]
    pub mod TDDE {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "DMA request is disabled"]
            pub const TDDE_0: u32 = 0;
            #[doc = "DMA request is enabled"]
            pub const TDDE_1: u32 = 0x01;
        }
    }
    #[doc = "Receive Data DMA Enable"]
    pub mod RDDE {
        pub const offset: u32 = 1;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "DMA request is disabled"]
            pub const RDDE_0: u32 = 0;
            #[doc = "DMA request is enabled"]
            pub const RDDE_1: u32 = 0x01;
        }
    }
}
#[doc = "Configuration Register 0"]
pub mod CFGR0 {
    #[doc = "Host Request Enable"]
    pub mod HREN {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Host Request Polarity"]
    pub mod HRPOL {
        pub const offset: u32 = 1;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Host Request Select"]
    pub mod HRSEL {
        pub const offset: u32 = 2;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Circular FIFO Enable"]
    pub mod CIRFIFO {
        pub const offset: u32 = 8;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Circular FIFO is disabled"]
            pub const CIRFIFO_0: u32 = 0;
            #[doc = "Circular FIFO is enabled"]
            pub const CIRFIFO_1: u32 = 0x01;
        }
    }
    #[doc = "Receive Data Match Only"]
    pub mod RDMO {
        pub const offset: u32 = 9;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Received data is stored in the receive FIFO as in normal operations"]
            pub const RDMO_0: u32 = 0;
            #[doc = "Received data is discarded unless the Data Match Flag (DMF) is set"]
            pub const RDMO_1: u32 = 0x01;
        }
    }
}
#[doc = "Configuration Register 1"]
pub mod CFGR1 {
    #[doc = "Master Mode"]
    pub mod MASTER {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Slave mode"]
            pub const MASTER_0: u32 = 0;
            #[doc = "Master mode"]
            pub const MASTER_1: u32 = 0x01;
        }
    }
    #[doc = "Sample Point"]
    pub mod SAMPLE {
        pub const offset: u32 = 1;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Input data is sampled on SCK edge"]
            pub const SAMPLE_0: u32 = 0;
            #[doc = "Input data is sampled on delayed SCK edge"]
            pub const SAMPLE_1: u32 = 0x01;
        }
    }
    #[doc = "Automatic PCS"]
    pub mod AUTOPCS {
        pub const offset: u32 = 2;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Automatic PCS generation is disabled"]
            pub const AUTOPCS_0: u32 = 0;
            #[doc = "Automatic PCS generation is enabled"]
            pub const AUTOPCS_1: u32 = 0x01;
        }
    }
    #[doc = "No Stall"]
    pub mod NOSTALL {
        pub const offset: u32 = 3;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Transfers will stall when the transmit FIFO is empty or the receive FIFO is full"]
            pub const NOSTALL_0: u32 = 0;
            #[doc = "Transfers will not stall, allowing transmit FIFO underruns or receive FIFO overruns to occur"]
            pub const NOSTALL_1: u32 = 0x01;
        }
    }
    #[doc = "Peripheral Chip Select Polarity"]
    pub mod PCSPOL {
        pub const offset: u32 = 8;
        pub const mask: u32 = 0x0f << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Match Configuration"]
    pub mod MATCFG {
        pub const offset: u32 = 16;
        pub const mask: u32 = 0x07 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Match is disabled"]
            pub const MATCFG_0: u32 = 0;
            #[doc = "010b - Match is enabled, if 1st data word equals MATCH0 OR MATCH1, i.e., (1st data word = MATCH0 + MATCH1)"]
            pub const MATCFG_2: u32 = 0x02;
            #[doc = "011b - Match is enabled, if any data word equals MATCH0 OR MATCH1, i.e., (any data word = MATCH0 + MATCH1)"]
            pub const MATCFG_3: u32 = 0x03;
            #[doc = "100b - Match is enabled, if 1st data word equals MATCH0 AND 2nd data word equals MATCH1, i.e., \\[(1st data word = MATCH0) * (2nd data word = MATCH1)\\]"]
            pub const MATCFG_4: u32 = 0x04;
            #[doc = "101b - Match is enabled, if any data word equals MATCH0 AND the next data word equals MATCH1, i.e., \\[(any data word = MATCH0) * (next data word = MATCH1)\\]"]
            pub const MATCFG_5: u32 = 0x05;
            #[doc = "110b - Match is enabled, if (1st data word AND MATCH1) equals (MATCH0 AND MATCH1), i.e., \\[(1st data word * MATCH1) = (MATCH0 * MATCH1)\\]"]
            pub const MATCFG_6: u32 = 0x06;
            #[doc = "111b - Match is enabled, if (any data word AND MATCH1) equals (MATCH0 AND MATCH1), i.e., \\[(any data word * MATCH1) = (MATCH0 * MATCH1)\\]"]
            pub const MATCFG_7: u32 = 0x07;
        }
    }
    #[doc = "Pin Configuration"]
    pub mod PINCFG {
        pub const offset: u32 = 24;
        pub const mask: u32 = 0x03 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "SIN is used for input data and SOUT is used for output data"]
            pub const PINCFG_0: u32 = 0;
            #[doc = "SIN is used for both input and output data"]
            pub const PINCFG_1: u32 = 0x01;
            #[doc = "SOUT is used for both input and output data"]
            pub const PINCFG_2: u32 = 0x02;
            #[doc = "SOUT is used for input data and SIN is used for output data"]
            pub const PINCFG_3: u32 = 0x03;
        }
    }
    #[doc = "Output Config"]
    pub mod OUTCFG {
        pub const offset: u32 = 26;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Output data retains last value when chip select is negated"]
            pub const OUTCFG_0: u32 = 0;
            #[doc = "Output data is tristated when chip select is negated"]
            pub const OUTCFG_1: u32 = 0x01;
        }
    }
    #[doc = "Peripheral Chip Select Configuration"]
    pub mod PCSCFG {
        pub const offset: u32 = 27;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "PCS\\[3:2\\] are enabled"]
            pub const PCSCFG_0: u32 = 0;
            #[doc = "PCS\\[3:2\\] are disabled"]
            pub const PCSCFG_1: u32 = 0x01;
        }
    }
}
#[doc = "Data Match Register 0"]
pub mod DMR0 {
    #[doc = "Match 0 Value"]
    pub mod MATCH0 {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0xffff_ffff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "Data Match Register 1"]
pub mod DMR1 {
    #[doc = "Match 1 Value"]
    pub mod MATCH1 {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0xffff_ffff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "Clock Configuration Register"]
pub mod CCR {
    #[doc = "SCK Divider"]
    pub mod SCKDIV {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0xff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Delay Between Transfers"]
    pub mod DBT {
        pub const offset: u32 = 8;
        pub const mask: u32 = 0xff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "PCS-to-SCK Delay"]
    pub mod PCSSCK {
        pub const offset: u32 = 16;
        pub const mask: u32 = 0xff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "SCK-to-PCS Delay"]
    pub mod SCKPCS {
        pub const offset: u32 = 24;
        pub const mask: u32 = 0xff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "FIFO Control Register"]
pub mod FCR {
    #[doc = "Transmit FIFO Watermark"]
    pub mod TXWATER {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0x0f << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Receive FIFO Watermark"]
    pub mod RXWATER {
        pub const offset: u32 = 16;
        pub const mask: u32 = 0x0f << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "FIFO Status Register"]
pub mod FSR {
    #[doc = "Transmit FIFO Count"]
    pub mod TXCOUNT {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0x1f << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Receive FIFO Count"]
    pub mod RXCOUNT {
        pub const offset: u32 = 16;
        pub const mask: u32 = 0x1f << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "Transmit Command Register"]
pub mod TCR {
    #[doc = "Frame Size"]
    pub mod FRAMESZ {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0x0fff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Transfer Width"]
    pub mod WIDTH {
        pub const offset: u32 = 16;
        pub const mask: u32 = 0x03 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "1 bit transfer"]
            pub const WIDTH_0: u32 = 0;
            #[doc = "2 bit transfer"]
            pub const WIDTH_1: u32 = 0x01;
            #[doc = "4 bit transfer"]
            pub const WIDTH_2: u32 = 0x02;
        }
    }
    #[doc = "Transmit Data Mask"]
    pub mod TXMSK {
        pub const offset: u32 = 18;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Normal transfer"]
            pub const TXMSK_0: u32 = 0;
            #[doc = "Mask transmit data"]
            pub const TXMSK_1: u32 = 0x01;
        }
    }
    #[doc = "Receive Data Mask"]
    pub mod RXMSK {
        pub const offset: u32 = 19;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Normal transfer"]
            pub const RXMSK_0: u32 = 0;
            #[doc = "Receive data is masked"]
            pub const RXMSK_1: u32 = 0x01;
        }
    }
    #[doc = "Continuing Command"]
    pub mod CONTC {
        pub const offset: u32 = 20;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Command word for start of new transfer"]
            pub const CONTC_0: u32 = 0;
            #[doc = "Command word for continuing transfer"]
            pub const CONTC_1: u32 = 0x01;
        }
    }
    #[doc = "Continuous Transfer"]
    pub mod CONT {
        pub const offset: u32 = 21;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Continuous transfer is disabled"]
            pub const CONT_0: u32 = 0;
            #[doc = "Continuous transfer is enabled"]
            pub const CONT_1: u32 = 0x01;
        }
    }
    #[doc = "Byte Swap"]
    pub mod BYSW {
        pub const offset: u32 = 22;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Byte swap is disabled"]
            pub const BYSW_0: u32 = 0;
            #[doc = "Byte swap is enabled"]
            pub const BYSW_1: u32 = 0x01;
        }
    }
    #[doc = "LSB First"]
    pub mod LSBF {
        pub const offset: u32 = 23;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Data is transferred MSB first"]
            pub const LSBF_0: u32 = 0;
            #[doc = "Data is transferred LSB first"]
            pub const LSBF_1: u32 = 0x01;
        }
    }
    #[doc = "Peripheral Chip Select"]
    pub mod PCS {
        pub const offset: u32 = 24;
        pub const mask: u32 = 0x03 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Transfer using LPSPI_PCS\\[0\\]"]
            pub const PCS_0: u32 = 0;
            #[doc = "Transfer using LPSPI_PCS\\[1\\]"]
            pub const PCS_1: u32 = 0x01;
            #[doc = "Transfer using LPSPI_PCS\\[2\\]"]
            pub const PCS_2: u32 = 0x02;
            #[doc = "Transfer using LPSPI_PCS\\[3\\]"]
            pub const PCS_3: u32 = 0x03;
        }
    }
    #[doc = "Prescaler Value"]
    pub mod PRESCALE {
        pub const offset: u32 = 27;
        pub const mask: u32 = 0x07 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Divide by 1"]
            pub const PRESCALE_0: u32 = 0;
            #[doc = "Divide by 2"]
            pub const PRESCALE_1: u32 = 0x01;
            #[doc = "Divide by 4"]
            pub const PRESCALE_2: u32 = 0x02;
            #[doc = "Divide by 8"]
            pub const PRESCALE_3: u32 = 0x03;
            #[doc = "Divide by 16"]
            pub const PRESCALE_4: u32 = 0x04;
            #[doc = "Divide by 32"]
            pub const PRESCALE_5: u32 = 0x05;
            #[doc = "Divide by 64"]
            pub const PRESCALE_6: u32 = 0x06;
            #[doc = "Divide by 128"]
            pub const PRESCALE_7: u32 = 0x07;
        }
    }
    #[doc = "Clock Phase"]
    pub mod CPHA {
        pub const offset: u32 = 30;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Data is captured on the leading edge of SCK and changed on the following edge of SCK"]
            pub const CPHA_0: u32 = 0;
            #[doc = "Data is changed on the leading edge of SCK and captured on the following edge of SCK"]
            pub const CPHA_1: u32 = 0x01;
        }
    }
    #[doc = "Clock Polarity"]
    pub mod CPOL {
        pub const offset: u32 = 31;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "The inactive state value of SCK is low"]
            pub const CPOL_0: u32 = 0;
            #[doc = "The inactive state value of SCK is high"]
            pub const CPOL_1: u32 = 0x01;
        }
    }
}
#[doc = "Transmit Data Register"]
pub mod TDR {
    #[doc = "Transmit Data"]
    pub mod DATA {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0xffff_ffff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "Receive Status Register"]
pub mod RSR {
    #[doc = "Start Of Frame"]
    pub mod SOF {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Subsequent data word received after LPSPI_PCS assertion"]
            pub const SOF_0: u32 = 0;
            #[doc = "First data word received after LPSPI_PCS assertion"]
            pub const SOF_1: u32 = 0x01;
        }
    }
    #[doc = "RX FIFO Empty"]
    pub mod RXEMPTY {
        pub const offset: u32 = 1;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "RX FIFO is not empty"]
            pub const RXEMPTY_0: u32 = 0;
            #[doc = "RX FIFO is empty"]
            pub const RXEMPTY_1: u32 = 0x01;
        }
    }
}
#[doc = "Receive Data Register"]
pub mod RDR {
    #[doc = "Receive Data"]
    pub mod DATA {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0xffff_ffff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}