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
#![feature(abi_msp430_interrupt)]
#![feature(asm)]
#![cfg_attr(feature = "rt", feature(global_asm))]
#![doc = "Peripheral access API for MSP430FR2355 microcontrollers (generated using svd2rust v0.16.1)\n\nYou can find an overview of the API [here].\n\n[here]: https://docs.rs/svd2rust/0.16.1/svd2rust/#peripheral-api"]
#![deny(missing_docs)]
#![deny(warnings)]
#![allow(non_camel_case_types)]
#![no_std]
extern crate msp430;
#[cfg(feature = "rt")]
extern crate msp430_rt;
#[cfg(feature = "rt")]
pub use msp430_rt::default_handler;
extern crate bare_metal;
extern crate vcell;
use core::marker::PhantomData;
use core::ops::Deref;
#[doc(hidden)]
pub mod interrupt;
pub use self::interrupt::Interrupt;
#[allow(unused_imports)]
use generic::*;
#[doc = r"Common register and bit access and modify traits"]
pub mod generic;
#[doc = "P1"]
pub struct P1 {
    _marker: PhantomData<*const ()>,
}
unsafe impl Send for P1 {}
impl P1 {
    #[doc = r"Returns a pointer to the register block"]
    #[inline(always)]
    pub const fn ptr() -> *const p1::RegisterBlock {
        0x0200 as *const _
    }
}
impl Deref for P1 {
    type Target = p1::RegisterBlock;
    fn deref(&self) -> &Self::Target {
        unsafe { &*P1::ptr() }
    }
}
#[doc = "P1"]
pub mod p1;
#[doc = "P2"]
pub struct P2 {
    _marker: PhantomData<*const ()>,
}
unsafe impl Send for P2 {}
impl P2 {
    #[doc = r"Returns a pointer to the register block"]
    #[inline(always)]
    pub const fn ptr() -> *const p2::RegisterBlock {
        0x0200 as *const _
    }
}
impl Deref for P2 {
    type Target = p2::RegisterBlock;
    fn deref(&self) -> &Self::Target {
        unsafe { &*P2::ptr() }
    }
}
#[doc = "P2"]
pub mod p2;
#[doc = "P3"]
pub struct P3 {
    _marker: PhantomData<*const ()>,
}
unsafe impl Send for P3 {}
impl P3 {
    #[doc = r"Returns a pointer to the register block"]
    #[inline(always)]
    pub const fn ptr() -> *const p3::RegisterBlock {
        0x0220 as *const _
    }
}
impl Deref for P3 {
    type Target = p3::RegisterBlock;
    fn deref(&self) -> &Self::Target {
        unsafe { &*P3::ptr() }
    }
}
#[doc = "P3"]
pub mod p3;
#[doc = "P4"]
pub struct P4 {
    _marker: PhantomData<*const ()>,
}
unsafe impl Send for P4 {}
impl P4 {
    #[doc = r"Returns a pointer to the register block"]
    #[inline(always)]
    pub const fn ptr() -> *const p4::RegisterBlock {
        0x0220 as *const _
    }
}
impl Deref for P4 {
    type Target = p4::RegisterBlock;
    fn deref(&self) -> &Self::Target {
        unsafe { &*P4::ptr() }
    }
}
#[doc = "P4"]
pub mod p4;
#[doc = "P5"]
pub struct P5 {
    _marker: PhantomData<*const ()>,
}
unsafe impl Send for P5 {}
impl P5 {
    #[doc = r"Returns a pointer to the register block"]
    #[inline(always)]
    pub const fn ptr() -> *const p5::RegisterBlock {
        0x0240 as *const _
    }
}
impl Deref for P5 {
    type Target = p5::RegisterBlock;
    fn deref(&self) -> &Self::Target {
        unsafe { &*P5::ptr() }
    }
}
#[doc = "P5"]
pub mod p5;
#[doc = "P6"]
pub struct P6 {
    _marker: PhantomData<*const ()>,
}
unsafe impl Send for P6 {}
impl P6 {
    #[doc = r"Returns a pointer to the register block"]
    #[inline(always)]
    pub const fn ptr() -> *const p6::RegisterBlock {
        0x0240 as *const _
    }
}
impl Deref for P6 {
    type Target = p6::RegisterBlock;
    fn deref(&self) -> &Self::Target {
        unsafe { &*P6::ptr() }
    }
}
#[doc = "P6"]
pub mod p6;
#[doc = "SFR"]
pub struct SFR {
    _marker: PhantomData<*const ()>,
}
unsafe impl Send for SFR {}
impl SFR {
    #[doc = r"Returns a pointer to the register block"]
    #[inline(always)]
    pub const fn ptr() -> *const sfr::RegisterBlock {
        0x0100 as *const _
    }
}
impl Deref for SFR {
    type Target = sfr::RegisterBlock;
    fn deref(&self) -> &Self::Target {
        unsafe { &*SFR::ptr() }
    }
}
#[doc = "SFR"]
pub mod sfr;
#[doc = "PMM"]
pub struct PMM {
    _marker: PhantomData<*const ()>,
}
unsafe impl Send for PMM {}
impl PMM {
    #[doc = r"Returns a pointer to the register block"]
    #[inline(always)]
    pub const fn ptr() -> *const pmm::RegisterBlock {
        0x0120 as *const _
    }
}
impl Deref for PMM {
    type Target = pmm::RegisterBlock;
    fn deref(&self) -> &Self::Target {
        unsafe { &*PMM::ptr() }
    }
}
#[doc = "PMM"]
pub mod pmm;
#[doc = "SYS"]
pub struct SYS {
    _marker: PhantomData<*const ()>,
}
unsafe impl Send for SYS {}
impl SYS {
    #[doc = r"Returns a pointer to the register block"]
    #[inline(always)]
    pub const fn ptr() -> *const sys::RegisterBlock {
        0x0140 as *const _
    }
}
impl Deref for SYS {
    type Target = sys::RegisterBlock;
    fn deref(&self) -> &Self::Target {
        unsafe { &*SYS::ptr() }
    }
}
#[doc = "SYS"]
pub mod sys;
#[doc = "CS"]
pub struct CS {
    _marker: PhantomData<*const ()>,
}
unsafe impl Send for CS {}
impl CS {
    #[doc = r"Returns a pointer to the register block"]
    #[inline(always)]
    pub const fn ptr() -> *const cs::RegisterBlock {
        0x0180 as *const _
    }
}
impl Deref for CS {
    type Target = cs::RegisterBlock;
    fn deref(&self) -> &Self::Target {
        unsafe { &*CS::ptr() }
    }
}
#[doc = "CS"]
pub mod cs;
#[doc = "FRCTL"]
pub struct FRCTL {
    _marker: PhantomData<*const ()>,
}
unsafe impl Send for FRCTL {}
impl FRCTL {
    #[doc = r"Returns a pointer to the register block"]
    #[inline(always)]
    pub const fn ptr() -> *const frctl::RegisterBlock {
        0x01a0 as *const _
    }
}
impl Deref for FRCTL {
    type Target = frctl::RegisterBlock;
    fn deref(&self) -> &Self::Target {
        unsafe { &*FRCTL::ptr() }
    }
}
#[doc = "FRCTL"]
pub mod frctl;
#[doc = "CRC"]
pub struct CRC {
    _marker: PhantomData<*const ()>,
}
unsafe impl Send for CRC {}
impl CRC {
    #[doc = r"Returns a pointer to the register block"]
    #[inline(always)]
    pub const fn ptr() -> *const crc::RegisterBlock {
        0x01c0 as *const _
    }
}
impl Deref for CRC {
    type Target = crc::RegisterBlock;
    fn deref(&self) -> &Self::Target {
        unsafe { &*CRC::ptr() }
    }
}
#[doc = "CRC"]
pub mod crc;
#[doc = "WDT_A"]
pub struct WDT_A {
    _marker: PhantomData<*const ()>,
}
unsafe impl Send for WDT_A {}
impl WDT_A {
    #[doc = r"Returns a pointer to the register block"]
    #[inline(always)]
    pub const fn ptr() -> *const wdt_a::RegisterBlock {
        0x01cc as *const _
    }
}
impl Deref for WDT_A {
    type Target = wdt_a::RegisterBlock;
    fn deref(&self) -> &Self::Target {
        unsafe { &*WDT_A::ptr() }
    }
}
#[doc = "WDT_A"]
pub mod wdt_a;
#[doc = "CAPTIO"]
pub struct CAPTIO {
    _marker: PhantomData<*const ()>,
}
unsafe impl Send for CAPTIO {}
impl CAPTIO {
    #[doc = r"Returns a pointer to the register block"]
    #[inline(always)]
    pub const fn ptr() -> *const captio::RegisterBlock {
        0x02ee as *const _
    }
}
impl Deref for CAPTIO {
    type Target = captio::RegisterBlock;
    fn deref(&self) -> &Self::Target {
        unsafe { &*CAPTIO::ptr() }
    }
}
#[doc = "CAPTIO"]
pub mod captio;
#[doc = "RTC"]
pub struct RTC {
    _marker: PhantomData<*const ()>,
}
unsafe impl Send for RTC {}
impl RTC {
    #[doc = r"Returns a pointer to the register block"]
    #[inline(always)]
    pub const fn ptr() -> *const rtc::RegisterBlock {
        0x0300 as *const _
    }
}
impl Deref for RTC {
    type Target = rtc::RegisterBlock;
    fn deref(&self) -> &Self::Target {
        unsafe { &*RTC::ptr() }
    }
}
#[doc = "RTC"]
pub mod rtc;
#[doc = "TB0"]
pub struct TB0 {
    _marker: PhantomData<*const ()>,
}
unsafe impl Send for TB0 {}
impl TB0 {
    #[doc = r"Returns a pointer to the register block"]
    #[inline(always)]
    pub const fn ptr() -> *const tb0::RegisterBlock {
        0x0380 as *const _
    }
}
impl Deref for TB0 {
    type Target = tb0::RegisterBlock;
    fn deref(&self) -> &Self::Target {
        unsafe { &*TB0::ptr() }
    }
}
#[doc = "TB0"]
pub mod tb0;
#[doc = "TB1"]
pub struct TB1 {
    _marker: PhantomData<*const ()>,
}
unsafe impl Send for TB1 {}
impl TB1 {
    #[doc = r"Returns a pointer to the register block"]
    #[inline(always)]
    pub const fn ptr() -> *const tb1::RegisterBlock {
        0x03c0 as *const _
    }
}
impl Deref for TB1 {
    type Target = tb1::RegisterBlock;
    fn deref(&self) -> &Self::Target {
        unsafe { &*TB1::ptr() }
    }
}
#[doc = "TB1"]
pub mod tb1;
#[doc = "TB2"]
pub struct TB2 {
    _marker: PhantomData<*const ()>,
}
unsafe impl Send for TB2 {}
impl TB2 {
    #[doc = r"Returns a pointer to the register block"]
    #[inline(always)]
    pub const fn ptr() -> *const tb2::RegisterBlock {
        0x0400 as *const _
    }
}
impl Deref for TB2 {
    type Target = tb2::RegisterBlock;
    fn deref(&self) -> &Self::Target {
        unsafe { &*TB2::ptr() }
    }
}
#[doc = "TB2"]
pub mod tb2;
#[doc = "TB3"]
pub struct TB3 {
    _marker: PhantomData<*const ()>,
}
unsafe impl Send for TB3 {}
impl TB3 {
    #[doc = r"Returns a pointer to the register block"]
    #[inline(always)]
    pub const fn ptr() -> *const tb3::RegisterBlock {
        0x0440 as *const _
    }
}
impl Deref for TB3 {
    type Target = tb3::RegisterBlock;
    fn deref(&self) -> &Self::Target {
        unsafe { &*TB3::ptr() }
    }
}
#[doc = "TB3"]
pub mod tb3;
#[doc = "MPY32"]
pub struct MPY32 {
    _marker: PhantomData<*const ()>,
}
unsafe impl Send for MPY32 {}
impl MPY32 {
    #[doc = r"Returns a pointer to the register block"]
    #[inline(always)]
    pub const fn ptr() -> *const mpy32::RegisterBlock {
        0x04c0 as *const _
    }
}
impl Deref for MPY32 {
    type Target = mpy32::RegisterBlock;
    fn deref(&self) -> &Self::Target {
        unsafe { &*MPY32::ptr() }
    }
}
#[doc = "MPY32"]
pub mod mpy32;
#[doc = "eUSCI_A0"]
pub struct E_USCI_A0 {
    _marker: PhantomData<*const ()>,
}
unsafe impl Send for E_USCI_A0 {}
impl E_USCI_A0 {
    #[doc = r"Returns a pointer to the register block"]
    #[inline(always)]
    pub const fn ptr() -> *const e_usci_a0::RegisterBlock {
        0x0500 as *const _
    }
}
impl Deref for E_USCI_A0 {
    type Target = e_usci_a0::RegisterBlock;
    fn deref(&self) -> &Self::Target {
        unsafe { &*E_USCI_A0::ptr() }
    }
}
#[doc = "eUSCI_A0"]
pub mod e_usci_a0;
#[doc = "eUSCI_B0"]
pub struct E_USCI_B0 {
    _marker: PhantomData<*const ()>,
}
unsafe impl Send for E_USCI_B0 {}
impl E_USCI_B0 {
    #[doc = r"Returns a pointer to the register block"]
    #[inline(always)]
    pub const fn ptr() -> *const e_usci_b0::RegisterBlock {
        0x0540 as *const _
    }
}
impl Deref for E_USCI_B0 {
    type Target = e_usci_b0::RegisterBlock;
    fn deref(&self) -> &Self::Target {
        unsafe { &*E_USCI_B0::ptr() }
    }
}
#[doc = "eUSCI_B0"]
pub mod e_usci_b0;
#[doc = "eUSCI_A1"]
pub struct E_USCI_A1 {
    _marker: PhantomData<*const ()>,
}
unsafe impl Send for E_USCI_A1 {}
impl E_USCI_A1 {
    #[doc = r"Returns a pointer to the register block"]
    #[inline(always)]
    pub const fn ptr() -> *const e_usci_a1::RegisterBlock {
        0x0580 as *const _
    }
}
impl Deref for E_USCI_A1 {
    type Target = e_usci_a1::RegisterBlock;
    fn deref(&self) -> &Self::Target {
        unsafe { &*E_USCI_A1::ptr() }
    }
}
#[doc = "eUSCI_A1"]
pub mod e_usci_a1;
#[doc = "eUSCI_B1"]
pub struct E_USCI_B1 {
    _marker: PhantomData<*const ()>,
}
unsafe impl Send for E_USCI_B1 {}
impl E_USCI_B1 {
    #[doc = r"Returns a pointer to the register block"]
    #[inline(always)]
    pub const fn ptr() -> *const e_usci_b1::RegisterBlock {
        0x05c0 as *const _
    }
}
impl Deref for E_USCI_B1 {
    type Target = e_usci_b1::RegisterBlock;
    fn deref(&self) -> &Self::Target {
        unsafe { &*E_USCI_B1::ptr() }
    }
}
#[doc = "eUSCI_B1"]
pub mod e_usci_b1;
#[doc = "BKMEM"]
pub struct BKMEM {
    _marker: PhantomData<*const ()>,
}
unsafe impl Send for BKMEM {}
impl BKMEM {
    #[doc = r"Returns a pointer to the register block"]
    #[inline(always)]
    pub const fn ptr() -> *const bkmem::RegisterBlock {
        0x0660 as *const _
    }
}
impl Deref for BKMEM {
    type Target = bkmem::RegisterBlock;
    fn deref(&self) -> &Self::Target {
        unsafe { &*BKMEM::ptr() }
    }
}
#[doc = "BKMEM"]
pub mod bkmem;
#[doc = "ICC"]
pub struct ICC {
    _marker: PhantomData<*const ()>,
}
unsafe impl Send for ICC {}
impl ICC {
    #[doc = r"Returns a pointer to the register block"]
    #[inline(always)]
    pub const fn ptr() -> *const icc::RegisterBlock {
        0x06c0 as *const _
    }
}
impl Deref for ICC {
    type Target = icc::RegisterBlock;
    fn deref(&self) -> &Self::Target {
        unsafe { &*ICC::ptr() }
    }
}
#[doc = "ICC"]
pub mod icc;
#[doc = "ADC"]
pub struct ADC {
    _marker: PhantomData<*const ()>,
}
unsafe impl Send for ADC {}
impl ADC {
    #[doc = r"Returns a pointer to the register block"]
    #[inline(always)]
    pub const fn ptr() -> *const adc::RegisterBlock {
        0x0700 as *const _
    }
}
impl Deref for ADC {
    type Target = adc::RegisterBlock;
    fn deref(&self) -> &Self::Target {
        unsafe { &*ADC::ptr() }
    }
}
#[doc = "ADC"]
pub mod adc;
#[doc = "eCOMP0"]
pub struct E_COMP0 {
    _marker: PhantomData<*const ()>,
}
unsafe impl Send for E_COMP0 {}
impl E_COMP0 {
    #[doc = r"Returns a pointer to the register block"]
    #[inline(always)]
    pub const fn ptr() -> *const e_comp0::RegisterBlock {
        0x08e0 as *const _
    }
}
impl Deref for E_COMP0 {
    type Target = e_comp0::RegisterBlock;
    fn deref(&self) -> &Self::Target {
        unsafe { &*E_COMP0::ptr() }
    }
}
#[doc = "eCOMP0"]
pub mod e_comp0;
#[doc = "eCOMP1"]
pub struct E_COMP1 {
    _marker: PhantomData<*const ()>,
}
unsafe impl Send for E_COMP1 {}
impl E_COMP1 {
    #[doc = r"Returns a pointer to the register block"]
    #[inline(always)]
    pub const fn ptr() -> *const e_comp1::RegisterBlock {
        0x0900 as *const _
    }
}
impl Deref for E_COMP1 {
    type Target = e_comp1::RegisterBlock;
    fn deref(&self) -> &Self::Target {
        unsafe { &*E_COMP1::ptr() }
    }
}
#[doc = "eCOMP1"]
pub mod e_comp1;
#[doc = "SAC0"]
pub struct SAC0 {
    _marker: PhantomData<*const ()>,
}
unsafe impl Send for SAC0 {}
impl SAC0 {
    #[doc = r"Returns a pointer to the register block"]
    #[inline(always)]
    pub const fn ptr() -> *const sac0::RegisterBlock {
        0x0c80 as *const _
    }
}
impl Deref for SAC0 {
    type Target = sac0::RegisterBlock;
    fn deref(&self) -> &Self::Target {
        unsafe { &*SAC0::ptr() }
    }
}
#[doc = "SAC0"]
pub mod sac0;
#[doc = "SAC1"]
pub struct SAC1 {
    _marker: PhantomData<*const ()>,
}
unsafe impl Send for SAC1 {}
impl SAC1 {
    #[doc = r"Returns a pointer to the register block"]
    #[inline(always)]
    pub const fn ptr() -> *const sac1::RegisterBlock {
        0x0c90 as *const _
    }
}
impl Deref for SAC1 {
    type Target = sac1::RegisterBlock;
    fn deref(&self) -> &Self::Target {
        unsafe { &*SAC1::ptr() }
    }
}
#[doc = "SAC1"]
pub mod sac1;
#[doc = "SAC2"]
pub struct SAC2 {
    _marker: PhantomData<*const ()>,
}
unsafe impl Send for SAC2 {}
impl SAC2 {
    #[doc = r"Returns a pointer to the register block"]
    #[inline(always)]
    pub const fn ptr() -> *const sac2::RegisterBlock {
        0x0ca0 as *const _
    }
}
impl Deref for SAC2 {
    type Target = sac2::RegisterBlock;
    fn deref(&self) -> &Self::Target {
        unsafe { &*SAC2::ptr() }
    }
}
#[doc = "SAC2"]
pub mod sac2;
#[doc = "SAC3"]
pub struct SAC3 {
    _marker: PhantomData<*const ()>,
}
unsafe impl Send for SAC3 {}
impl SAC3 {
    #[doc = r"Returns a pointer to the register block"]
    #[inline(always)]
    pub const fn ptr() -> *const sac3::RegisterBlock {
        0x0cb0 as *const _
    }
}
impl Deref for SAC3 {
    type Target = sac3::RegisterBlock;
    fn deref(&self) -> &Self::Target {
        unsafe { &*SAC3::ptr() }
    }
}
#[doc = "SAC3"]
pub mod sac3;
#[no_mangle]
static mut DEVICE_PERIPHERALS: bool = false;
#[doc = r"All the peripherals"]
#[allow(non_snake_case)]
pub struct Peripherals {
    #[doc = "P1"]
    pub P1: P1,
    #[doc = "P2"]
    pub P2: P2,
    #[doc = "P3"]
    pub P3: P3,
    #[doc = "P4"]
    pub P4: P4,
    #[doc = "P5"]
    pub P5: P5,
    #[doc = "P6"]
    pub P6: P6,
    #[doc = "SFR"]
    pub SFR: SFR,
    #[doc = "PMM"]
    pub PMM: PMM,
    #[doc = "SYS"]
    pub SYS: SYS,
    #[doc = "CS"]
    pub CS: CS,
    #[doc = "FRCTL"]
    pub FRCTL: FRCTL,
    #[doc = "CRC"]
    pub CRC: CRC,
    #[doc = "WDT_A"]
    pub WDT_A: WDT_A,
    #[doc = "CAPTIO"]
    pub CAPTIO: CAPTIO,
    #[doc = "RTC"]
    pub RTC: RTC,
    #[doc = "TB0"]
    pub TB0: TB0,
    #[doc = "TB1"]
    pub TB1: TB1,
    #[doc = "TB2"]
    pub TB2: TB2,
    #[doc = "TB3"]
    pub TB3: TB3,
    #[doc = "MPY32"]
    pub MPY32: MPY32,
    #[doc = "E_USCI_A0"]
    pub E_USCI_A0: E_USCI_A0,
    #[doc = "E_USCI_B0"]
    pub E_USCI_B0: E_USCI_B0,
    #[doc = "E_USCI_A1"]
    pub E_USCI_A1: E_USCI_A1,
    #[doc = "E_USCI_B1"]
    pub E_USCI_B1: E_USCI_B1,
    #[doc = "BKMEM"]
    pub BKMEM: BKMEM,
    #[doc = "ICC"]
    pub ICC: ICC,
    #[doc = "ADC"]
    pub ADC: ADC,
    #[doc = "E_COMP0"]
    pub E_COMP0: E_COMP0,
    #[doc = "E_COMP1"]
    pub E_COMP1: E_COMP1,
    #[doc = "SAC0"]
    pub SAC0: SAC0,
    #[doc = "SAC1"]
    pub SAC1: SAC1,
    #[doc = "SAC2"]
    pub SAC2: SAC2,
    #[doc = "SAC3"]
    pub SAC3: SAC3,
}
impl Peripherals {
    #[doc = r"Returns all the peripherals *once*"]
    #[inline]
    pub fn take() -> Option<Self> {
        msp430::interrupt::free(|_| {
            if unsafe { DEVICE_PERIPHERALS } {
                None
            } else {
                Some(unsafe { Peripherals::steal() })
            }
        })
    }
    #[doc = r"Unchecked version of `Peripherals::take`"]
    pub unsafe fn steal() -> Self {
        DEVICE_PERIPHERALS = true;
        Peripherals {
            P1: P1 {
                _marker: PhantomData,
            },
            P2: P2 {
                _marker: PhantomData,
            },
            P3: P3 {
                _marker: PhantomData,
            },
            P4: P4 {
                _marker: PhantomData,
            },
            P5: P5 {
                _marker: PhantomData,
            },
            P6: P6 {
                _marker: PhantomData,
            },
            SFR: SFR {
                _marker: PhantomData,
            },
            PMM: PMM {
                _marker: PhantomData,
            },
            SYS: SYS {
                _marker: PhantomData,
            },
            CS: CS {
                _marker: PhantomData,
            },
            FRCTL: FRCTL {
                _marker: PhantomData,
            },
            CRC: CRC {
                _marker: PhantomData,
            },
            WDT_A: WDT_A {
                _marker: PhantomData,
            },
            CAPTIO: CAPTIO {
                _marker: PhantomData,
            },
            RTC: RTC {
                _marker: PhantomData,
            },
            TB0: TB0 {
                _marker: PhantomData,
            },
            TB1: TB1 {
                _marker: PhantomData,
            },
            TB2: TB2 {
                _marker: PhantomData,
            },
            TB3: TB3 {
                _marker: PhantomData,
            },
            MPY32: MPY32 {
                _marker: PhantomData,
            },
            E_USCI_A0: E_USCI_A0 {
                _marker: PhantomData,
            },
            E_USCI_B0: E_USCI_B0 {
                _marker: PhantomData,
            },
            E_USCI_A1: E_USCI_A1 {
                _marker: PhantomData,
            },
            E_USCI_B1: E_USCI_B1 {
                _marker: PhantomData,
            },
            BKMEM: BKMEM {
                _marker: PhantomData,
            },
            ICC: ICC {
                _marker: PhantomData,
            },
            ADC: ADC {
                _marker: PhantomData,
            },
            E_COMP0: E_COMP0 {
                _marker: PhantomData,
            },
            E_COMP1: E_COMP1 {
                _marker: PhantomData,
            },
            SAC0: SAC0 {
                _marker: PhantomData,
            },
            SAC1: SAC1 {
                _marker: PhantomData,
            },
            SAC2: SAC2 {
                _marker: PhantomData,
            },
            SAC3: SAC3 {
                _marker: PhantomData,
            },
        }
    }
}