1#![feature(abi_msp430_interrupt)]
2#![doc = "Peripheral access API for MSP430FR247x microcontrollers (generated using svd2rust v0.28.0 ( ))\n\nYou can find an overview of the generated API [here].\n\nAPI features to be included in the [next]
3svd2rust release can be generated by cloning the svd2rust [repository], checking out the above commit, and running `cargo doc --open`.\n\n[here]: https://docs.rs/svd2rust/0.28.0/svd2rust/#peripheral-api\n[next]: https://github.com/rust-embedded/svd2rust/blob/master/CHANGELOG.md#unreleased\n[repository]: https://github.com/rust-embedded/svd2rust"]
4#![deny(dead_code)]
5#![deny(improper_ctypes)]
6#![deny(missing_docs)]
7#![deny(no_mangle_generic_items)]
8#![deny(non_shorthand_field_patterns)]
9#![deny(overflowing_literals)]
10#![deny(path_statements)]
11#![deny(patterns_in_fns_without_body)]
12#![deny(private_in_public)]
13#![deny(unconditional_recursion)]
14#![deny(unused_allocation)]
15#![deny(unused_comparisons)]
16#![deny(unused_parens)]
17#![deny(while_true)]
18#![allow(non_camel_case_types)]
19#![allow(non_snake_case)]
20#![no_std]
21#[cfg(feature = "rt")]
22pub use self::Interrupt as interrupt;
23use core::marker::PhantomData;
24use core::ops::Deref;
25#[allow(unused_imports)]
26use generic::*;
27#[cfg(feature = "rt")]
28pub use msp430_rt::interrupt;
29#[doc = "Common register and bit access and modify traits"]
30pub mod generic;
31#[cfg(feature = "rt")]
32extern "msp430-interrupt" {
33 fn ECOMP0();
34 fn PORT6();
35 fn PORT5();
36 fn PORT4();
37 fn PORT3();
38 fn PORT2();
39 fn PORT1();
40 fn ADC();
41 fn EUSCI_B1();
42 fn EUSCI_B0();
43 fn EUSCI_A1();
44 fn EUSCI_A0();
45 fn WDT();
46 fn RTC();
47 fn TIMER0_B1();
48 fn TIMER0_B0();
49 fn TIMER3_A1();
50 fn TIMER3_A0();
51 fn TIMER2_A1();
52 fn TIMER2_A0();
53 fn TIMER1_A1();
54 fn TIMER1_A0();
55 fn TIMER0_A1();
56 fn TIMER0_A0();
57 fn UNMI();
58 fn SYSNMI();
59}
60#[doc(hidden)]
61pub union Vector {
62 _handler: unsafe extern "msp430-interrupt" fn(),
63 _reserved: u16,
64}
65#[cfg(feature = "rt")]
66#[doc(hidden)]
67#[link_section = ".vector_table.interrupts"]
68#[no_mangle]
69#[used]
70pub static __INTERRUPTS: [Vector; 63] = [
71 Vector { _reserved: 0 },
72 Vector { _reserved: 0 },
73 Vector { _reserved: 0 },
74 Vector { _reserved: 0 },
75 Vector { _reserved: 0 },
76 Vector { _reserved: 0 },
77 Vector { _reserved: 0 },
78 Vector { _reserved: 0 },
79 Vector { _reserved: 0 },
80 Vector { _reserved: 0 },
81 Vector { _reserved: 0 },
82 Vector { _reserved: 0 },
83 Vector { _reserved: 0 },
84 Vector { _reserved: 0 },
85 Vector { _reserved: 0 },
86 Vector { _reserved: 0 },
87 Vector { _reserved: 0 },
88 Vector { _reserved: 0 },
89 Vector { _reserved: 0 },
90 Vector { _reserved: 0 },
91 Vector { _reserved: 0 },
92 Vector { _reserved: 0 },
93 Vector { _reserved: 0 },
94 Vector { _reserved: 0 },
95 Vector { _reserved: 0 },
96 Vector { _reserved: 0 },
97 Vector { _reserved: 0 },
98 Vector { _reserved: 0 },
99 Vector { _reserved: 0 },
100 Vector { _reserved: 0 },
101 Vector { _reserved: 0 },
102 Vector { _reserved: 0 },
103 Vector { _reserved: 0 },
104 Vector { _reserved: 0 },
105 Vector { _reserved: 0 },
106 Vector { _reserved: 0 },
107 Vector { _reserved: 0 },
108 Vector { _handler: ECOMP0 },
109 Vector { _handler: PORT6 },
110 Vector { _handler: PORT5 },
111 Vector { _handler: PORT4 },
112 Vector { _handler: PORT3 },
113 Vector { _handler: PORT2 },
114 Vector { _handler: PORT1 },
115 Vector { _handler: ADC },
116 Vector { _handler: EUSCI_B1 },
117 Vector { _handler: EUSCI_B0 },
118 Vector { _handler: EUSCI_A1 },
119 Vector { _handler: EUSCI_A0 },
120 Vector { _handler: WDT },
121 Vector { _handler: RTC },
122 Vector {
123 _handler: TIMER0_B1,
124 },
125 Vector {
126 _handler: TIMER0_B0,
127 },
128 Vector {
129 _handler: TIMER3_A1,
130 },
131 Vector {
132 _handler: TIMER3_A0,
133 },
134 Vector {
135 _handler: TIMER2_A1,
136 },
137 Vector {
138 _handler: TIMER2_A0,
139 },
140 Vector {
141 _handler: TIMER1_A1,
142 },
143 Vector {
144 _handler: TIMER1_A0,
145 },
146 Vector {
147 _handler: TIMER0_A1,
148 },
149 Vector {
150 _handler: TIMER0_A0,
151 },
152 Vector { _handler: UNMI },
153 Vector { _handler: SYSNMI },
154];
155#[doc = r"Enumeration of all the interrupts. This enum is seldom used in application or library crates. It is present primarily for documenting the device's implemented interrupts."]
156#[derive(Copy, Clone, Debug, PartialEq, Eq)]
157#[repr(u16)]
158pub enum Interrupt {
159 #[doc = "19 - 0xFFCA"]
160 ECOMP0 = 19,
161 #[doc = "20 - 0xFFCC"]
162 PORT6 = 20,
163 #[doc = "21 - 0xFFCE"]
164 PORT5 = 21,
165 #[doc = "22 - 0xFFD0"]
166 PORT4 = 22,
167 #[doc = "23 - 0xFFD2"]
168 PORT3 = 23,
169 #[doc = "24 - 0xFFD4"]
170 PORT2 = 24,
171 #[doc = "25 - 0xFFD6"]
172 PORT1 = 25,
173 #[doc = "26 - 0xFFD8"]
174 ADC = 26,
175 #[doc = "27 - 0xFFDA"]
176 EUSCI_B1 = 27,
177 #[doc = "28 - 0xFFDC"]
178 EUSCI_B0 = 28,
179 #[doc = "29 - 0xFFDE"]
180 EUSCI_A1 = 29,
181 #[doc = "30 - 0xFFE0"]
182 EUSCI_A0 = 30,
183 #[doc = "31 - 0xFFE2"]
184 WDT = 31,
185 #[doc = "32 - 0xFFE4"]
186 RTC = 32,
187 #[doc = "33 - 0xFFE6"]
188 TIMER0_B1 = 33,
189 #[doc = "34 - 0xFFE8"]
190 TIMER0_B0 = 34,
191 #[doc = "35 - 0xFFEA"]
192 TIMER3_A1 = 35,
193 #[doc = "36 - 0xFFEC"]
194 TIMER3_A0 = 36,
195 #[doc = "37 - 0xFFEE"]
196 TIMER2_A1 = 37,
197 #[doc = "38 - 0xFFF0"]
198 TIMER2_A0 = 38,
199 #[doc = "39 - 0xFFF2"]
200 TIMER1_A1 = 39,
201 #[doc = "40 - 0xFFF4"]
202 TIMER1_A0 = 40,
203 #[doc = "41 - 0xFFF6"]
204 TIMER0_A1 = 41,
205 #[doc = "42 - 0xFFF8"]
206 TIMER0_A0 = 42,
207 #[doc = "43 - 0xFFFA"]
208 UNMI = 43,
209 #[doc = "44 - 0xFFFC"]
210 SYSNMI = 44,
211}
212#[doc = "P1"]
213pub struct P1 {
214 _marker: PhantomData<*const ()>,
215}
216unsafe impl Send for P1 {}
217impl P1 {
218 #[doc = r"Pointer to the register block"]
219 pub const PTR: *const p1::RegisterBlock = 0x0200 as *const _;
220 #[doc = r"Return the pointer to the register block"]
221 #[inline(always)]
222 pub const fn ptr() -> *const p1::RegisterBlock {
223 Self::PTR
224 }
225}
226impl Deref for P1 {
227 type Target = p1::RegisterBlock;
228 #[inline(always)]
229 fn deref(&self) -> &Self::Target {
230 unsafe { &*Self::PTR }
231 }
232}
233impl core::fmt::Debug for P1 {
234 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
235 f.debug_struct("P1").finish()
236 }
237}
238#[doc = "P1"]
239pub mod p1;
240#[doc = "P2"]
241pub struct P2 {
242 _marker: PhantomData<*const ()>,
243}
244unsafe impl Send for P2 {}
245impl P2 {
246 #[doc = r"Pointer to the register block"]
247 pub const PTR: *const p2::RegisterBlock = 0x0200 as *const _;
248 #[doc = r"Return the pointer to the register block"]
249 #[inline(always)]
250 pub const fn ptr() -> *const p2::RegisterBlock {
251 Self::PTR
252 }
253}
254impl Deref for P2 {
255 type Target = p2::RegisterBlock;
256 #[inline(always)]
257 fn deref(&self) -> &Self::Target {
258 unsafe { &*Self::PTR }
259 }
260}
261impl core::fmt::Debug for P2 {
262 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
263 f.debug_struct("P2").finish()
264 }
265}
266#[doc = "P2"]
267pub mod p2;
268#[doc = "P3"]
269pub struct P3 {
270 _marker: PhantomData<*const ()>,
271}
272unsafe impl Send for P3 {}
273impl P3 {
274 #[doc = r"Pointer to the register block"]
275 pub const PTR: *const p3::RegisterBlock = 0x0220 as *const _;
276 #[doc = r"Return the pointer to the register block"]
277 #[inline(always)]
278 pub const fn ptr() -> *const p3::RegisterBlock {
279 Self::PTR
280 }
281}
282impl Deref for P3 {
283 type Target = p3::RegisterBlock;
284 #[inline(always)]
285 fn deref(&self) -> &Self::Target {
286 unsafe { &*Self::PTR }
287 }
288}
289impl core::fmt::Debug for P3 {
290 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
291 f.debug_struct("P3").finish()
292 }
293}
294#[doc = "P3"]
295pub mod p3;
296#[doc = "P4"]
297pub struct P4 {
298 _marker: PhantomData<*const ()>,
299}
300unsafe impl Send for P4 {}
301impl P4 {
302 #[doc = r"Pointer to the register block"]
303 pub const PTR: *const p4::RegisterBlock = 0x0220 as *const _;
304 #[doc = r"Return the pointer to the register block"]
305 #[inline(always)]
306 pub const fn ptr() -> *const p4::RegisterBlock {
307 Self::PTR
308 }
309}
310impl Deref for P4 {
311 type Target = p4::RegisterBlock;
312 #[inline(always)]
313 fn deref(&self) -> &Self::Target {
314 unsafe { &*Self::PTR }
315 }
316}
317impl core::fmt::Debug for P4 {
318 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
319 f.debug_struct("P4").finish()
320 }
321}
322#[doc = "P4"]
323pub mod p4;
324#[doc = "P5"]
325pub struct P5 {
326 _marker: PhantomData<*const ()>,
327}
328unsafe impl Send for P5 {}
329impl P5 {
330 #[doc = r"Pointer to the register block"]
331 pub const PTR: *const p5::RegisterBlock = 0x0240 as *const _;
332 #[doc = r"Return the pointer to the register block"]
333 #[inline(always)]
334 pub const fn ptr() -> *const p5::RegisterBlock {
335 Self::PTR
336 }
337}
338impl Deref for P5 {
339 type Target = p5::RegisterBlock;
340 #[inline(always)]
341 fn deref(&self) -> &Self::Target {
342 unsafe { &*Self::PTR }
343 }
344}
345impl core::fmt::Debug for P5 {
346 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
347 f.debug_struct("P5").finish()
348 }
349}
350#[doc = "P5"]
351pub mod p5;
352#[doc = "P6"]
353pub struct P6 {
354 _marker: PhantomData<*const ()>,
355}
356unsafe impl Send for P6 {}
357impl P6 {
358 #[doc = r"Pointer to the register block"]
359 pub const PTR: *const p6::RegisterBlock = 0x0240 as *const _;
360 #[doc = r"Return the pointer to the register block"]
361 #[inline(always)]
362 pub const fn ptr() -> *const p6::RegisterBlock {
363 Self::PTR
364 }
365}
366impl Deref for P6 {
367 type Target = p6::RegisterBlock;
368 #[inline(always)]
369 fn deref(&self) -> &Self::Target {
370 unsafe { &*Self::PTR }
371 }
372}
373impl core::fmt::Debug for P6 {
374 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
375 f.debug_struct("P6").finish()
376 }
377}
378#[doc = "P6"]
379pub mod p6;
380#[doc = "SFR"]
381pub struct SFR {
382 _marker: PhantomData<*const ()>,
383}
384unsafe impl Send for SFR {}
385impl SFR {
386 #[doc = r"Pointer to the register block"]
387 pub const PTR: *const sfr::RegisterBlock = 0x0100 as *const _;
388 #[doc = r"Return the pointer to the register block"]
389 #[inline(always)]
390 pub const fn ptr() -> *const sfr::RegisterBlock {
391 Self::PTR
392 }
393}
394impl Deref for SFR {
395 type Target = sfr::RegisterBlock;
396 #[inline(always)]
397 fn deref(&self) -> &Self::Target {
398 unsafe { &*Self::PTR }
399 }
400}
401impl core::fmt::Debug for SFR {
402 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
403 f.debug_struct("SFR").finish()
404 }
405}
406#[doc = "SFR"]
407pub mod sfr;
408#[doc = "PMM"]
409pub struct PMM {
410 _marker: PhantomData<*const ()>,
411}
412unsafe impl Send for PMM {}
413impl PMM {
414 #[doc = r"Pointer to the register block"]
415 pub const PTR: *const pmm::RegisterBlock = 0x0120 as *const _;
416 #[doc = r"Return the pointer to the register block"]
417 #[inline(always)]
418 pub const fn ptr() -> *const pmm::RegisterBlock {
419 Self::PTR
420 }
421}
422impl Deref for PMM {
423 type Target = pmm::RegisterBlock;
424 #[inline(always)]
425 fn deref(&self) -> &Self::Target {
426 unsafe { &*Self::PTR }
427 }
428}
429impl core::fmt::Debug for PMM {
430 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
431 f.debug_struct("PMM").finish()
432 }
433}
434#[doc = "PMM"]
435pub mod pmm;
436#[doc = "SYS"]
437pub struct SYS {
438 _marker: PhantomData<*const ()>,
439}
440unsafe impl Send for SYS {}
441impl SYS {
442 #[doc = r"Pointer to the register block"]
443 pub const PTR: *const sys::RegisterBlock = 0x0140 as *const _;
444 #[doc = r"Return the pointer to the register block"]
445 #[inline(always)]
446 pub const fn ptr() -> *const sys::RegisterBlock {
447 Self::PTR
448 }
449}
450impl Deref for SYS {
451 type Target = sys::RegisterBlock;
452 #[inline(always)]
453 fn deref(&self) -> &Self::Target {
454 unsafe { &*Self::PTR }
455 }
456}
457impl core::fmt::Debug for SYS {
458 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
459 f.debug_struct("SYS").finish()
460 }
461}
462#[doc = "SYS"]
463pub mod sys;
464#[doc = "CS"]
465pub struct CS {
466 _marker: PhantomData<*const ()>,
467}
468unsafe impl Send for CS {}
469impl CS {
470 #[doc = r"Pointer to the register block"]
471 pub const PTR: *const cs::RegisterBlock = 0x0180 as *const _;
472 #[doc = r"Return the pointer to the register block"]
473 #[inline(always)]
474 pub const fn ptr() -> *const cs::RegisterBlock {
475 Self::PTR
476 }
477}
478impl Deref for CS {
479 type Target = cs::RegisterBlock;
480 #[inline(always)]
481 fn deref(&self) -> &Self::Target {
482 unsafe { &*Self::PTR }
483 }
484}
485impl core::fmt::Debug for CS {
486 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
487 f.debug_struct("CS").finish()
488 }
489}
490#[doc = "CS"]
491pub mod cs;
492#[doc = "FRCTL"]
493pub struct FRCTL {
494 _marker: PhantomData<*const ()>,
495}
496unsafe impl Send for FRCTL {}
497impl FRCTL {
498 #[doc = r"Pointer to the register block"]
499 pub const PTR: *const frctl::RegisterBlock = 0x01a0 as *const _;
500 #[doc = r"Return the pointer to the register block"]
501 #[inline(always)]
502 pub const fn ptr() -> *const frctl::RegisterBlock {
503 Self::PTR
504 }
505}
506impl Deref for FRCTL {
507 type Target = frctl::RegisterBlock;
508 #[inline(always)]
509 fn deref(&self) -> &Self::Target {
510 unsafe { &*Self::PTR }
511 }
512}
513impl core::fmt::Debug for FRCTL {
514 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
515 f.debug_struct("FRCTL").finish()
516 }
517}
518#[doc = "FRCTL"]
519pub mod frctl;
520#[doc = "CRC"]
521pub struct CRC {
522 _marker: PhantomData<*const ()>,
523}
524unsafe impl Send for CRC {}
525impl CRC {
526 #[doc = r"Pointer to the register block"]
527 pub const PTR: *const crc::RegisterBlock = 0x01c0 as *const _;
528 #[doc = r"Return the pointer to the register block"]
529 #[inline(always)]
530 pub const fn ptr() -> *const crc::RegisterBlock {
531 Self::PTR
532 }
533}
534impl Deref for CRC {
535 type Target = crc::RegisterBlock;
536 #[inline(always)]
537 fn deref(&self) -> &Self::Target {
538 unsafe { &*Self::PTR }
539 }
540}
541impl core::fmt::Debug for CRC {
542 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
543 f.debug_struct("CRC").finish()
544 }
545}
546#[doc = "CRC"]
547pub mod crc;
548#[doc = "WDT_A"]
549pub struct WDT_A {
550 _marker: PhantomData<*const ()>,
551}
552unsafe impl Send for WDT_A {}
553impl WDT_A {
554 #[doc = r"Pointer to the register block"]
555 pub const PTR: *const wdt_a::RegisterBlock = 0x01cc as *const _;
556 #[doc = r"Return the pointer to the register block"]
557 #[inline(always)]
558 pub const fn ptr() -> *const wdt_a::RegisterBlock {
559 Self::PTR
560 }
561}
562impl Deref for WDT_A {
563 type Target = wdt_a::RegisterBlock;
564 #[inline(always)]
565 fn deref(&self) -> &Self::Target {
566 unsafe { &*Self::PTR }
567 }
568}
569impl core::fmt::Debug for WDT_A {
570 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
571 f.debug_struct("WDT_A").finish()
572 }
573}
574#[doc = "WDT_A"]
575pub mod wdt_a;
576#[doc = "RTC"]
577pub struct RTC {
578 _marker: PhantomData<*const ()>,
579}
580unsafe impl Send for RTC {}
581impl RTC {
582 #[doc = r"Pointer to the register block"]
583 pub const PTR: *const rtc::RegisterBlock = 0x0300 as *const _;
584 #[doc = r"Return the pointer to the register block"]
585 #[inline(always)]
586 pub const fn ptr() -> *const rtc::RegisterBlock {
587 Self::PTR
588 }
589}
590impl Deref for RTC {
591 type Target = rtc::RegisterBlock;
592 #[inline(always)]
593 fn deref(&self) -> &Self::Target {
594 unsafe { &*Self::PTR }
595 }
596}
597impl core::fmt::Debug for RTC {
598 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
599 f.debug_struct("RTC").finish()
600 }
601}
602#[doc = "RTC"]
603pub mod rtc;
604#[doc = "PJ"]
605pub struct PJ {
606 _marker: PhantomData<*const ()>,
607}
608unsafe impl Send for PJ {}
609impl PJ {
610 #[doc = r"Pointer to the register block"]
611 pub const PTR: *const pj::RegisterBlock = 0x0320 as *const _;
612 #[doc = r"Return the pointer to the register block"]
613 #[inline(always)]
614 pub const fn ptr() -> *const pj::RegisterBlock {
615 Self::PTR
616 }
617}
618impl Deref for PJ {
619 type Target = pj::RegisterBlock;
620 #[inline(always)]
621 fn deref(&self) -> &Self::Target {
622 unsafe { &*Self::PTR }
623 }
624}
625impl core::fmt::Debug for PJ {
626 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
627 f.debug_struct("PJ").finish()
628 }
629}
630#[doc = "PJ"]
631pub mod pj;
632#[doc = "TA0"]
633pub struct TA0 {
634 _marker: PhantomData<*const ()>,
635}
636unsafe impl Send for TA0 {}
637impl TA0 {
638 #[doc = r"Pointer to the register block"]
639 pub const PTR: *const ta0::RegisterBlock = 0x0380 as *const _;
640 #[doc = r"Return the pointer to the register block"]
641 #[inline(always)]
642 pub const fn ptr() -> *const ta0::RegisterBlock {
643 Self::PTR
644 }
645}
646impl Deref for TA0 {
647 type Target = ta0::RegisterBlock;
648 #[inline(always)]
649 fn deref(&self) -> &Self::Target {
650 unsafe { &*Self::PTR }
651 }
652}
653impl core::fmt::Debug for TA0 {
654 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
655 f.debug_struct("TA0").finish()
656 }
657}
658#[doc = "TA0"]
659pub mod ta0;
660#[doc = "TA1"]
661pub struct TA1 {
662 _marker: PhantomData<*const ()>,
663}
664unsafe impl Send for TA1 {}
665impl TA1 {
666 #[doc = r"Pointer to the register block"]
667 pub const PTR: *const ta1::RegisterBlock = 0x03c0 as *const _;
668 #[doc = r"Return the pointer to the register block"]
669 #[inline(always)]
670 pub const fn ptr() -> *const ta1::RegisterBlock {
671 Self::PTR
672 }
673}
674impl Deref for TA1 {
675 type Target = ta1::RegisterBlock;
676 #[inline(always)]
677 fn deref(&self) -> &Self::Target {
678 unsafe { &*Self::PTR }
679 }
680}
681impl core::fmt::Debug for TA1 {
682 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
683 f.debug_struct("TA1").finish()
684 }
685}
686#[doc = "TA1"]
687pub mod ta1;
688#[doc = "TA2"]
689pub struct TA2 {
690 _marker: PhantomData<*const ()>,
691}
692unsafe impl Send for TA2 {}
693impl TA2 {
694 #[doc = r"Pointer to the register block"]
695 pub const PTR: *const ta2::RegisterBlock = 0x0400 as *const _;
696 #[doc = r"Return the pointer to the register block"]
697 #[inline(always)]
698 pub const fn ptr() -> *const ta2::RegisterBlock {
699 Self::PTR
700 }
701}
702impl Deref for TA2 {
703 type Target = ta2::RegisterBlock;
704 #[inline(always)]
705 fn deref(&self) -> &Self::Target {
706 unsafe { &*Self::PTR }
707 }
708}
709impl core::fmt::Debug for TA2 {
710 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
711 f.debug_struct("TA2").finish()
712 }
713}
714#[doc = "TA2"]
715pub mod ta2;
716#[doc = "TA3"]
717pub struct TA3 {
718 _marker: PhantomData<*const ()>,
719}
720unsafe impl Send for TA3 {}
721impl TA3 {
722 #[doc = r"Pointer to the register block"]
723 pub const PTR: *const ta3::RegisterBlock = 0x0440 as *const _;
724 #[doc = r"Return the pointer to the register block"]
725 #[inline(always)]
726 pub const fn ptr() -> *const ta3::RegisterBlock {
727 Self::PTR
728 }
729}
730impl Deref for TA3 {
731 type Target = ta3::RegisterBlock;
732 #[inline(always)]
733 fn deref(&self) -> &Self::Target {
734 unsafe { &*Self::PTR }
735 }
736}
737impl core::fmt::Debug for TA3 {
738 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
739 f.debug_struct("TA3").finish()
740 }
741}
742#[doc = "TA3"]
743pub mod ta3;
744#[doc = "TB0"]
745pub struct TB0 {
746 _marker: PhantomData<*const ()>,
747}
748unsafe impl Send for TB0 {}
749impl TB0 {
750 #[doc = r"Pointer to the register block"]
751 pub const PTR: *const tb0::RegisterBlock = 0x0480 as *const _;
752 #[doc = r"Return the pointer to the register block"]
753 #[inline(always)]
754 pub const fn ptr() -> *const tb0::RegisterBlock {
755 Self::PTR
756 }
757}
758impl Deref for TB0 {
759 type Target = tb0::RegisterBlock;
760 #[inline(always)]
761 fn deref(&self) -> &Self::Target {
762 unsafe { &*Self::PTR }
763 }
764}
765impl core::fmt::Debug for TB0 {
766 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
767 f.debug_struct("TB0").finish()
768 }
769}
770#[doc = "TB0"]
771pub mod tb0;
772#[doc = "MPY32"]
773pub struct MPY32 {
774 _marker: PhantomData<*const ()>,
775}
776unsafe impl Send for MPY32 {}
777impl MPY32 {
778 #[doc = r"Pointer to the register block"]
779 pub const PTR: *const mpy32::RegisterBlock = 0x04c0 as *const _;
780 #[doc = r"Return the pointer to the register block"]
781 #[inline(always)]
782 pub const fn ptr() -> *const mpy32::RegisterBlock {
783 Self::PTR
784 }
785}
786impl Deref for MPY32 {
787 type Target = mpy32::RegisterBlock;
788 #[inline(always)]
789 fn deref(&self) -> &Self::Target {
790 unsafe { &*Self::PTR }
791 }
792}
793impl core::fmt::Debug for MPY32 {
794 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
795 f.debug_struct("MPY32").finish()
796 }
797}
798#[doc = "MPY32"]
799pub mod mpy32;
800#[doc = "eUSCI_A0"]
801pub struct E_USCI_A0 {
802 _marker: PhantomData<*const ()>,
803}
804unsafe impl Send for E_USCI_A0 {}
805impl E_USCI_A0 {
806 #[doc = r"Pointer to the register block"]
807 pub const PTR: *const e_usci_a0::RegisterBlock = 0x0500 as *const _;
808 #[doc = r"Return the pointer to the register block"]
809 #[inline(always)]
810 pub const fn ptr() -> *const e_usci_a0::RegisterBlock {
811 Self::PTR
812 }
813}
814impl Deref for E_USCI_A0 {
815 type Target = e_usci_a0::RegisterBlock;
816 #[inline(always)]
817 fn deref(&self) -> &Self::Target {
818 unsafe { &*Self::PTR }
819 }
820}
821impl core::fmt::Debug for E_USCI_A0 {
822 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
823 f.debug_struct("E_USCI_A0").finish()
824 }
825}
826#[doc = "eUSCI_A0"]
827pub mod e_usci_a0;
828#[doc = "eUSCI_A1"]
829pub struct E_USCI_A1 {
830 _marker: PhantomData<*const ()>,
831}
832unsafe impl Send for E_USCI_A1 {}
833impl E_USCI_A1 {
834 #[doc = r"Pointer to the register block"]
835 pub const PTR: *const e_usci_a1::RegisterBlock = 0x0520 as *const _;
836 #[doc = r"Return the pointer to the register block"]
837 #[inline(always)]
838 pub const fn ptr() -> *const e_usci_a1::RegisterBlock {
839 Self::PTR
840 }
841}
842impl Deref for E_USCI_A1 {
843 type Target = e_usci_a1::RegisterBlock;
844 #[inline(always)]
845 fn deref(&self) -> &Self::Target {
846 unsafe { &*Self::PTR }
847 }
848}
849impl core::fmt::Debug for E_USCI_A1 {
850 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
851 f.debug_struct("E_USCI_A1").finish()
852 }
853}
854#[doc = "eUSCI_A1"]
855pub mod e_usci_a1;
856#[doc = "eUSCI_B0"]
857pub struct E_USCI_B0 {
858 _marker: PhantomData<*const ()>,
859}
860unsafe impl Send for E_USCI_B0 {}
861impl E_USCI_B0 {
862 #[doc = r"Pointer to the register block"]
863 pub const PTR: *const e_usci_b0::RegisterBlock = 0x0540 as *const _;
864 #[doc = r"Return the pointer to the register block"]
865 #[inline(always)]
866 pub const fn ptr() -> *const e_usci_b0::RegisterBlock {
867 Self::PTR
868 }
869}
870impl Deref for E_USCI_B0 {
871 type Target = e_usci_b0::RegisterBlock;
872 #[inline(always)]
873 fn deref(&self) -> &Self::Target {
874 unsafe { &*Self::PTR }
875 }
876}
877impl core::fmt::Debug for E_USCI_B0 {
878 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
879 f.debug_struct("E_USCI_B0").finish()
880 }
881}
882#[doc = "eUSCI_B0"]
883pub mod e_usci_b0;
884#[doc = "eUSCI_B1"]
885pub struct E_USCI_B1 {
886 _marker: PhantomData<*const ()>,
887}
888unsafe impl Send for E_USCI_B1 {}
889impl E_USCI_B1 {
890 #[doc = r"Pointer to the register block"]
891 pub const PTR: *const e_usci_b1::RegisterBlock = 0x0580 as *const _;
892 #[doc = r"Return the pointer to the register block"]
893 #[inline(always)]
894 pub const fn ptr() -> *const e_usci_b1::RegisterBlock {
895 Self::PTR
896 }
897}
898impl Deref for E_USCI_B1 {
899 type Target = e_usci_b1::RegisterBlock;
900 #[inline(always)]
901 fn deref(&self) -> &Self::Target {
902 unsafe { &*Self::PTR }
903 }
904}
905impl core::fmt::Debug for E_USCI_B1 {
906 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
907 f.debug_struct("E_USCI_B1").finish()
908 }
909}
910#[doc = "eUSCI_B1"]
911pub mod e_usci_b1;
912#[doc = "BKMEM"]
913pub struct BKMEM {
914 _marker: PhantomData<*const ()>,
915}
916unsafe impl Send for BKMEM {}
917impl BKMEM {
918 #[doc = r"Pointer to the register block"]
919 pub const PTR: *const bkmem::RegisterBlock = 0x0660 as *const _;
920 #[doc = r"Return the pointer to the register block"]
921 #[inline(always)]
922 pub const fn ptr() -> *const bkmem::RegisterBlock {
923 Self::PTR
924 }
925}
926impl Deref for BKMEM {
927 type Target = bkmem::RegisterBlock;
928 #[inline(always)]
929 fn deref(&self) -> &Self::Target {
930 unsafe { &*Self::PTR }
931 }
932}
933impl core::fmt::Debug for BKMEM {
934 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
935 f.debug_struct("BKMEM").finish()
936 }
937}
938#[doc = "BKMEM"]
939pub mod bkmem;
940#[doc = "ADC"]
941pub struct ADC {
942 _marker: PhantomData<*const ()>,
943}
944unsafe impl Send for ADC {}
945impl ADC {
946 #[doc = r"Pointer to the register block"]
947 pub const PTR: *const adc::RegisterBlock = 0x0700 as *const _;
948 #[doc = r"Return the pointer to the register block"]
949 #[inline(always)]
950 pub const fn ptr() -> *const adc::RegisterBlock {
951 Self::PTR
952 }
953}
954impl Deref for ADC {
955 type Target = adc::RegisterBlock;
956 #[inline(always)]
957 fn deref(&self) -> &Self::Target {
958 unsafe { &*Self::PTR }
959 }
960}
961impl core::fmt::Debug for ADC {
962 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
963 f.debug_struct("ADC").finish()
964 }
965}
966#[doc = "ADC"]
967pub mod adc;
968#[doc = "eCOMP0"]
969pub struct E_COMP0 {
970 _marker: PhantomData<*const ()>,
971}
972unsafe impl Send for E_COMP0 {}
973impl E_COMP0 {
974 #[doc = r"Pointer to the register block"]
975 pub const PTR: *const e_comp0::RegisterBlock = 0x08e0 as *const _;
976 #[doc = r"Return the pointer to the register block"]
977 #[inline(always)]
978 pub const fn ptr() -> *const e_comp0::RegisterBlock {
979 Self::PTR
980 }
981}
982impl Deref for E_COMP0 {
983 type Target = e_comp0::RegisterBlock;
984 #[inline(always)]
985 fn deref(&self) -> &Self::Target {
986 unsafe { &*Self::PTR }
987 }
988}
989impl core::fmt::Debug for E_COMP0 {
990 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
991 f.debug_struct("E_COMP0").finish()
992 }
993}
994#[doc = "eCOMP0"]
995pub mod e_comp0;
996#[no_mangle]
997static mut DEVICE_PERIPHERALS: bool = false;
998#[doc = r" All the peripherals."]
999#[allow(non_snake_case)]
1000pub struct Peripherals {
1001 #[doc = "P1"]
1002 pub P1: P1,
1003 #[doc = "P2"]
1004 pub P2: P2,
1005 #[doc = "P3"]
1006 pub P3: P3,
1007 #[doc = "P4"]
1008 pub P4: P4,
1009 #[doc = "P5"]
1010 pub P5: P5,
1011 #[doc = "P6"]
1012 pub P6: P6,
1013 #[doc = "SFR"]
1014 pub SFR: SFR,
1015 #[doc = "PMM"]
1016 pub PMM: PMM,
1017 #[doc = "SYS"]
1018 pub SYS: SYS,
1019 #[doc = "CS"]
1020 pub CS: CS,
1021 #[doc = "FRCTL"]
1022 pub FRCTL: FRCTL,
1023 #[doc = "CRC"]
1024 pub CRC: CRC,
1025 #[doc = "WDT_A"]
1026 pub WDT_A: WDT_A,
1027 #[doc = "RTC"]
1028 pub RTC: RTC,
1029 #[doc = "PJ"]
1030 pub PJ: PJ,
1031 #[doc = "TA0"]
1032 pub TA0: TA0,
1033 #[doc = "TA1"]
1034 pub TA1: TA1,
1035 #[doc = "TA2"]
1036 pub TA2: TA2,
1037 #[doc = "TA3"]
1038 pub TA3: TA3,
1039 #[doc = "TB0"]
1040 pub TB0: TB0,
1041 #[doc = "MPY32"]
1042 pub MPY32: MPY32,
1043 #[doc = "E_USCI_A0"]
1044 pub E_USCI_A0: E_USCI_A0,
1045 #[doc = "E_USCI_A1"]
1046 pub E_USCI_A1: E_USCI_A1,
1047 #[doc = "E_USCI_B0"]
1048 pub E_USCI_B0: E_USCI_B0,
1049 #[doc = "E_USCI_B1"]
1050 pub E_USCI_B1: E_USCI_B1,
1051 #[doc = "BKMEM"]
1052 pub BKMEM: BKMEM,
1053 #[doc = "ADC"]
1054 pub ADC: ADC,
1055 #[doc = "E_COMP0"]
1056 pub E_COMP0: E_COMP0,
1057}
1058impl Peripherals {
1059 #[doc = r" Returns all the peripherals *once*."]
1060 #[cfg(feature = "critical-section")]
1061 #[inline]
1062 pub fn take() -> Option<Self> {
1063 critical_section::with(|_| {
1064 if unsafe { DEVICE_PERIPHERALS } {
1065 return None;
1066 }
1067 Some(unsafe { Peripherals::steal() })
1068 })
1069 }
1070 #[doc = r" Unchecked version of `Peripherals::take`."]
1071 #[doc = r""]
1072 #[doc = r" # Safety"]
1073 #[doc = r""]
1074 #[doc = r" Each of the returned peripherals must be used at most once."]
1075 #[inline]
1076 pub unsafe fn steal() -> Self {
1077 DEVICE_PERIPHERALS = true;
1078 Peripherals {
1079 P1: P1 {
1080 _marker: PhantomData,
1081 },
1082 P2: P2 {
1083 _marker: PhantomData,
1084 },
1085 P3: P3 {
1086 _marker: PhantomData,
1087 },
1088 P4: P4 {
1089 _marker: PhantomData,
1090 },
1091 P5: P5 {
1092 _marker: PhantomData,
1093 },
1094 P6: P6 {
1095 _marker: PhantomData,
1096 },
1097 SFR: SFR {
1098 _marker: PhantomData,
1099 },
1100 PMM: PMM {
1101 _marker: PhantomData,
1102 },
1103 SYS: SYS {
1104 _marker: PhantomData,
1105 },
1106 CS: CS {
1107 _marker: PhantomData,
1108 },
1109 FRCTL: FRCTL {
1110 _marker: PhantomData,
1111 },
1112 CRC: CRC {
1113 _marker: PhantomData,
1114 },
1115 WDT_A: WDT_A {
1116 _marker: PhantomData,
1117 },
1118 RTC: RTC {
1119 _marker: PhantomData,
1120 },
1121 PJ: PJ {
1122 _marker: PhantomData,
1123 },
1124 TA0: TA0 {
1125 _marker: PhantomData,
1126 },
1127 TA1: TA1 {
1128 _marker: PhantomData,
1129 },
1130 TA2: TA2 {
1131 _marker: PhantomData,
1132 },
1133 TA3: TA3 {
1134 _marker: PhantomData,
1135 },
1136 TB0: TB0 {
1137 _marker: PhantomData,
1138 },
1139 MPY32: MPY32 {
1140 _marker: PhantomData,
1141 },
1142 E_USCI_A0: E_USCI_A0 {
1143 _marker: PhantomData,
1144 },
1145 E_USCI_A1: E_USCI_A1 {
1146 _marker: PhantomData,
1147 },
1148 E_USCI_B0: E_USCI_B0 {
1149 _marker: PhantomData,
1150 },
1151 E_USCI_B1: E_USCI_B1 {
1152 _marker: PhantomData,
1153 },
1154 BKMEM: BKMEM {
1155 _marker: PhantomData,
1156 },
1157 ADC: ADC {
1158 _marker: PhantomData,
1159 },
1160 E_COMP0: E_COMP0 {
1161 _marker: PhantomData,
1162 },
1163 }
1164 }
1165}