tm4c123x/
lib.rs

1#![doc = "Peripheral access API for TM4C123X microcontrollers (generated using svd2rust v0.17.0)\n\nYou can find an overview of the API [here].\n\n[here]: https://docs.rs/svd2rust/0.17.0/svd2rust/#peripheral-api"]
2#![deny(const_err)]
3#![deny(dead_code)]
4#![deny(improper_ctypes)]
5#![deny(legacy_directory_ownership)]
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(plugin_as_library)]
13#![deny(private_in_public)]
14#![deny(safe_extern_statics)]
15#![deny(unconditional_recursion)]
16#![deny(unions_with_drop_fields)]
17#![deny(unused_allocation)]
18#![deny(unused_comparisons)]
19#![deny(unused_parens)]
20#![deny(while_true)]
21#![allow(non_camel_case_types)]
22#![allow(non_snake_case)]
23#![no_std]
24extern crate cortex_m;
25#[cfg(feature = "rt")]
26extern crate cortex_m_rt;
27extern crate vcell;
28use core::marker::PhantomData;
29use core::ops::Deref;
30#[doc = r"Number available in the NVIC for configuring priority"]
31pub const NVIC_PRIO_BITS: u8 = 3;
32#[cfg(feature = "rt")]
33extern "C" {
34    fn GPIOA();
35    fn GPIOB();
36    fn GPIOC();
37    fn GPIOD();
38    fn GPIOE();
39    fn UART0();
40    fn UART1();
41    fn SSI0();
42    fn I2C0();
43    fn PWM0_FAULT();
44    fn PWM0_0();
45    fn PWM0_1();
46    fn PWM0_2();
47    fn QEI0();
48    fn ADC0SS0();
49    fn ADC0SS1();
50    fn ADC0SS2();
51    fn ADC0SS3();
52    fn WATCHDOG();
53    fn TIMER0A();
54    fn TIMER0B();
55    fn TIMER1A();
56    fn TIMER1B();
57    fn TIMER2A();
58    fn TIMER2B();
59    fn COMP0();
60    fn COMP1();
61    fn SYSCTL();
62    fn FLASH();
63    fn GPIOF();
64    fn UART2();
65    fn SSI1();
66    fn TIMER3A();
67    fn TIMER3B();
68    fn I2C1();
69    fn QEI1();
70    fn CAN0();
71    fn CAN1();
72    fn HIBERNATE();
73    fn USB0();
74    fn PWM0_3();
75    fn UDMA();
76    fn UDMAERR();
77    fn ADC1SS0();
78    fn ADC1SS1();
79    fn ADC1SS2();
80    fn ADC1SS3();
81    fn SSI2();
82    fn SSI3();
83    fn UART3();
84    fn UART4();
85    fn UART5();
86    fn UART6();
87    fn UART7();
88    fn I2C2();
89    fn I2C3();
90    fn TIMER4A();
91    fn TIMER4B();
92    fn TIMER5A();
93    fn TIMER5B();
94    fn WTIMER0A();
95    fn WTIMER0B();
96    fn WTIMER1A();
97    fn WTIMER1B();
98    fn WTIMER2A();
99    fn WTIMER2B();
100    fn WTIMER3A();
101    fn WTIMER3B();
102    fn WTIMER4A();
103    fn WTIMER4B();
104    fn WTIMER5A();
105    fn WTIMER5B();
106    fn SYSEXC();
107    fn PWM1_0();
108    fn PWM1_1();
109    fn PWM1_2();
110    fn PWM1_3();
111    fn PWM1_FAULT();
112}
113#[doc(hidden)]
114pub union Vector {
115    _handler: unsafe extern "C" fn(),
116    _reserved: u32,
117}
118#[cfg(feature = "rt")]
119#[doc(hidden)]
120#[link_section = ".vector_table.interrupts"]
121#[no_mangle]
122pub static __INTERRUPTS: [Vector; 139] = [
123    Vector { _handler: GPIOA },
124    Vector { _handler: GPIOB },
125    Vector { _handler: GPIOC },
126    Vector { _handler: GPIOD },
127    Vector { _handler: GPIOE },
128    Vector { _handler: UART0 },
129    Vector { _handler: UART1 },
130    Vector { _handler: SSI0 },
131    Vector { _handler: I2C0 },
132    Vector { _handler: PWM0_FAULT },
133    Vector { _handler: PWM0_0 },
134    Vector { _handler: PWM0_1 },
135    Vector { _handler: PWM0_2 },
136    Vector { _handler: QEI0 },
137    Vector { _handler: ADC0SS0 },
138    Vector { _handler: ADC0SS1 },
139    Vector { _handler: ADC0SS2 },
140    Vector { _handler: ADC0SS3 },
141    Vector { _handler: WATCHDOG },
142    Vector { _handler: TIMER0A },
143    Vector { _handler: TIMER0B },
144    Vector { _handler: TIMER1A },
145    Vector { _handler: TIMER1B },
146    Vector { _handler: TIMER2A },
147    Vector { _handler: TIMER2B },
148    Vector { _handler: COMP0 },
149    Vector { _handler: COMP1 },
150    Vector { _reserved: 0 },
151    Vector { _handler: SYSCTL },
152    Vector { _handler: FLASH },
153    Vector { _handler: GPIOF },
154    Vector { _reserved: 0 },
155    Vector { _reserved: 0 },
156    Vector { _handler: UART2 },
157    Vector { _handler: SSI1 },
158    Vector { _handler: TIMER3A },
159    Vector { _handler: TIMER3B },
160    Vector { _handler: I2C1 },
161    Vector { _handler: QEI1 },
162    Vector { _handler: CAN0 },
163    Vector { _handler: CAN1 },
164    Vector { _reserved: 0 },
165    Vector { _reserved: 0 },
166    Vector { _handler: HIBERNATE },
167    Vector { _handler: USB0 },
168    Vector { _handler: PWM0_3 },
169    Vector { _handler: UDMA },
170    Vector { _handler: UDMAERR },
171    Vector { _handler: ADC1SS0 },
172    Vector { _handler: ADC1SS1 },
173    Vector { _handler: ADC1SS2 },
174    Vector { _handler: ADC1SS3 },
175    Vector { _reserved: 0 },
176    Vector { _reserved: 0 },
177    Vector { _reserved: 0 },
178    Vector { _reserved: 0 },
179    Vector { _reserved: 0 },
180    Vector { _handler: SSI2 },
181    Vector { _handler: SSI3 },
182    Vector { _handler: UART3 },
183    Vector { _handler: UART4 },
184    Vector { _handler: UART5 },
185    Vector { _handler: UART6 },
186    Vector { _handler: UART7 },
187    Vector { _reserved: 0 },
188    Vector { _reserved: 0 },
189    Vector { _reserved: 0 },
190    Vector { _reserved: 0 },
191    Vector { _handler: I2C2 },
192    Vector { _handler: I2C3 },
193    Vector { _handler: TIMER4A },
194    Vector { _handler: TIMER4B },
195    Vector { _reserved: 0 },
196    Vector { _reserved: 0 },
197    Vector { _reserved: 0 },
198    Vector { _reserved: 0 },
199    Vector { _reserved: 0 },
200    Vector { _reserved: 0 },
201    Vector { _reserved: 0 },
202    Vector { _reserved: 0 },
203    Vector { _reserved: 0 },
204    Vector { _reserved: 0 },
205    Vector { _reserved: 0 },
206    Vector { _reserved: 0 },
207    Vector { _reserved: 0 },
208    Vector { _reserved: 0 },
209    Vector { _reserved: 0 },
210    Vector { _reserved: 0 },
211    Vector { _reserved: 0 },
212    Vector { _reserved: 0 },
213    Vector { _reserved: 0 },
214    Vector { _reserved: 0 },
215    Vector { _handler: TIMER5A },
216    Vector { _handler: TIMER5B },
217    Vector { _handler: WTIMER0A },
218    Vector { _handler: WTIMER0B },
219    Vector { _handler: WTIMER1A },
220    Vector { _handler: WTIMER1B },
221    Vector { _handler: WTIMER2A },
222    Vector { _handler: WTIMER2B },
223    Vector { _handler: WTIMER3A },
224    Vector { _handler: WTIMER3B },
225    Vector { _handler: WTIMER4A },
226    Vector { _handler: WTIMER4B },
227    Vector { _handler: WTIMER5A },
228    Vector { _handler: WTIMER5B },
229    Vector { _handler: SYSEXC },
230    Vector { _reserved: 0 },
231    Vector { _reserved: 0 },
232    Vector { _reserved: 0 },
233    Vector { _reserved: 0 },
234    Vector { _reserved: 0 },
235    Vector { _reserved: 0 },
236    Vector { _reserved: 0 },
237    Vector { _reserved: 0 },
238    Vector { _reserved: 0 },
239    Vector { _reserved: 0 },
240    Vector { _reserved: 0 },
241    Vector { _reserved: 0 },
242    Vector { _reserved: 0 },
243    Vector { _reserved: 0 },
244    Vector { _reserved: 0 },
245    Vector { _reserved: 0 },
246    Vector { _reserved: 0 },
247    Vector { _reserved: 0 },
248    Vector { _reserved: 0 },
249    Vector { _reserved: 0 },
250    Vector { _reserved: 0 },
251    Vector { _reserved: 0 },
252    Vector { _reserved: 0 },
253    Vector { _reserved: 0 },
254    Vector { _reserved: 0 },
255    Vector { _reserved: 0 },
256    Vector { _reserved: 0 },
257    Vector { _handler: PWM1_0 },
258    Vector { _handler: PWM1_1 },
259    Vector { _handler: PWM1_2 },
260    Vector { _handler: PWM1_3 },
261    Vector { _handler: PWM1_FAULT },
262];
263#[doc = r"Enumeration of all the interrupts"]
264#[derive(Copy, Clone, Debug)]
265#[repr(u8)]
266pub enum Interrupt {
267    #[doc = "0 - GPIO Port A"]
268    GPIOA = 0,
269    #[doc = "1 - GPIO Port B"]
270    GPIOB = 1,
271    #[doc = "2 - GPIO Port C"]
272    GPIOC = 2,
273    #[doc = "3 - GPIO Port D"]
274    GPIOD = 3,
275    #[doc = "4 - GPIO Port E"]
276    GPIOE = 4,
277    #[doc = "5 - UART0"]
278    UART0 = 5,
279    #[doc = "6 - UART1"]
280    UART1 = 6,
281    #[doc = "7 - SSI0"]
282    SSI0 = 7,
283    #[doc = "8 - I2C0"]
284    I2C0 = 8,
285    #[doc = "9 - PWM0 Fault"]
286    PWM0_FAULT = 9,
287    #[doc = "10 - PWM0 Generator 0"]
288    PWM0_0 = 10,
289    #[doc = "11 - PWM0 Generator 1"]
290    PWM0_1 = 11,
291    #[doc = "12 - PWM0 Generator 2"]
292    PWM0_2 = 12,
293    #[doc = "13 - QEI0"]
294    QEI0 = 13,
295    #[doc = "14 - ADC0 Sequence 0"]
296    ADC0SS0 = 14,
297    #[doc = "15 - ADC0 Sequence 1"]
298    ADC0SS1 = 15,
299    #[doc = "16 - ADC0 Sequence 2"]
300    ADC0SS2 = 16,
301    #[doc = "17 - ADC0 Sequence 3"]
302    ADC0SS3 = 17,
303    #[doc = "18 - Watchdog Timers 0 and 1"]
304    WATCHDOG = 18,
305    #[doc = "19 - 16/32-Bit Timer 0A"]
306    TIMER0A = 19,
307    #[doc = "20 - 16/32-Bit Timer 0B"]
308    TIMER0B = 20,
309    #[doc = "21 - 16/32-Bit Timer 1A"]
310    TIMER1A = 21,
311    #[doc = "22 - 16/32-Bit Timer 1B"]
312    TIMER1B = 22,
313    #[doc = "23 - 16/32-Bit Timer 2A"]
314    TIMER2A = 23,
315    #[doc = "24 - 16/32-Bit Timer 2B"]
316    TIMER2B = 24,
317    #[doc = "25 - Analog Comparator 0"]
318    COMP0 = 25,
319    #[doc = "26 - Analog Comparator 1"]
320    COMP1 = 26,
321    #[doc = "28 - System Control"]
322    SYSCTL = 28,
323    #[doc = "29 - Flash Memory Control and EEPROM Control"]
324    FLASH = 29,
325    #[doc = "30 - GPIO Port F"]
326    GPIOF = 30,
327    #[doc = "33 - UART2"]
328    UART2 = 33,
329    #[doc = "34 - SSI1"]
330    SSI1 = 34,
331    #[doc = "35 - Timer 3A"]
332    TIMER3A = 35,
333    #[doc = "36 - Timer 3B"]
334    TIMER3B = 36,
335    #[doc = "37 - I2C1"]
336    I2C1 = 37,
337    #[doc = "38 - QEI1"]
338    QEI1 = 38,
339    #[doc = "39 - CAN0"]
340    CAN0 = 39,
341    #[doc = "40 - CAN1"]
342    CAN1 = 40,
343    #[doc = "43 - Hibernation Module"]
344    HIBERNATE = 43,
345    #[doc = "44 - USB"]
346    USB0 = 44,
347    #[doc = "45 - PWM Generator 3"]
348    PWM0_3 = 45,
349    #[doc = "46 - uDMA Software"]
350    UDMA = 46,
351    #[doc = "47 - uDMA Error"]
352    UDMAERR = 47,
353    #[doc = "48 - ADC1 Sequence 0"]
354    ADC1SS0 = 48,
355    #[doc = "49 - ADC1 Sequence 1"]
356    ADC1SS1 = 49,
357    #[doc = "50 - ADC1 Sequence 2"]
358    ADC1SS2 = 50,
359    #[doc = "51 - ADC1 Sequence 3"]
360    ADC1SS3 = 51,
361    #[doc = "57 - SSI2"]
362    SSI2 = 57,
363    #[doc = "58 - SSI3"]
364    SSI3 = 58,
365    #[doc = "59 - UART3"]
366    UART3 = 59,
367    #[doc = "60 - UART4"]
368    UART4 = 60,
369    #[doc = "61 - UART5"]
370    UART5 = 61,
371    #[doc = "62 - UART6"]
372    UART6 = 62,
373    #[doc = "63 - UART7"]
374    UART7 = 63,
375    #[doc = "68 - I2C2"]
376    I2C2 = 68,
377    #[doc = "69 - I2C3"]
378    I2C3 = 69,
379    #[doc = "70 - 16/32-Bit Timer 4A"]
380    TIMER4A = 70,
381    #[doc = "71 - 16/32-Bit Timer 4B"]
382    TIMER4B = 71,
383    #[doc = "92 - 16/32-Bit Timer 5A"]
384    TIMER5A = 92,
385    #[doc = "93 - 16/32-Bit Timer 5B"]
386    TIMER5B = 93,
387    #[doc = "94 - 32/64-Bit Timer 0A"]
388    WTIMER0A = 94,
389    #[doc = "95 - 32/64-Bit Timer 0B"]
390    WTIMER0B = 95,
391    #[doc = "96 - 32/64-Bit Timer 1A"]
392    WTIMER1A = 96,
393    #[doc = "97 - 32/64-Bit Timer 1B"]
394    WTIMER1B = 97,
395    #[doc = "98 - 32/64-Bit Timer 2A"]
396    WTIMER2A = 98,
397    #[doc = "99 - 32/64-Bit Timer 2B"]
398    WTIMER2B = 99,
399    #[doc = "100 - 32/64-Bit Timer 3A"]
400    WTIMER3A = 100,
401    #[doc = "101 - 32/64-Bit Timer 3B"]
402    WTIMER3B = 101,
403    #[doc = "102 - 32/64-Bit Timer 4A"]
404    WTIMER4A = 102,
405    #[doc = "103 - 32/64-Bit Timer 4B"]
406    WTIMER4B = 103,
407    #[doc = "104 - 32/64-Bit Timer 5A"]
408    WTIMER5A = 104,
409    #[doc = "105 - 32/64-Bit Timer 5B"]
410    WTIMER5B = 105,
411    #[doc = "106 - System Exception (imprecise)"]
412    SYSEXC = 106,
413    #[doc = "134 - PWM1 Generator 0"]
414    PWM1_0 = 134,
415    #[doc = "135 - PWM1 Generator 1"]
416    PWM1_1 = 135,
417    #[doc = "136 - PWM1 Generator 2"]
418    PWM1_2 = 136,
419    #[doc = "137 - PWM1 Generator 3"]
420    PWM1_3 = 137,
421    #[doc = "138 - PWM1 Fault"]
422    PWM1_FAULT = 138,
423}
424unsafe impl cortex_m::interrupt::InterruptNumber for Interrupt {
425    #[inline(always)]
426    fn number(self) -> u16 {
427        self as u16
428    }
429}
430#[cfg(feature = "rt")]
431pub use self::Interrupt as interrupt;
432pub use cortex_m::peripheral::Peripherals as CorePeripherals;
433pub use cortex_m::peripheral::{CBP, CPUID, DCB, DWT, FPB, FPU, ITM, MPU, NVIC, SCB, SYST, TPIU};
434#[cfg(feature = "rt")]
435pub use cortex_m_rt::interrupt;
436#[allow(unused_imports)]
437use generic::*;
438#[doc = r"Common register and bit access and modify traits"]
439pub mod generic;
440#[doc = "Watchdog Timer register offsets"]
441pub struct WATCHDOG0 {
442    _marker: PhantomData<*const ()>,
443}
444unsafe impl Send for WATCHDOG0 {}
445impl WATCHDOG0 {
446    #[doc = r"Returns a pointer to the register block"]
447    #[inline(always)]
448    pub const fn ptr() -> *const watchdog0::RegisterBlock {
449        0x4000_0000 as *const _
450    }
451}
452impl Deref for WATCHDOG0 {
453    type Target = watchdog0::RegisterBlock;
454    #[inline(always)]
455    fn deref(&self) -> &Self::Target {
456        unsafe { &*WATCHDOG0::ptr() }
457    }
458}
459#[doc = "Watchdog Timer register offsets"]
460pub mod watchdog0;
461#[doc = "Watchdog Timer register offsets"]
462pub struct WATCHDOG1 {
463    _marker: PhantomData<*const ()>,
464}
465unsafe impl Send for WATCHDOG1 {}
466impl WATCHDOG1 {
467    #[doc = r"Returns a pointer to the register block"]
468    #[inline(always)]
469    pub const fn ptr() -> *const watchdog0::RegisterBlock {
470        0x4000_1000 as *const _
471    }
472}
473impl Deref for WATCHDOG1 {
474    type Target = watchdog0::RegisterBlock;
475    #[inline(always)]
476    fn deref(&self) -> &Self::Target {
477        unsafe { &*WATCHDOG1::ptr() }
478    }
479}
480#[doc = "GPIO register offsets"]
481pub struct GPIO_PORTA {
482    _marker: PhantomData<*const ()>,
483}
484unsafe impl Send for GPIO_PORTA {}
485impl GPIO_PORTA {
486    #[doc = r"Returns a pointer to the register block"]
487    #[inline(always)]
488    pub const fn ptr() -> *const gpio_porta::RegisterBlock {
489        0x4000_4000 as *const _
490    }
491}
492impl Deref for GPIO_PORTA {
493    type Target = gpio_porta::RegisterBlock;
494    #[inline(always)]
495    fn deref(&self) -> &Self::Target {
496        unsafe { &*GPIO_PORTA::ptr() }
497    }
498}
499#[doc = "GPIO register offsets"]
500pub mod gpio_porta;
501#[doc = "GPIO register offsets"]
502pub struct GPIO_PORTB {
503    _marker: PhantomData<*const ()>,
504}
505unsafe impl Send for GPIO_PORTB {}
506impl GPIO_PORTB {
507    #[doc = r"Returns a pointer to the register block"]
508    #[inline(always)]
509    pub const fn ptr() -> *const gpio_porta::RegisterBlock {
510        0x4000_5000 as *const _
511    }
512}
513impl Deref for GPIO_PORTB {
514    type Target = gpio_porta::RegisterBlock;
515    #[inline(always)]
516    fn deref(&self) -> &Self::Target {
517        unsafe { &*GPIO_PORTB::ptr() }
518    }
519}
520#[doc = "GPIO register offsets"]
521pub struct GPIO_PORTC {
522    _marker: PhantomData<*const ()>,
523}
524unsafe impl Send for GPIO_PORTC {}
525impl GPIO_PORTC {
526    #[doc = r"Returns a pointer to the register block"]
527    #[inline(always)]
528    pub const fn ptr() -> *const gpio_porta::RegisterBlock {
529        0x4000_6000 as *const _
530    }
531}
532impl Deref for GPIO_PORTC {
533    type Target = gpio_porta::RegisterBlock;
534    #[inline(always)]
535    fn deref(&self) -> &Self::Target {
536        unsafe { &*GPIO_PORTC::ptr() }
537    }
538}
539#[doc = "GPIO register offsets"]
540pub struct GPIO_PORTD {
541    _marker: PhantomData<*const ()>,
542}
543unsafe impl Send for GPIO_PORTD {}
544impl GPIO_PORTD {
545    #[doc = r"Returns a pointer to the register block"]
546    #[inline(always)]
547    pub const fn ptr() -> *const gpio_porta::RegisterBlock {
548        0x4000_7000 as *const _
549    }
550}
551impl Deref for GPIO_PORTD {
552    type Target = gpio_porta::RegisterBlock;
553    #[inline(always)]
554    fn deref(&self) -> &Self::Target {
555        unsafe { &*GPIO_PORTD::ptr() }
556    }
557}
558#[doc = "SSI register offsets"]
559pub struct SSI0 {
560    _marker: PhantomData<*const ()>,
561}
562unsafe impl Send for SSI0 {}
563impl SSI0 {
564    #[doc = r"Returns a pointer to the register block"]
565    #[inline(always)]
566    pub const fn ptr() -> *const ssi0::RegisterBlock {
567        0x4000_8000 as *const _
568    }
569}
570impl Deref for SSI0 {
571    type Target = ssi0::RegisterBlock;
572    #[inline(always)]
573    fn deref(&self) -> &Self::Target {
574        unsafe { &*SSI0::ptr() }
575    }
576}
577#[doc = "SSI register offsets"]
578pub mod ssi0;
579#[doc = "SSI register offsets"]
580pub struct SSI1 {
581    _marker: PhantomData<*const ()>,
582}
583unsafe impl Send for SSI1 {}
584impl SSI1 {
585    #[doc = r"Returns a pointer to the register block"]
586    #[inline(always)]
587    pub const fn ptr() -> *const ssi0::RegisterBlock {
588        0x4000_9000 as *const _
589    }
590}
591impl Deref for SSI1 {
592    type Target = ssi0::RegisterBlock;
593    #[inline(always)]
594    fn deref(&self) -> &Self::Target {
595        unsafe { &*SSI1::ptr() }
596    }
597}
598#[doc = "SSI register offsets"]
599pub struct SSI2 {
600    _marker: PhantomData<*const ()>,
601}
602unsafe impl Send for SSI2 {}
603impl SSI2 {
604    #[doc = r"Returns a pointer to the register block"]
605    #[inline(always)]
606    pub const fn ptr() -> *const ssi0::RegisterBlock {
607        0x4000_a000 as *const _
608    }
609}
610impl Deref for SSI2 {
611    type Target = ssi0::RegisterBlock;
612    #[inline(always)]
613    fn deref(&self) -> &Self::Target {
614        unsafe { &*SSI2::ptr() }
615    }
616}
617#[doc = "SSI register offsets"]
618pub struct SSI3 {
619    _marker: PhantomData<*const ()>,
620}
621unsafe impl Send for SSI3 {}
622impl SSI3 {
623    #[doc = r"Returns a pointer to the register block"]
624    #[inline(always)]
625    pub const fn ptr() -> *const ssi0::RegisterBlock {
626        0x4000_b000 as *const _
627    }
628}
629impl Deref for SSI3 {
630    type Target = ssi0::RegisterBlock;
631    #[inline(always)]
632    fn deref(&self) -> &Self::Target {
633        unsafe { &*SSI3::ptr() }
634    }
635}
636#[doc = "UART register offsets"]
637pub struct UART0 {
638    _marker: PhantomData<*const ()>,
639}
640unsafe impl Send for UART0 {}
641impl UART0 {
642    #[doc = r"Returns a pointer to the register block"]
643    #[inline(always)]
644    pub const fn ptr() -> *const uart0::RegisterBlock {
645        0x4000_c000 as *const _
646    }
647}
648impl Deref for UART0 {
649    type Target = uart0::RegisterBlock;
650    #[inline(always)]
651    fn deref(&self) -> &Self::Target {
652        unsafe { &*UART0::ptr() }
653    }
654}
655#[doc = "UART register offsets"]
656pub mod uart0;
657#[doc = "UART register offsets"]
658pub struct UART1 {
659    _marker: PhantomData<*const ()>,
660}
661unsafe impl Send for UART1 {}
662impl UART1 {
663    #[doc = r"Returns a pointer to the register block"]
664    #[inline(always)]
665    pub const fn ptr() -> *const uart0::RegisterBlock {
666        0x4000_d000 as *const _
667    }
668}
669impl Deref for UART1 {
670    type Target = uart0::RegisterBlock;
671    #[inline(always)]
672    fn deref(&self) -> &Self::Target {
673        unsafe { &*UART1::ptr() }
674    }
675}
676#[doc = "UART register offsets"]
677pub struct UART2 {
678    _marker: PhantomData<*const ()>,
679}
680unsafe impl Send for UART2 {}
681impl UART2 {
682    #[doc = r"Returns a pointer to the register block"]
683    #[inline(always)]
684    pub const fn ptr() -> *const uart0::RegisterBlock {
685        0x4000_e000 as *const _
686    }
687}
688impl Deref for UART2 {
689    type Target = uart0::RegisterBlock;
690    #[inline(always)]
691    fn deref(&self) -> &Self::Target {
692        unsafe { &*UART2::ptr() }
693    }
694}
695#[doc = "UART register offsets"]
696pub struct UART3 {
697    _marker: PhantomData<*const ()>,
698}
699unsafe impl Send for UART3 {}
700impl UART3 {
701    #[doc = r"Returns a pointer to the register block"]
702    #[inline(always)]
703    pub const fn ptr() -> *const uart0::RegisterBlock {
704        0x4000_f000 as *const _
705    }
706}
707impl Deref for UART3 {
708    type Target = uart0::RegisterBlock;
709    #[inline(always)]
710    fn deref(&self) -> &Self::Target {
711        unsafe { &*UART3::ptr() }
712    }
713}
714#[doc = "UART register offsets"]
715pub struct UART4 {
716    _marker: PhantomData<*const ()>,
717}
718unsafe impl Send for UART4 {}
719impl UART4 {
720    #[doc = r"Returns a pointer to the register block"]
721    #[inline(always)]
722    pub const fn ptr() -> *const uart0::RegisterBlock {
723        0x4001_0000 as *const _
724    }
725}
726impl Deref for UART4 {
727    type Target = uart0::RegisterBlock;
728    #[inline(always)]
729    fn deref(&self) -> &Self::Target {
730        unsafe { &*UART4::ptr() }
731    }
732}
733#[doc = "UART register offsets"]
734pub struct UART5 {
735    _marker: PhantomData<*const ()>,
736}
737unsafe impl Send for UART5 {}
738impl UART5 {
739    #[doc = r"Returns a pointer to the register block"]
740    #[inline(always)]
741    pub const fn ptr() -> *const uart0::RegisterBlock {
742        0x4001_1000 as *const _
743    }
744}
745impl Deref for UART5 {
746    type Target = uart0::RegisterBlock;
747    #[inline(always)]
748    fn deref(&self) -> &Self::Target {
749        unsafe { &*UART5::ptr() }
750    }
751}
752#[doc = "UART register offsets"]
753pub struct UART6 {
754    _marker: PhantomData<*const ()>,
755}
756unsafe impl Send for UART6 {}
757impl UART6 {
758    #[doc = r"Returns a pointer to the register block"]
759    #[inline(always)]
760    pub const fn ptr() -> *const uart0::RegisterBlock {
761        0x4001_2000 as *const _
762    }
763}
764impl Deref for UART6 {
765    type Target = uart0::RegisterBlock;
766    #[inline(always)]
767    fn deref(&self) -> &Self::Target {
768        unsafe { &*UART6::ptr() }
769    }
770}
771#[doc = "UART register offsets"]
772pub struct UART7 {
773    _marker: PhantomData<*const ()>,
774}
775unsafe impl Send for UART7 {}
776impl UART7 {
777    #[doc = r"Returns a pointer to the register block"]
778    #[inline(always)]
779    pub const fn ptr() -> *const uart0::RegisterBlock {
780        0x4001_3000 as *const _
781    }
782}
783impl Deref for UART7 {
784    type Target = uart0::RegisterBlock;
785    #[inline(always)]
786    fn deref(&self) -> &Self::Target {
787        unsafe { &*UART7::ptr() }
788    }
789}
790#[doc = "I2C register offsets"]
791pub struct I2C0 {
792    _marker: PhantomData<*const ()>,
793}
794unsafe impl Send for I2C0 {}
795impl I2C0 {
796    #[doc = r"Returns a pointer to the register block"]
797    #[inline(always)]
798    pub const fn ptr() -> *const i2c0::RegisterBlock {
799        0x4002_0000 as *const _
800    }
801}
802impl Deref for I2C0 {
803    type Target = i2c0::RegisterBlock;
804    #[inline(always)]
805    fn deref(&self) -> &Self::Target {
806        unsafe { &*I2C0::ptr() }
807    }
808}
809#[doc = "I2C register offsets"]
810pub mod i2c0;
811#[doc = "I2C register offsets"]
812pub struct I2C1 {
813    _marker: PhantomData<*const ()>,
814}
815unsafe impl Send for I2C1 {}
816impl I2C1 {
817    #[doc = r"Returns a pointer to the register block"]
818    #[inline(always)]
819    pub const fn ptr() -> *const i2c0::RegisterBlock {
820        0x4002_1000 as *const _
821    }
822}
823impl Deref for I2C1 {
824    type Target = i2c0::RegisterBlock;
825    #[inline(always)]
826    fn deref(&self) -> &Self::Target {
827        unsafe { &*I2C1::ptr() }
828    }
829}
830#[doc = "I2C register offsets"]
831pub struct I2C2 {
832    _marker: PhantomData<*const ()>,
833}
834unsafe impl Send for I2C2 {}
835impl I2C2 {
836    #[doc = r"Returns a pointer to the register block"]
837    #[inline(always)]
838    pub const fn ptr() -> *const i2c0::RegisterBlock {
839        0x4002_2000 as *const _
840    }
841}
842impl Deref for I2C2 {
843    type Target = i2c0::RegisterBlock;
844    #[inline(always)]
845    fn deref(&self) -> &Self::Target {
846        unsafe { &*I2C2::ptr() }
847    }
848}
849#[doc = "I2C register offsets"]
850pub struct I2C3 {
851    _marker: PhantomData<*const ()>,
852}
853unsafe impl Send for I2C3 {}
854impl I2C3 {
855    #[doc = r"Returns a pointer to the register block"]
856    #[inline(always)]
857    pub const fn ptr() -> *const i2c0::RegisterBlock {
858        0x4002_3000 as *const _
859    }
860}
861impl Deref for I2C3 {
862    type Target = i2c0::RegisterBlock;
863    #[inline(always)]
864    fn deref(&self) -> &Self::Target {
865        unsafe { &*I2C3::ptr() }
866    }
867}
868#[doc = "GPIO register offsets"]
869pub struct GPIO_PORTE {
870    _marker: PhantomData<*const ()>,
871}
872unsafe impl Send for GPIO_PORTE {}
873impl GPIO_PORTE {
874    #[doc = r"Returns a pointer to the register block"]
875    #[inline(always)]
876    pub const fn ptr() -> *const gpio_porta::RegisterBlock {
877        0x4002_4000 as *const _
878    }
879}
880impl Deref for GPIO_PORTE {
881    type Target = gpio_porta::RegisterBlock;
882    #[inline(always)]
883    fn deref(&self) -> &Self::Target {
884        unsafe { &*GPIO_PORTE::ptr() }
885    }
886}
887#[doc = "GPIO register offsets"]
888pub struct GPIO_PORTF {
889    _marker: PhantomData<*const ()>,
890}
891unsafe impl Send for GPIO_PORTF {}
892impl GPIO_PORTF {
893    #[doc = r"Returns a pointer to the register block"]
894    #[inline(always)]
895    pub const fn ptr() -> *const gpio_porta::RegisterBlock {
896        0x4002_5000 as *const _
897    }
898}
899impl Deref for GPIO_PORTF {
900    type Target = gpio_porta::RegisterBlock;
901    #[inline(always)]
902    fn deref(&self) -> &Self::Target {
903        unsafe { &*GPIO_PORTF::ptr() }
904    }
905}
906#[doc = "PWM register offsets"]
907pub struct PWM0 {
908    _marker: PhantomData<*const ()>,
909}
910unsafe impl Send for PWM0 {}
911impl PWM0 {
912    #[doc = r"Returns a pointer to the register block"]
913    #[inline(always)]
914    pub const fn ptr() -> *const pwm0::RegisterBlock {
915        0x4002_8000 as *const _
916    }
917}
918impl Deref for PWM0 {
919    type Target = pwm0::RegisterBlock;
920    #[inline(always)]
921    fn deref(&self) -> &Self::Target {
922        unsafe { &*PWM0::ptr() }
923    }
924}
925#[doc = "PWM register offsets"]
926pub mod pwm0;
927#[doc = "PWM register offsets"]
928pub struct PWM1 {
929    _marker: PhantomData<*const ()>,
930}
931unsafe impl Send for PWM1 {}
932impl PWM1 {
933    #[doc = r"Returns a pointer to the register block"]
934    #[inline(always)]
935    pub const fn ptr() -> *const pwm0::RegisterBlock {
936        0x4002_9000 as *const _
937    }
938}
939impl Deref for PWM1 {
940    type Target = pwm0::RegisterBlock;
941    #[inline(always)]
942    fn deref(&self) -> &Self::Target {
943        unsafe { &*PWM1::ptr() }
944    }
945}
946#[doc = "QEI register offsets"]
947pub struct QEI0 {
948    _marker: PhantomData<*const ()>,
949}
950unsafe impl Send for QEI0 {}
951impl QEI0 {
952    #[doc = r"Returns a pointer to the register block"]
953    #[inline(always)]
954    pub const fn ptr() -> *const qei0::RegisterBlock {
955        0x4002_c000 as *const _
956    }
957}
958impl Deref for QEI0 {
959    type Target = qei0::RegisterBlock;
960    #[inline(always)]
961    fn deref(&self) -> &Self::Target {
962        unsafe { &*QEI0::ptr() }
963    }
964}
965#[doc = "QEI register offsets"]
966pub mod qei0;
967#[doc = "QEI register offsets"]
968pub struct QEI1 {
969    _marker: PhantomData<*const ()>,
970}
971unsafe impl Send for QEI1 {}
972impl QEI1 {
973    #[doc = r"Returns a pointer to the register block"]
974    #[inline(always)]
975    pub const fn ptr() -> *const qei0::RegisterBlock {
976        0x4002_d000 as *const _
977    }
978}
979impl Deref for QEI1 {
980    type Target = qei0::RegisterBlock;
981    #[inline(always)]
982    fn deref(&self) -> &Self::Target {
983        unsafe { &*QEI1::ptr() }
984    }
985}
986#[doc = "Timer register offsets"]
987pub struct TIMER0 {
988    _marker: PhantomData<*const ()>,
989}
990unsafe impl Send for TIMER0 {}
991impl TIMER0 {
992    #[doc = r"Returns a pointer to the register block"]
993    #[inline(always)]
994    pub const fn ptr() -> *const timer0::RegisterBlock {
995        0x4003_0000 as *const _
996    }
997}
998impl Deref for TIMER0 {
999    type Target = timer0::RegisterBlock;
1000    #[inline(always)]
1001    fn deref(&self) -> &Self::Target {
1002        unsafe { &*TIMER0::ptr() }
1003    }
1004}
1005#[doc = "Timer register offsets"]
1006pub mod timer0;
1007#[doc = "Timer register offsets"]
1008pub struct TIMER1 {
1009    _marker: PhantomData<*const ()>,
1010}
1011unsafe impl Send for TIMER1 {}
1012impl TIMER1 {
1013    #[doc = r"Returns a pointer to the register block"]
1014    #[inline(always)]
1015    pub const fn ptr() -> *const timer0::RegisterBlock {
1016        0x4003_1000 as *const _
1017    }
1018}
1019impl Deref for TIMER1 {
1020    type Target = timer0::RegisterBlock;
1021    #[inline(always)]
1022    fn deref(&self) -> &Self::Target {
1023        unsafe { &*TIMER1::ptr() }
1024    }
1025}
1026#[doc = "Timer register offsets"]
1027pub struct TIMER2 {
1028    _marker: PhantomData<*const ()>,
1029}
1030unsafe impl Send for TIMER2 {}
1031impl TIMER2 {
1032    #[doc = r"Returns a pointer to the register block"]
1033    #[inline(always)]
1034    pub const fn ptr() -> *const timer0::RegisterBlock {
1035        0x4003_2000 as *const _
1036    }
1037}
1038impl Deref for TIMER2 {
1039    type Target = timer0::RegisterBlock;
1040    #[inline(always)]
1041    fn deref(&self) -> &Self::Target {
1042        unsafe { &*TIMER2::ptr() }
1043    }
1044}
1045#[doc = "Timer register offsets"]
1046pub struct TIMER3 {
1047    _marker: PhantomData<*const ()>,
1048}
1049unsafe impl Send for TIMER3 {}
1050impl TIMER3 {
1051    #[doc = r"Returns a pointer to the register block"]
1052    #[inline(always)]
1053    pub const fn ptr() -> *const timer0::RegisterBlock {
1054        0x4003_3000 as *const _
1055    }
1056}
1057impl Deref for TIMER3 {
1058    type Target = timer0::RegisterBlock;
1059    #[inline(always)]
1060    fn deref(&self) -> &Self::Target {
1061        unsafe { &*TIMER3::ptr() }
1062    }
1063}
1064#[doc = "Timer register offsets"]
1065pub struct TIMER4 {
1066    _marker: PhantomData<*const ()>,
1067}
1068unsafe impl Send for TIMER4 {}
1069impl TIMER4 {
1070    #[doc = r"Returns a pointer to the register block"]
1071    #[inline(always)]
1072    pub const fn ptr() -> *const timer0::RegisterBlock {
1073        0x4003_4000 as *const _
1074    }
1075}
1076impl Deref for TIMER4 {
1077    type Target = timer0::RegisterBlock;
1078    #[inline(always)]
1079    fn deref(&self) -> &Self::Target {
1080        unsafe { &*TIMER4::ptr() }
1081    }
1082}
1083#[doc = "Timer register offsets"]
1084pub struct TIMER5 {
1085    _marker: PhantomData<*const ()>,
1086}
1087unsafe impl Send for TIMER5 {}
1088impl TIMER5 {
1089    #[doc = r"Returns a pointer to the register block"]
1090    #[inline(always)]
1091    pub const fn ptr() -> *const timer0::RegisterBlock {
1092        0x4003_5000 as *const _
1093    }
1094}
1095impl Deref for TIMER5 {
1096    type Target = timer0::RegisterBlock;
1097    #[inline(always)]
1098    fn deref(&self) -> &Self::Target {
1099        unsafe { &*TIMER5::ptr() }
1100    }
1101}
1102#[doc = "Timer register offsets"]
1103pub struct WTIMER0 {
1104    _marker: PhantomData<*const ()>,
1105}
1106unsafe impl Send for WTIMER0 {}
1107impl WTIMER0 {
1108    #[doc = r"Returns a pointer to the register block"]
1109    #[inline(always)]
1110    pub const fn ptr() -> *const wtimer0::RegisterBlock {
1111        0x4003_6000 as *const _
1112    }
1113}
1114impl Deref for WTIMER0 {
1115    type Target = wtimer0::RegisterBlock;
1116    #[inline(always)]
1117    fn deref(&self) -> &Self::Target {
1118        unsafe { &*WTIMER0::ptr() }
1119    }
1120}
1121#[doc = "Timer register offsets"]
1122pub mod wtimer0;
1123#[doc = "Timer register offsets"]
1124pub struct WTIMER1 {
1125    _marker: PhantomData<*const ()>,
1126}
1127unsafe impl Send for WTIMER1 {}
1128impl WTIMER1 {
1129    #[doc = r"Returns a pointer to the register block"]
1130    #[inline(always)]
1131    pub const fn ptr() -> *const wtimer0::RegisterBlock {
1132        0x4003_7000 as *const _
1133    }
1134}
1135impl Deref for WTIMER1 {
1136    type Target = wtimer0::RegisterBlock;
1137    #[inline(always)]
1138    fn deref(&self) -> &Self::Target {
1139        unsafe { &*WTIMER1::ptr() }
1140    }
1141}
1142#[doc = "ADC register offsets"]
1143pub struct ADC0 {
1144    _marker: PhantomData<*const ()>,
1145}
1146unsafe impl Send for ADC0 {}
1147impl ADC0 {
1148    #[doc = r"Returns a pointer to the register block"]
1149    #[inline(always)]
1150    pub const fn ptr() -> *const adc0::RegisterBlock {
1151        0x4003_8000 as *const _
1152    }
1153}
1154impl Deref for ADC0 {
1155    type Target = adc0::RegisterBlock;
1156    #[inline(always)]
1157    fn deref(&self) -> &Self::Target {
1158        unsafe { &*ADC0::ptr() }
1159    }
1160}
1161#[doc = "ADC register offsets"]
1162pub mod adc0;
1163#[doc = "ADC register offsets"]
1164pub struct ADC1 {
1165    _marker: PhantomData<*const ()>,
1166}
1167unsafe impl Send for ADC1 {}
1168impl ADC1 {
1169    #[doc = r"Returns a pointer to the register block"]
1170    #[inline(always)]
1171    pub const fn ptr() -> *const adc0::RegisterBlock {
1172        0x4003_9000 as *const _
1173    }
1174}
1175impl Deref for ADC1 {
1176    type Target = adc0::RegisterBlock;
1177    #[inline(always)]
1178    fn deref(&self) -> &Self::Target {
1179        unsafe { &*ADC1::ptr() }
1180    }
1181}
1182#[doc = "Comparator register offsets"]
1183pub struct COMP {
1184    _marker: PhantomData<*const ()>,
1185}
1186unsafe impl Send for COMP {}
1187impl COMP {
1188    #[doc = r"Returns a pointer to the register block"]
1189    #[inline(always)]
1190    pub const fn ptr() -> *const comp::RegisterBlock {
1191        0x4003_c000 as *const _
1192    }
1193}
1194impl Deref for COMP {
1195    type Target = comp::RegisterBlock;
1196    #[inline(always)]
1197    fn deref(&self) -> &Self::Target {
1198        unsafe { &*COMP::ptr() }
1199    }
1200}
1201#[doc = "Comparator register offsets"]
1202pub mod comp;
1203#[doc = "CAN register offsets"]
1204pub struct CAN0 {
1205    _marker: PhantomData<*const ()>,
1206}
1207unsafe impl Send for CAN0 {}
1208impl CAN0 {
1209    #[doc = r"Returns a pointer to the register block"]
1210    #[inline(always)]
1211    pub const fn ptr() -> *const can0::RegisterBlock {
1212        0x4004_0000 as *const _
1213    }
1214}
1215impl Deref for CAN0 {
1216    type Target = can0::RegisterBlock;
1217    #[inline(always)]
1218    fn deref(&self) -> &Self::Target {
1219        unsafe { &*CAN0::ptr() }
1220    }
1221}
1222#[doc = "CAN register offsets"]
1223pub mod can0;
1224#[doc = "CAN register offsets"]
1225pub struct CAN1 {
1226    _marker: PhantomData<*const ()>,
1227}
1228unsafe impl Send for CAN1 {}
1229impl CAN1 {
1230    #[doc = r"Returns a pointer to the register block"]
1231    #[inline(always)]
1232    pub const fn ptr() -> *const can0::RegisterBlock {
1233        0x4004_1000 as *const _
1234    }
1235}
1236impl Deref for CAN1 {
1237    type Target = can0::RegisterBlock;
1238    #[inline(always)]
1239    fn deref(&self) -> &Self::Target {
1240        unsafe { &*CAN1::ptr() }
1241    }
1242}
1243#[doc = "Timer register offsets"]
1244pub struct WTIMER2 {
1245    _marker: PhantomData<*const ()>,
1246}
1247unsafe impl Send for WTIMER2 {}
1248impl WTIMER2 {
1249    #[doc = r"Returns a pointer to the register block"]
1250    #[inline(always)]
1251    pub const fn ptr() -> *const wtimer0::RegisterBlock {
1252        0x4004_c000 as *const _
1253    }
1254}
1255impl Deref for WTIMER2 {
1256    type Target = wtimer0::RegisterBlock;
1257    #[inline(always)]
1258    fn deref(&self) -> &Self::Target {
1259        unsafe { &*WTIMER2::ptr() }
1260    }
1261}
1262#[doc = "Timer register offsets"]
1263pub struct WTIMER3 {
1264    _marker: PhantomData<*const ()>,
1265}
1266unsafe impl Send for WTIMER3 {}
1267impl WTIMER3 {
1268    #[doc = r"Returns a pointer to the register block"]
1269    #[inline(always)]
1270    pub const fn ptr() -> *const wtimer0::RegisterBlock {
1271        0x4004_d000 as *const _
1272    }
1273}
1274impl Deref for WTIMER3 {
1275    type Target = wtimer0::RegisterBlock;
1276    #[inline(always)]
1277    fn deref(&self) -> &Self::Target {
1278        unsafe { &*WTIMER3::ptr() }
1279    }
1280}
1281#[doc = "Timer register offsets"]
1282pub struct WTIMER4 {
1283    _marker: PhantomData<*const ()>,
1284}
1285unsafe impl Send for WTIMER4 {}
1286impl WTIMER4 {
1287    #[doc = r"Returns a pointer to the register block"]
1288    #[inline(always)]
1289    pub const fn ptr() -> *const wtimer0::RegisterBlock {
1290        0x4004_e000 as *const _
1291    }
1292}
1293impl Deref for WTIMER4 {
1294    type Target = wtimer0::RegisterBlock;
1295    #[inline(always)]
1296    fn deref(&self) -> &Self::Target {
1297        unsafe { &*WTIMER4::ptr() }
1298    }
1299}
1300#[doc = "Timer register offsets"]
1301pub struct WTIMER5 {
1302    _marker: PhantomData<*const ()>,
1303}
1304unsafe impl Send for WTIMER5 {}
1305impl WTIMER5 {
1306    #[doc = r"Returns a pointer to the register block"]
1307    #[inline(always)]
1308    pub const fn ptr() -> *const wtimer0::RegisterBlock {
1309        0x4004_f000 as *const _
1310    }
1311}
1312impl Deref for WTIMER5 {
1313    type Target = wtimer0::RegisterBlock;
1314    #[inline(always)]
1315    fn deref(&self) -> &Self::Target {
1316        unsafe { &*WTIMER5::ptr() }
1317    }
1318}
1319#[doc = "Univeral Serial Bus register offsets"]
1320pub struct USB0 {
1321    _marker: PhantomData<*const ()>,
1322}
1323unsafe impl Send for USB0 {}
1324impl USB0 {
1325    #[doc = r"Returns a pointer to the register block"]
1326    #[inline(always)]
1327    pub const fn ptr() -> *const usb0::RegisterBlock {
1328        0x4005_0000 as *const _
1329    }
1330}
1331impl Deref for USB0 {
1332    type Target = usb0::RegisterBlock;
1333    #[inline(always)]
1334    fn deref(&self) -> &Self::Target {
1335        unsafe { &*USB0::ptr() }
1336    }
1337}
1338#[doc = "Univeral Serial Bus register offsets"]
1339pub mod usb0;
1340#[doc = "GPIO register offsets"]
1341pub struct GPIO_PORTA_AHB {
1342    _marker: PhantomData<*const ()>,
1343}
1344unsafe impl Send for GPIO_PORTA_AHB {}
1345impl GPIO_PORTA_AHB {
1346    #[doc = r"Returns a pointer to the register block"]
1347    #[inline(always)]
1348    pub const fn ptr() -> *const gpio_porta::RegisterBlock {
1349        0x4005_8000 as *const _
1350    }
1351}
1352impl Deref for GPIO_PORTA_AHB {
1353    type Target = gpio_porta::RegisterBlock;
1354    #[inline(always)]
1355    fn deref(&self) -> &Self::Target {
1356        unsafe { &*GPIO_PORTA_AHB::ptr() }
1357    }
1358}
1359#[doc = "GPIO register offsets"]
1360pub struct GPIO_PORTB_AHB {
1361    _marker: PhantomData<*const ()>,
1362}
1363unsafe impl Send for GPIO_PORTB_AHB {}
1364impl GPIO_PORTB_AHB {
1365    #[doc = r"Returns a pointer to the register block"]
1366    #[inline(always)]
1367    pub const fn ptr() -> *const gpio_porta::RegisterBlock {
1368        0x4005_9000 as *const _
1369    }
1370}
1371impl Deref for GPIO_PORTB_AHB {
1372    type Target = gpio_porta::RegisterBlock;
1373    #[inline(always)]
1374    fn deref(&self) -> &Self::Target {
1375        unsafe { &*GPIO_PORTB_AHB::ptr() }
1376    }
1377}
1378#[doc = "GPIO register offsets"]
1379pub struct GPIO_PORTC_AHB {
1380    _marker: PhantomData<*const ()>,
1381}
1382unsafe impl Send for GPIO_PORTC_AHB {}
1383impl GPIO_PORTC_AHB {
1384    #[doc = r"Returns a pointer to the register block"]
1385    #[inline(always)]
1386    pub const fn ptr() -> *const gpio_porta::RegisterBlock {
1387        0x4005_a000 as *const _
1388    }
1389}
1390impl Deref for GPIO_PORTC_AHB {
1391    type Target = gpio_porta::RegisterBlock;
1392    #[inline(always)]
1393    fn deref(&self) -> &Self::Target {
1394        unsafe { &*GPIO_PORTC_AHB::ptr() }
1395    }
1396}
1397#[doc = "GPIO register offsets"]
1398pub struct GPIO_PORTD_AHB {
1399    _marker: PhantomData<*const ()>,
1400}
1401unsafe impl Send for GPIO_PORTD_AHB {}
1402impl GPIO_PORTD_AHB {
1403    #[doc = r"Returns a pointer to the register block"]
1404    #[inline(always)]
1405    pub const fn ptr() -> *const gpio_porta::RegisterBlock {
1406        0x4005_b000 as *const _
1407    }
1408}
1409impl Deref for GPIO_PORTD_AHB {
1410    type Target = gpio_porta::RegisterBlock;
1411    #[inline(always)]
1412    fn deref(&self) -> &Self::Target {
1413        unsafe { &*GPIO_PORTD_AHB::ptr() }
1414    }
1415}
1416#[doc = "GPIO register offsets"]
1417pub struct GPIO_PORTE_AHB {
1418    _marker: PhantomData<*const ()>,
1419}
1420unsafe impl Send for GPIO_PORTE_AHB {}
1421impl GPIO_PORTE_AHB {
1422    #[doc = r"Returns a pointer to the register block"]
1423    #[inline(always)]
1424    pub const fn ptr() -> *const gpio_porta::RegisterBlock {
1425        0x4005_c000 as *const _
1426    }
1427}
1428impl Deref for GPIO_PORTE_AHB {
1429    type Target = gpio_porta::RegisterBlock;
1430    #[inline(always)]
1431    fn deref(&self) -> &Self::Target {
1432        unsafe { &*GPIO_PORTE_AHB::ptr() }
1433    }
1434}
1435#[doc = "GPIO register offsets"]
1436pub struct GPIO_PORTF_AHB {
1437    _marker: PhantomData<*const ()>,
1438}
1439unsafe impl Send for GPIO_PORTF_AHB {}
1440impl GPIO_PORTF_AHB {
1441    #[doc = r"Returns a pointer to the register block"]
1442    #[inline(always)]
1443    pub const fn ptr() -> *const gpio_porta::RegisterBlock {
1444        0x4005_d000 as *const _
1445    }
1446}
1447impl Deref for GPIO_PORTF_AHB {
1448    type Target = gpio_porta::RegisterBlock;
1449    #[inline(always)]
1450    fn deref(&self) -> &Self::Target {
1451        unsafe { &*GPIO_PORTF_AHB::ptr() }
1452    }
1453}
1454#[doc = "EEPROM register offsets"]
1455pub struct EEPROM {
1456    _marker: PhantomData<*const ()>,
1457}
1458unsafe impl Send for EEPROM {}
1459impl EEPROM {
1460    #[doc = r"Returns a pointer to the register block"]
1461    #[inline(always)]
1462    pub const fn ptr() -> *const eeprom::RegisterBlock {
1463        0x400a_f000 as *const _
1464    }
1465}
1466impl Deref for EEPROM {
1467    type Target = eeprom::RegisterBlock;
1468    #[inline(always)]
1469    fn deref(&self) -> &Self::Target {
1470        unsafe { &*EEPROM::ptr() }
1471    }
1472}
1473#[doc = "EEPROM register offsets"]
1474pub mod eeprom;
1475#[doc = "System Exception Module register addresses"]
1476pub struct SYSEXC {
1477    _marker: PhantomData<*const ()>,
1478}
1479unsafe impl Send for SYSEXC {}
1480impl SYSEXC {
1481    #[doc = r"Returns a pointer to the register block"]
1482    #[inline(always)]
1483    pub const fn ptr() -> *const sysexc::RegisterBlock {
1484        0x400f_9000 as *const _
1485    }
1486}
1487impl Deref for SYSEXC {
1488    type Target = sysexc::RegisterBlock;
1489    #[inline(always)]
1490    fn deref(&self) -> &Self::Target {
1491        unsafe { &*SYSEXC::ptr() }
1492    }
1493}
1494#[doc = "System Exception Module register addresses"]
1495pub mod sysexc;
1496#[doc = "Hibernation module register addresses"]
1497pub struct HIB {
1498    _marker: PhantomData<*const ()>,
1499}
1500unsafe impl Send for HIB {}
1501impl HIB {
1502    #[doc = r"Returns a pointer to the register block"]
1503    #[inline(always)]
1504    pub const fn ptr() -> *const hib::RegisterBlock {
1505        0x400f_c000 as *const _
1506    }
1507}
1508impl Deref for HIB {
1509    type Target = hib::RegisterBlock;
1510    #[inline(always)]
1511    fn deref(&self) -> &Self::Target {
1512        unsafe { &*HIB::ptr() }
1513    }
1514}
1515#[doc = "Hibernation module register addresses"]
1516pub mod hib;
1517#[doc = "FLASH register offsets"]
1518pub struct FLASH_CTRL {
1519    _marker: PhantomData<*const ()>,
1520}
1521unsafe impl Send for FLASH_CTRL {}
1522impl FLASH_CTRL {
1523    #[doc = r"Returns a pointer to the register block"]
1524    #[inline(always)]
1525    pub const fn ptr() -> *const flash_ctrl::RegisterBlock {
1526        0x400f_d000 as *const _
1527    }
1528}
1529impl Deref for FLASH_CTRL {
1530    type Target = flash_ctrl::RegisterBlock;
1531    #[inline(always)]
1532    fn deref(&self) -> &Self::Target {
1533        unsafe { &*FLASH_CTRL::ptr() }
1534    }
1535}
1536#[doc = "FLASH register offsets"]
1537pub mod flash_ctrl;
1538#[doc = "System Control register addresses"]
1539pub struct SYSCTL {
1540    _marker: PhantomData<*const ()>,
1541}
1542unsafe impl Send for SYSCTL {}
1543impl SYSCTL {
1544    #[doc = r"Returns a pointer to the register block"]
1545    #[inline(always)]
1546    pub const fn ptr() -> *const sysctl::RegisterBlock {
1547        0x400f_e000 as *const _
1548    }
1549}
1550impl Deref for SYSCTL {
1551    type Target = sysctl::RegisterBlock;
1552    #[inline(always)]
1553    fn deref(&self) -> &Self::Target {
1554        unsafe { &*SYSCTL::ptr() }
1555    }
1556}
1557#[doc = "System Control register addresses"]
1558pub mod sysctl;
1559#[doc = "Micro Direct Memory Access register addresses"]
1560pub struct UDMA {
1561    _marker: PhantomData<*const ()>,
1562}
1563unsafe impl Send for UDMA {}
1564impl UDMA {
1565    #[doc = r"Returns a pointer to the register block"]
1566    #[inline(always)]
1567    pub const fn ptr() -> *const udma::RegisterBlock {
1568        0x400f_f000 as *const _
1569    }
1570}
1571impl Deref for UDMA {
1572    type Target = udma::RegisterBlock;
1573    #[inline(always)]
1574    fn deref(&self) -> &Self::Target {
1575        unsafe { &*UDMA::ptr() }
1576    }
1577}
1578#[doc = "Micro Direct Memory Access register addresses"]
1579pub mod udma;
1580#[no_mangle]
1581static mut DEVICE_PERIPHERALS: bool = false;
1582#[doc = r"All the peripherals"]
1583#[allow(non_snake_case)]
1584pub struct Peripherals {
1585    #[doc = "WATCHDOG0"]
1586    pub WATCHDOG0: WATCHDOG0,
1587    #[doc = "WATCHDOG1"]
1588    pub WATCHDOG1: WATCHDOG1,
1589    #[doc = "GPIO_PORTA"]
1590    pub GPIO_PORTA: GPIO_PORTA,
1591    #[doc = "GPIO_PORTB"]
1592    pub GPIO_PORTB: GPIO_PORTB,
1593    #[doc = "GPIO_PORTC"]
1594    pub GPIO_PORTC: GPIO_PORTC,
1595    #[doc = "GPIO_PORTD"]
1596    pub GPIO_PORTD: GPIO_PORTD,
1597    #[doc = "SSI0"]
1598    pub SSI0: SSI0,
1599    #[doc = "SSI1"]
1600    pub SSI1: SSI1,
1601    #[doc = "SSI2"]
1602    pub SSI2: SSI2,
1603    #[doc = "SSI3"]
1604    pub SSI3: SSI3,
1605    #[doc = "UART0"]
1606    pub UART0: UART0,
1607    #[doc = "UART1"]
1608    pub UART1: UART1,
1609    #[doc = "UART2"]
1610    pub UART2: UART2,
1611    #[doc = "UART3"]
1612    pub UART3: UART3,
1613    #[doc = "UART4"]
1614    pub UART4: UART4,
1615    #[doc = "UART5"]
1616    pub UART5: UART5,
1617    #[doc = "UART6"]
1618    pub UART6: UART6,
1619    #[doc = "UART7"]
1620    pub UART7: UART7,
1621    #[doc = "I2C0"]
1622    pub I2C0: I2C0,
1623    #[doc = "I2C1"]
1624    pub I2C1: I2C1,
1625    #[doc = "I2C2"]
1626    pub I2C2: I2C2,
1627    #[doc = "I2C3"]
1628    pub I2C3: I2C3,
1629    #[doc = "GPIO_PORTE"]
1630    pub GPIO_PORTE: GPIO_PORTE,
1631    #[doc = "GPIO_PORTF"]
1632    pub GPIO_PORTF: GPIO_PORTF,
1633    #[doc = "PWM0"]
1634    pub PWM0: PWM0,
1635    #[doc = "PWM1"]
1636    pub PWM1: PWM1,
1637    #[doc = "QEI0"]
1638    pub QEI0: QEI0,
1639    #[doc = "QEI1"]
1640    pub QEI1: QEI1,
1641    #[doc = "TIMER0"]
1642    pub TIMER0: TIMER0,
1643    #[doc = "TIMER1"]
1644    pub TIMER1: TIMER1,
1645    #[doc = "TIMER2"]
1646    pub TIMER2: TIMER2,
1647    #[doc = "TIMER3"]
1648    pub TIMER3: TIMER3,
1649    #[doc = "TIMER4"]
1650    pub TIMER4: TIMER4,
1651    #[doc = "TIMER5"]
1652    pub TIMER5: TIMER5,
1653    #[doc = "WTIMER0"]
1654    pub WTIMER0: WTIMER0,
1655    #[doc = "WTIMER1"]
1656    pub WTIMER1: WTIMER1,
1657    #[doc = "ADC0"]
1658    pub ADC0: ADC0,
1659    #[doc = "ADC1"]
1660    pub ADC1: ADC1,
1661    #[doc = "COMP"]
1662    pub COMP: COMP,
1663    #[doc = "CAN0"]
1664    pub CAN0: CAN0,
1665    #[doc = "CAN1"]
1666    pub CAN1: CAN1,
1667    #[doc = "WTIMER2"]
1668    pub WTIMER2: WTIMER2,
1669    #[doc = "WTIMER3"]
1670    pub WTIMER3: WTIMER3,
1671    #[doc = "WTIMER4"]
1672    pub WTIMER4: WTIMER4,
1673    #[doc = "WTIMER5"]
1674    pub WTIMER5: WTIMER5,
1675    #[doc = "USB0"]
1676    pub USB0: USB0,
1677    #[doc = "GPIO_PORTA_AHB"]
1678    pub GPIO_PORTA_AHB: GPIO_PORTA_AHB,
1679    #[doc = "GPIO_PORTB_AHB"]
1680    pub GPIO_PORTB_AHB: GPIO_PORTB_AHB,
1681    #[doc = "GPIO_PORTC_AHB"]
1682    pub GPIO_PORTC_AHB: GPIO_PORTC_AHB,
1683    #[doc = "GPIO_PORTD_AHB"]
1684    pub GPIO_PORTD_AHB: GPIO_PORTD_AHB,
1685    #[doc = "GPIO_PORTE_AHB"]
1686    pub GPIO_PORTE_AHB: GPIO_PORTE_AHB,
1687    #[doc = "GPIO_PORTF_AHB"]
1688    pub GPIO_PORTF_AHB: GPIO_PORTF_AHB,
1689    #[doc = "EEPROM"]
1690    pub EEPROM: EEPROM,
1691    #[doc = "SYSEXC"]
1692    pub SYSEXC: SYSEXC,
1693    #[doc = "HIB"]
1694    pub HIB: HIB,
1695    #[doc = "FLASH_CTRL"]
1696    pub FLASH_CTRL: FLASH_CTRL,
1697    #[doc = "SYSCTL"]
1698    pub SYSCTL: SYSCTL,
1699    #[doc = "UDMA"]
1700    pub UDMA: UDMA,
1701}
1702impl Peripherals {
1703    #[doc = r"Returns all the peripherals *once*"]
1704    #[inline]
1705    pub fn take() -> Option<Self> {
1706        cortex_m::interrupt::free(|_| if unsafe { DEVICE_PERIPHERALS } { None } else { Some(unsafe { Peripherals::steal() }) })
1707    }
1708    #[doc = r"Unchecked version of `Peripherals::take`"]
1709    #[inline]
1710    pub unsafe fn steal() -> Self {
1711        DEVICE_PERIPHERALS = true;
1712        Peripherals {
1713            WATCHDOG0: WATCHDOG0 { _marker: PhantomData },
1714            WATCHDOG1: WATCHDOG1 { _marker: PhantomData },
1715            GPIO_PORTA: GPIO_PORTA { _marker: PhantomData },
1716            GPIO_PORTB: GPIO_PORTB { _marker: PhantomData },
1717            GPIO_PORTC: GPIO_PORTC { _marker: PhantomData },
1718            GPIO_PORTD: GPIO_PORTD { _marker: PhantomData },
1719            SSI0: SSI0 { _marker: PhantomData },
1720            SSI1: SSI1 { _marker: PhantomData },
1721            SSI2: SSI2 { _marker: PhantomData },
1722            SSI3: SSI3 { _marker: PhantomData },
1723            UART0: UART0 { _marker: PhantomData },
1724            UART1: UART1 { _marker: PhantomData },
1725            UART2: UART2 { _marker: PhantomData },
1726            UART3: UART3 { _marker: PhantomData },
1727            UART4: UART4 { _marker: PhantomData },
1728            UART5: UART5 { _marker: PhantomData },
1729            UART6: UART6 { _marker: PhantomData },
1730            UART7: UART7 { _marker: PhantomData },
1731            I2C0: I2C0 { _marker: PhantomData },
1732            I2C1: I2C1 { _marker: PhantomData },
1733            I2C2: I2C2 { _marker: PhantomData },
1734            I2C3: I2C3 { _marker: PhantomData },
1735            GPIO_PORTE: GPIO_PORTE { _marker: PhantomData },
1736            GPIO_PORTF: GPIO_PORTF { _marker: PhantomData },
1737            PWM0: PWM0 { _marker: PhantomData },
1738            PWM1: PWM1 { _marker: PhantomData },
1739            QEI0: QEI0 { _marker: PhantomData },
1740            QEI1: QEI1 { _marker: PhantomData },
1741            TIMER0: TIMER0 { _marker: PhantomData },
1742            TIMER1: TIMER1 { _marker: PhantomData },
1743            TIMER2: TIMER2 { _marker: PhantomData },
1744            TIMER3: TIMER3 { _marker: PhantomData },
1745            TIMER4: TIMER4 { _marker: PhantomData },
1746            TIMER5: TIMER5 { _marker: PhantomData },
1747            WTIMER0: WTIMER0 { _marker: PhantomData },
1748            WTIMER1: WTIMER1 { _marker: PhantomData },
1749            ADC0: ADC0 { _marker: PhantomData },
1750            ADC1: ADC1 { _marker: PhantomData },
1751            COMP: COMP { _marker: PhantomData },
1752            CAN0: CAN0 { _marker: PhantomData },
1753            CAN1: CAN1 { _marker: PhantomData },
1754            WTIMER2: WTIMER2 { _marker: PhantomData },
1755            WTIMER3: WTIMER3 { _marker: PhantomData },
1756            WTIMER4: WTIMER4 { _marker: PhantomData },
1757            WTIMER5: WTIMER5 { _marker: PhantomData },
1758            USB0: USB0 { _marker: PhantomData },
1759            GPIO_PORTA_AHB: GPIO_PORTA_AHB { _marker: PhantomData },
1760            GPIO_PORTB_AHB: GPIO_PORTB_AHB { _marker: PhantomData },
1761            GPIO_PORTC_AHB: GPIO_PORTC_AHB { _marker: PhantomData },
1762            GPIO_PORTD_AHB: GPIO_PORTD_AHB { _marker: PhantomData },
1763            GPIO_PORTE_AHB: GPIO_PORTE_AHB { _marker: PhantomData },
1764            GPIO_PORTF_AHB: GPIO_PORTF_AHB { _marker: PhantomData },
1765            EEPROM: EEPROM { _marker: PhantomData },
1766            SYSEXC: SYSEXC { _marker: PhantomData },
1767            HIB: HIB { _marker: PhantomData },
1768            FLASH_CTRL: FLASH_CTRL { _marker: PhantomData },
1769            SYSCTL: SYSCTL { _marker: PhantomData },
1770            UDMA: UDMA { _marker: PhantomData },
1771        }
1772    }
1773}