1#![doc = "Peripheral access API for ATSAMS70J19 microcontrollers (generated using svd2rust v0.21.0 ( ))\n\nYou can find an overview of the generated API [here].\n\nAPI features to be included in the [next]
2svd2rust 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.21.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"]
3#![deny(const_err)]
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]
21use core::marker::PhantomData;
22use core::ops::Deref;
23#[doc = r"Number available in the NVIC for configuring priority"]
24pub const NVIC_PRIO_BITS: u8 = 3;
25#[cfg(feature = "rt")]
26pub use self::Interrupt as interrupt;
27pub use cortex_m::peripheral::Peripherals as CorePeripherals;
28pub use cortex_m::peripheral::{CBP, CPUID, DCB, DWT, FPB, FPU, ITM, MPU, NVIC, SCB, SYST, TPIU};
29#[cfg(feature = "rt")]
30pub use cortex_m_rt::interrupt;
31#[allow(unused_imports)]
32use generic::*;
33#[doc = r"Common register and bit access and modify traits"]
34pub mod generic;
35#[cfg(feature = "rt")]
36extern "C" {
37 fn SUPC();
38 fn RSTC();
39 fn RTC();
40 fn RTT();
41 fn WDT();
42 fn PMC();
43 fn EFC();
44 fn UART0();
45 fn UART1();
46 fn PIOA();
47 fn PIOB();
48 fn USART0();
49 fn USART1();
50 fn PIOD();
51 fn TWIHS0();
52 fn TWIHS1();
53 fn SSC();
54 fn TC0();
55 fn TC1();
56 fn TC2();
57 fn TC3();
58 fn TC4();
59 fn TC5();
60 fn AFEC0();
61 fn DACC();
62 fn PWM0();
63 fn ICM();
64 fn ACC();
65 fn USBHS();
66 fn AFEC1();
67 fn QSPI();
68 fn UART2();
69 fn TC6();
70 fn TC7();
71 fn TC8();
72 fn TC9();
73 fn TC10();
74 fn TC11();
75 fn AES();
76 fn TRNG();
77 fn XDMAC();
78 fn ISI();
79 fn PWM1();
80 fn FPU();
81 fn RSWDT();
82 fn IXC();
83}
84#[doc(hidden)]
85pub union Vector {
86 _handler: unsafe extern "C" fn(),
87 _reserved: u32,
88}
89#[cfg(feature = "rt")]
90#[doc(hidden)]
91#[link_section = ".vector_table.interrupts"]
92#[no_mangle]
93pub static __INTERRUPTS: [Vector; 69] = [
94 Vector { _handler: SUPC },
95 Vector { _handler: RSTC },
96 Vector { _handler: RTC },
97 Vector { _handler: RTT },
98 Vector { _handler: WDT },
99 Vector { _handler: PMC },
100 Vector { _handler: EFC },
101 Vector { _handler: UART0 },
102 Vector { _handler: UART1 },
103 Vector { _reserved: 0 },
104 Vector { _handler: PIOA },
105 Vector { _handler: PIOB },
106 Vector { _reserved: 0 },
107 Vector { _handler: USART0 },
108 Vector { _handler: USART1 },
109 Vector { _reserved: 0 },
110 Vector { _handler: PIOD },
111 Vector { _reserved: 0 },
112 Vector { _reserved: 0 },
113 Vector { _handler: TWIHS0 },
114 Vector { _handler: TWIHS1 },
115 Vector { _reserved: 0 },
116 Vector { _handler: SSC },
117 Vector { _handler: TC0 },
118 Vector { _handler: TC1 },
119 Vector { _handler: TC2 },
120 Vector { _handler: TC3 },
121 Vector { _handler: TC4 },
122 Vector { _handler: TC5 },
123 Vector { _handler: AFEC0 },
124 Vector { _handler: DACC },
125 Vector { _handler: PWM0 },
126 Vector { _handler: ICM },
127 Vector { _handler: ACC },
128 Vector { _handler: USBHS },
129 Vector { _reserved: 0 },
130 Vector { _reserved: 0 },
131 Vector { _reserved: 0 },
132 Vector { _reserved: 0 },
133 Vector { _reserved: 0 },
134 Vector { _handler: AFEC1 },
135 Vector { _reserved: 0 },
136 Vector { _reserved: 0 },
137 Vector { _handler: QSPI },
138 Vector { _handler: UART2 },
139 Vector { _reserved: 0 },
140 Vector { _reserved: 0 },
141 Vector { _handler: TC6 },
142 Vector { _handler: TC7 },
143 Vector { _handler: TC8 },
144 Vector { _handler: TC9 },
145 Vector { _handler: TC10 },
146 Vector { _handler: TC11 },
147 Vector { _reserved: 0 },
148 Vector { _reserved: 0 },
149 Vector { _reserved: 0 },
150 Vector { _handler: AES },
151 Vector { _handler: TRNG },
152 Vector { _handler: XDMAC },
153 Vector { _handler: ISI },
154 Vector { _handler: PWM1 },
155 Vector { _handler: FPU },
156 Vector { _reserved: 0 },
157 Vector { _handler: RSWDT },
158 Vector { _reserved: 0 },
159 Vector { _reserved: 0 },
160 Vector { _reserved: 0 },
161 Vector { _reserved: 0 },
162 Vector { _handler: IXC },
163];
164#[doc = r"Enumeration of all the interrupts."]
165#[derive(Copy, Clone, Debug, PartialEq, Eq)]
166#[repr(u16)]
167pub enum Interrupt {
168 #[doc = "0 - SUPC"]
169 SUPC = 0,
170 #[doc = "1 - RSTC"]
171 RSTC = 1,
172 #[doc = "2 - RTC"]
173 RTC = 2,
174 #[doc = "3 - RTT"]
175 RTT = 3,
176 #[doc = "4 - WDT"]
177 WDT = 4,
178 #[doc = "5 - PMC"]
179 PMC = 5,
180 #[doc = "6 - EFC"]
181 EFC = 6,
182 #[doc = "7 - UART0"]
183 UART0 = 7,
184 #[doc = "8 - UART1"]
185 UART1 = 8,
186 #[doc = "10 - PIOA"]
187 PIOA = 10,
188 #[doc = "11 - PIOB"]
189 PIOB = 11,
190 #[doc = "13 - USART0"]
191 USART0 = 13,
192 #[doc = "14 - USART1"]
193 USART1 = 14,
194 #[doc = "16 - PIOD"]
195 PIOD = 16,
196 #[doc = "19 - TWIHS0"]
197 TWIHS0 = 19,
198 #[doc = "20 - TWIHS1"]
199 TWIHS1 = 20,
200 #[doc = "22 - SSC"]
201 SSC = 22,
202 #[doc = "23 - TC0"]
203 TC0 = 23,
204 #[doc = "24 - TC1"]
205 TC1 = 24,
206 #[doc = "25 - TC2"]
207 TC2 = 25,
208 #[doc = "26 - TC3"]
209 TC3 = 26,
210 #[doc = "27 - TC4"]
211 TC4 = 27,
212 #[doc = "28 - TC5"]
213 TC5 = 28,
214 #[doc = "29 - AFEC0"]
215 AFEC0 = 29,
216 #[doc = "30 - DACC"]
217 DACC = 30,
218 #[doc = "31 - PWM0"]
219 PWM0 = 31,
220 #[doc = "32 - ICM"]
221 ICM = 32,
222 #[doc = "33 - ACC"]
223 ACC = 33,
224 #[doc = "34 - USBHS"]
225 USBHS = 34,
226 #[doc = "40 - AFEC1"]
227 AFEC1 = 40,
228 #[doc = "43 - QSPI"]
229 QSPI = 43,
230 #[doc = "44 - UART2"]
231 UART2 = 44,
232 #[doc = "47 - TC6"]
233 TC6 = 47,
234 #[doc = "48 - TC7"]
235 TC7 = 48,
236 #[doc = "49 - TC8"]
237 TC8 = 49,
238 #[doc = "50 - TC9"]
239 TC9 = 50,
240 #[doc = "51 - TC10"]
241 TC10 = 51,
242 #[doc = "52 - TC11"]
243 TC11 = 52,
244 #[doc = "56 - AES"]
245 AES = 56,
246 #[doc = "57 - TRNG"]
247 TRNG = 57,
248 #[doc = "58 - XDMAC"]
249 XDMAC = 58,
250 #[doc = "59 - ISI"]
251 ISI = 59,
252 #[doc = "60 - PWM1"]
253 PWM1 = 60,
254 #[doc = "61 - FPU"]
255 FPU = 61,
256 #[doc = "63 - RSWDT"]
257 RSWDT = 63,
258 #[doc = "68 - IXC"]
259 IXC = 68,
260}
261unsafe impl cortex_m::interrupt::InterruptNumber for Interrupt {
262 #[inline(always)]
263 fn number(self) -> u16 {
264 self as u16
265 }
266}
267#[doc = "Analog Comparator Controller"]
268pub struct ACC {
269 _marker: PhantomData<*const ()>,
270}
271unsafe impl Send for ACC {}
272impl ACC {
273 #[doc = r"Pointer to the register block"]
274 pub const PTR: *const acc::RegisterBlock = 0x4004_4000 as *const _;
275 #[doc = r"Return the pointer to the register block"]
276 #[inline(always)]
277 pub const fn ptr() -> *const acc::RegisterBlock {
278 Self::PTR
279 }
280}
281impl Deref for ACC {
282 type Target = acc::RegisterBlock;
283 #[inline(always)]
284 fn deref(&self) -> &Self::Target {
285 unsafe { &*Self::PTR }
286 }
287}
288impl core::fmt::Debug for ACC {
289 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
290 f.debug_struct("ACC").finish()
291 }
292}
293#[doc = "Analog Comparator Controller"]
294pub mod acc;
295#[doc = "Advanced Encryption Standard"]
296pub struct AES {
297 _marker: PhantomData<*const ()>,
298}
299unsafe impl Send for AES {}
300impl AES {
301 #[doc = r"Pointer to the register block"]
302 pub const PTR: *const aes::RegisterBlock = 0x4006_c000 as *const _;
303 #[doc = r"Return the pointer to the register block"]
304 #[inline(always)]
305 pub const fn ptr() -> *const aes::RegisterBlock {
306 Self::PTR
307 }
308}
309impl Deref for AES {
310 type Target = aes::RegisterBlock;
311 #[inline(always)]
312 fn deref(&self) -> &Self::Target {
313 unsafe { &*Self::PTR }
314 }
315}
316impl core::fmt::Debug for AES {
317 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
318 f.debug_struct("AES").finish()
319 }
320}
321#[doc = "Advanced Encryption Standard"]
322pub mod aes;
323#[doc = "Analog Front-End Controller"]
324pub struct AFEC0 {
325 _marker: PhantomData<*const ()>,
326}
327unsafe impl Send for AFEC0 {}
328impl AFEC0 {
329 #[doc = r"Pointer to the register block"]
330 pub const PTR: *const afec0::RegisterBlock = 0x4003_c000 as *const _;
331 #[doc = r"Return the pointer to the register block"]
332 #[inline(always)]
333 pub const fn ptr() -> *const afec0::RegisterBlock {
334 Self::PTR
335 }
336}
337impl Deref for AFEC0 {
338 type Target = afec0::RegisterBlock;
339 #[inline(always)]
340 fn deref(&self) -> &Self::Target {
341 unsafe { &*Self::PTR }
342 }
343}
344impl core::fmt::Debug for AFEC0 {
345 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
346 f.debug_struct("AFEC0").finish()
347 }
348}
349#[doc = "Analog Front-End Controller"]
350pub mod afec0;
351#[doc = "Analog Front-End Controller"]
352pub struct AFEC1 {
353 _marker: PhantomData<*const ()>,
354}
355unsafe impl Send for AFEC1 {}
356impl AFEC1 {
357 #[doc = r"Pointer to the register block"]
358 pub const PTR: *const afec0::RegisterBlock = 0x4006_4000 as *const _;
359 #[doc = r"Return the pointer to the register block"]
360 #[inline(always)]
361 pub const fn ptr() -> *const afec0::RegisterBlock {
362 Self::PTR
363 }
364}
365impl Deref for AFEC1 {
366 type Target = afec0::RegisterBlock;
367 #[inline(always)]
368 fn deref(&self) -> &Self::Target {
369 unsafe { &*Self::PTR }
370 }
371}
372impl core::fmt::Debug for AFEC1 {
373 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
374 f.debug_struct("AFEC1").finish()
375 }
376}
377#[doc = "Analog Front-End Controller"]
378pub use afec0 as afec1;
379#[doc = "Chip Identifier"]
380pub struct CHIPID {
381 _marker: PhantomData<*const ()>,
382}
383unsafe impl Send for CHIPID {}
384impl CHIPID {
385 #[doc = r"Pointer to the register block"]
386 pub const PTR: *const chipid::RegisterBlock = 0x400e_0940 as *const _;
387 #[doc = r"Return the pointer to the register block"]
388 #[inline(always)]
389 pub const fn ptr() -> *const chipid::RegisterBlock {
390 Self::PTR
391 }
392}
393impl Deref for CHIPID {
394 type Target = chipid::RegisterBlock;
395 #[inline(always)]
396 fn deref(&self) -> &Self::Target {
397 unsafe { &*Self::PTR }
398 }
399}
400impl core::fmt::Debug for CHIPID {
401 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
402 f.debug_struct("CHIPID").finish()
403 }
404}
405#[doc = "Chip Identifier"]
406pub mod chipid;
407#[doc = "Digital-to-Analog Converter Controller"]
408pub struct DACC {
409 _marker: PhantomData<*const ()>,
410}
411unsafe impl Send for DACC {}
412impl DACC {
413 #[doc = r"Pointer to the register block"]
414 pub const PTR: *const dacc::RegisterBlock = 0x4004_0000 as *const _;
415 #[doc = r"Return the pointer to the register block"]
416 #[inline(always)]
417 pub const fn ptr() -> *const dacc::RegisterBlock {
418 Self::PTR
419 }
420}
421impl Deref for DACC {
422 type Target = dacc::RegisterBlock;
423 #[inline(always)]
424 fn deref(&self) -> &Self::Target {
425 unsafe { &*Self::PTR }
426 }
427}
428impl core::fmt::Debug for DACC {
429 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
430 f.debug_struct("DACC").finish()
431 }
432}
433#[doc = "Digital-to-Analog Converter Controller"]
434pub mod dacc;
435#[doc = "Embedded Flash Controller"]
436pub struct EFC {
437 _marker: PhantomData<*const ()>,
438}
439unsafe impl Send for EFC {}
440impl EFC {
441 #[doc = r"Pointer to the register block"]
442 pub const PTR: *const efc::RegisterBlock = 0x400e_0c00 as *const _;
443 #[doc = r"Return the pointer to the register block"]
444 #[inline(always)]
445 pub const fn ptr() -> *const efc::RegisterBlock {
446 Self::PTR
447 }
448}
449impl Deref for EFC {
450 type Target = efc::RegisterBlock;
451 #[inline(always)]
452 fn deref(&self) -> &Self::Target {
453 unsafe { &*Self::PTR }
454 }
455}
456impl core::fmt::Debug for EFC {
457 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
458 f.debug_struct("EFC").finish()
459 }
460}
461#[doc = "Embedded Flash Controller"]
462pub mod efc;
463#[doc = "General Purpose Backup Registers"]
464pub struct GPBR {
465 _marker: PhantomData<*const ()>,
466}
467unsafe impl Send for GPBR {}
468impl GPBR {
469 #[doc = r"Pointer to the register block"]
470 pub const PTR: *const gpbr::RegisterBlock = 0x400e_1890 as *const _;
471 #[doc = r"Return the pointer to the register block"]
472 #[inline(always)]
473 pub const fn ptr() -> *const gpbr::RegisterBlock {
474 Self::PTR
475 }
476}
477impl Deref for GPBR {
478 type Target = gpbr::RegisterBlock;
479 #[inline(always)]
480 fn deref(&self) -> &Self::Target {
481 unsafe { &*Self::PTR }
482 }
483}
484impl core::fmt::Debug for GPBR {
485 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
486 f.debug_struct("GPBR").finish()
487 }
488}
489#[doc = "General Purpose Backup Registers"]
490pub mod gpbr;
491#[doc = "Integrity Check Monitor"]
492pub struct ICM {
493 _marker: PhantomData<*const ()>,
494}
495unsafe impl Send for ICM {}
496impl ICM {
497 #[doc = r"Pointer to the register block"]
498 pub const PTR: *const icm::RegisterBlock = 0x4004_8000 as *const _;
499 #[doc = r"Return the pointer to the register block"]
500 #[inline(always)]
501 pub const fn ptr() -> *const icm::RegisterBlock {
502 Self::PTR
503 }
504}
505impl Deref for ICM {
506 type Target = icm::RegisterBlock;
507 #[inline(always)]
508 fn deref(&self) -> &Self::Target {
509 unsafe { &*Self::PTR }
510 }
511}
512impl core::fmt::Debug for ICM {
513 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
514 f.debug_struct("ICM").finish()
515 }
516}
517#[doc = "Integrity Check Monitor"]
518pub mod icm;
519#[doc = "Image Sensor Interface"]
520pub struct ISI {
521 _marker: PhantomData<*const ()>,
522}
523unsafe impl Send for ISI {}
524impl ISI {
525 #[doc = r"Pointer to the register block"]
526 pub const PTR: *const isi::RegisterBlock = 0x4004_c000 as *const _;
527 #[doc = r"Return the pointer to the register block"]
528 #[inline(always)]
529 pub const fn ptr() -> *const isi::RegisterBlock {
530 Self::PTR
531 }
532}
533impl Deref for ISI {
534 type Target = isi::RegisterBlock;
535 #[inline(always)]
536 fn deref(&self) -> &Self::Target {
537 unsafe { &*Self::PTR }
538 }
539}
540impl core::fmt::Debug for ISI {
541 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
542 f.debug_struct("ISI").finish()
543 }
544}
545#[doc = "Image Sensor Interface"]
546pub mod isi;
547#[doc = "AHB Bus Matrix"]
548pub struct MATRIX {
549 _marker: PhantomData<*const ()>,
550}
551unsafe impl Send for MATRIX {}
552impl MATRIX {
553 #[doc = r"Pointer to the register block"]
554 pub const PTR: *const matrix::RegisterBlock = 0x4008_8000 as *const _;
555 #[doc = r"Return the pointer to the register block"]
556 #[inline(always)]
557 pub const fn ptr() -> *const matrix::RegisterBlock {
558 Self::PTR
559 }
560}
561impl Deref for MATRIX {
562 type Target = matrix::RegisterBlock;
563 #[inline(always)]
564 fn deref(&self) -> &Self::Target {
565 unsafe { &*Self::PTR }
566 }
567}
568impl core::fmt::Debug for MATRIX {
569 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
570 f.debug_struct("MATRIX").finish()
571 }
572}
573#[doc = "AHB Bus Matrix"]
574pub mod matrix;
575#[doc = "Parallel Input/Output Controller"]
576pub struct PIOA {
577 _marker: PhantomData<*const ()>,
578}
579unsafe impl Send for PIOA {}
580impl PIOA {
581 #[doc = r"Pointer to the register block"]
582 pub const PTR: *const pioa::RegisterBlock = 0x400e_0e00 as *const _;
583 #[doc = r"Return the pointer to the register block"]
584 #[inline(always)]
585 pub const fn ptr() -> *const pioa::RegisterBlock {
586 Self::PTR
587 }
588}
589impl Deref for PIOA {
590 type Target = pioa::RegisterBlock;
591 #[inline(always)]
592 fn deref(&self) -> &Self::Target {
593 unsafe { &*Self::PTR }
594 }
595}
596impl core::fmt::Debug for PIOA {
597 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
598 f.debug_struct("PIOA").finish()
599 }
600}
601#[doc = "Parallel Input/Output Controller"]
602pub mod pioa;
603#[doc = "Parallel Input/Output Controller"]
604pub struct PIOB {
605 _marker: PhantomData<*const ()>,
606}
607unsafe impl Send for PIOB {}
608impl PIOB {
609 #[doc = r"Pointer to the register block"]
610 pub const PTR: *const pioa::RegisterBlock = 0x400e_1000 as *const _;
611 #[doc = r"Return the pointer to the register block"]
612 #[inline(always)]
613 pub const fn ptr() -> *const pioa::RegisterBlock {
614 Self::PTR
615 }
616}
617impl Deref for PIOB {
618 type Target = pioa::RegisterBlock;
619 #[inline(always)]
620 fn deref(&self) -> &Self::Target {
621 unsafe { &*Self::PTR }
622 }
623}
624impl core::fmt::Debug for PIOB {
625 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
626 f.debug_struct("PIOB").finish()
627 }
628}
629#[doc = "Parallel Input/Output Controller"]
630pub use pioa as piob;
631#[doc = "Parallel Input/Output Controller"]
632pub struct PIOD {
633 _marker: PhantomData<*const ()>,
634}
635unsafe impl Send for PIOD {}
636impl PIOD {
637 #[doc = r"Pointer to the register block"]
638 pub const PTR: *const pioa::RegisterBlock = 0x400e_1400 as *const _;
639 #[doc = r"Return the pointer to the register block"]
640 #[inline(always)]
641 pub const fn ptr() -> *const pioa::RegisterBlock {
642 Self::PTR
643 }
644}
645impl Deref for PIOD {
646 type Target = pioa::RegisterBlock;
647 #[inline(always)]
648 fn deref(&self) -> &Self::Target {
649 unsafe { &*Self::PTR }
650 }
651}
652impl core::fmt::Debug for PIOD {
653 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
654 f.debug_struct("PIOD").finish()
655 }
656}
657#[doc = "Parallel Input/Output Controller"]
658pub use pioa as piod;
659#[doc = "Power Management Controller"]
660pub struct PMC {
661 _marker: PhantomData<*const ()>,
662}
663unsafe impl Send for PMC {}
664impl PMC {
665 #[doc = r"Pointer to the register block"]
666 pub const PTR: *const pmc::RegisterBlock = 0x400e_0600 as *const _;
667 #[doc = r"Return the pointer to the register block"]
668 #[inline(always)]
669 pub const fn ptr() -> *const pmc::RegisterBlock {
670 Self::PTR
671 }
672}
673impl Deref for PMC {
674 type Target = pmc::RegisterBlock;
675 #[inline(always)]
676 fn deref(&self) -> &Self::Target {
677 unsafe { &*Self::PTR }
678 }
679}
680impl core::fmt::Debug for PMC {
681 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
682 f.debug_struct("PMC").finish()
683 }
684}
685#[doc = "Power Management Controller"]
686pub mod pmc;
687#[doc = "Pulse Width Modulation Controller"]
688pub struct PWM0 {
689 _marker: PhantomData<*const ()>,
690}
691unsafe impl Send for PWM0 {}
692impl PWM0 {
693 #[doc = r"Pointer to the register block"]
694 pub const PTR: *const pwm0::RegisterBlock = 0x4002_0000 as *const _;
695 #[doc = r"Return the pointer to the register block"]
696 #[inline(always)]
697 pub const fn ptr() -> *const pwm0::RegisterBlock {
698 Self::PTR
699 }
700}
701impl Deref for PWM0 {
702 type Target = pwm0::RegisterBlock;
703 #[inline(always)]
704 fn deref(&self) -> &Self::Target {
705 unsafe { &*Self::PTR }
706 }
707}
708impl core::fmt::Debug for PWM0 {
709 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
710 f.debug_struct("PWM0").finish()
711 }
712}
713#[doc = "Pulse Width Modulation Controller"]
714pub mod pwm0;
715#[doc = "Pulse Width Modulation Controller"]
716pub struct PWM1 {
717 _marker: PhantomData<*const ()>,
718}
719unsafe impl Send for PWM1 {}
720impl PWM1 {
721 #[doc = r"Pointer to the register block"]
722 pub const PTR: *const pwm0::RegisterBlock = 0x4005_c000 as *const _;
723 #[doc = r"Return the pointer to the register block"]
724 #[inline(always)]
725 pub const fn ptr() -> *const pwm0::RegisterBlock {
726 Self::PTR
727 }
728}
729impl Deref for PWM1 {
730 type Target = pwm0::RegisterBlock;
731 #[inline(always)]
732 fn deref(&self) -> &Self::Target {
733 unsafe { &*Self::PTR }
734 }
735}
736impl core::fmt::Debug for PWM1 {
737 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
738 f.debug_struct("PWM1").finish()
739 }
740}
741#[doc = "Pulse Width Modulation Controller"]
742pub use pwm0 as pwm1;
743#[doc = "Quad Serial Peripheral Interface"]
744pub struct QSPI {
745 _marker: PhantomData<*const ()>,
746}
747unsafe impl Send for QSPI {}
748impl QSPI {
749 #[doc = r"Pointer to the register block"]
750 pub const PTR: *const qspi::RegisterBlock = 0x4007_c000 as *const _;
751 #[doc = r"Return the pointer to the register block"]
752 #[inline(always)]
753 pub const fn ptr() -> *const qspi::RegisterBlock {
754 Self::PTR
755 }
756}
757impl Deref for QSPI {
758 type Target = qspi::RegisterBlock;
759 #[inline(always)]
760 fn deref(&self) -> &Self::Target {
761 unsafe { &*Self::PTR }
762 }
763}
764impl core::fmt::Debug for QSPI {
765 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
766 f.debug_struct("QSPI").finish()
767 }
768}
769#[doc = "Quad Serial Peripheral Interface"]
770pub mod qspi;
771#[doc = "Reset Controller"]
772pub struct RSTC {
773 _marker: PhantomData<*const ()>,
774}
775unsafe impl Send for RSTC {}
776impl RSTC {
777 #[doc = r"Pointer to the register block"]
778 pub const PTR: *const rstc::RegisterBlock = 0x400e_1800 as *const _;
779 #[doc = r"Return the pointer to the register block"]
780 #[inline(always)]
781 pub const fn ptr() -> *const rstc::RegisterBlock {
782 Self::PTR
783 }
784}
785impl Deref for RSTC {
786 type Target = rstc::RegisterBlock;
787 #[inline(always)]
788 fn deref(&self) -> &Self::Target {
789 unsafe { &*Self::PTR }
790 }
791}
792impl core::fmt::Debug for RSTC {
793 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
794 f.debug_struct("RSTC").finish()
795 }
796}
797#[doc = "Reset Controller"]
798pub mod rstc;
799#[doc = "Reinforced Safety Watchdog Timer"]
800pub struct RSWDT {
801 _marker: PhantomData<*const ()>,
802}
803unsafe impl Send for RSWDT {}
804impl RSWDT {
805 #[doc = r"Pointer to the register block"]
806 pub const PTR: *const rswdt::RegisterBlock = 0x400e_1900 as *const _;
807 #[doc = r"Return the pointer to the register block"]
808 #[inline(always)]
809 pub const fn ptr() -> *const rswdt::RegisterBlock {
810 Self::PTR
811 }
812}
813impl Deref for RSWDT {
814 type Target = rswdt::RegisterBlock;
815 #[inline(always)]
816 fn deref(&self) -> &Self::Target {
817 unsafe { &*Self::PTR }
818 }
819}
820impl core::fmt::Debug for RSWDT {
821 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
822 f.debug_struct("RSWDT").finish()
823 }
824}
825#[doc = "Reinforced Safety Watchdog Timer"]
826pub mod rswdt;
827#[doc = "Real-time Clock"]
828pub struct RTC {
829 _marker: PhantomData<*const ()>,
830}
831unsafe impl Send for RTC {}
832impl RTC {
833 #[doc = r"Pointer to the register block"]
834 pub const PTR: *const rtc::RegisterBlock = 0x400e_1860 as *const _;
835 #[doc = r"Return the pointer to the register block"]
836 #[inline(always)]
837 pub const fn ptr() -> *const rtc::RegisterBlock {
838 Self::PTR
839 }
840}
841impl Deref for RTC {
842 type Target = rtc::RegisterBlock;
843 #[inline(always)]
844 fn deref(&self) -> &Self::Target {
845 unsafe { &*Self::PTR }
846 }
847}
848impl core::fmt::Debug for RTC {
849 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
850 f.debug_struct("RTC").finish()
851 }
852}
853#[doc = "Real-time Clock"]
854pub mod rtc;
855#[doc = "Real-time Timer"]
856pub struct RTT {
857 _marker: PhantomData<*const ()>,
858}
859unsafe impl Send for RTT {}
860impl RTT {
861 #[doc = r"Pointer to the register block"]
862 pub const PTR: *const rtt::RegisterBlock = 0x400e_1830 as *const _;
863 #[doc = r"Return the pointer to the register block"]
864 #[inline(always)]
865 pub const fn ptr() -> *const rtt::RegisterBlock {
866 Self::PTR
867 }
868}
869impl Deref for RTT {
870 type Target = rtt::RegisterBlock;
871 #[inline(always)]
872 fn deref(&self) -> &Self::Target {
873 unsafe { &*Self::PTR }
874 }
875}
876impl core::fmt::Debug for RTT {
877 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
878 f.debug_struct("RTT").finish()
879 }
880}
881#[doc = "Real-time Timer"]
882pub mod rtt;
883#[doc = "Synchronous Serial Controller"]
884pub struct SSC {
885 _marker: PhantomData<*const ()>,
886}
887unsafe impl Send for SSC {}
888impl SSC {
889 #[doc = r"Pointer to the register block"]
890 pub const PTR: *const ssc::RegisterBlock = 0x4000_4000 as *const _;
891 #[doc = r"Return the pointer to the register block"]
892 #[inline(always)]
893 pub const fn ptr() -> *const ssc::RegisterBlock {
894 Self::PTR
895 }
896}
897impl Deref for SSC {
898 type Target = ssc::RegisterBlock;
899 #[inline(always)]
900 fn deref(&self) -> &Self::Target {
901 unsafe { &*Self::PTR }
902 }
903}
904impl core::fmt::Debug for SSC {
905 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
906 f.debug_struct("SSC").finish()
907 }
908}
909#[doc = "Synchronous Serial Controller"]
910pub mod ssc;
911#[doc = "Supply Controller"]
912pub struct SUPC {
913 _marker: PhantomData<*const ()>,
914}
915unsafe impl Send for SUPC {}
916impl SUPC {
917 #[doc = r"Pointer to the register block"]
918 pub const PTR: *const supc::RegisterBlock = 0x400e_1810 as *const _;
919 #[doc = r"Return the pointer to the register block"]
920 #[inline(always)]
921 pub const fn ptr() -> *const supc::RegisterBlock {
922 Self::PTR
923 }
924}
925impl Deref for SUPC {
926 type Target = supc::RegisterBlock;
927 #[inline(always)]
928 fn deref(&self) -> &Self::Target {
929 unsafe { &*Self::PTR }
930 }
931}
932impl core::fmt::Debug for SUPC {
933 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
934 f.debug_struct("SUPC").finish()
935 }
936}
937#[doc = "Supply Controller"]
938pub mod supc;
939#[doc = "Timer Counter"]
940pub struct TC0 {
941 _marker: PhantomData<*const ()>,
942}
943unsafe impl Send for TC0 {}
944impl TC0 {
945 #[doc = r"Pointer to the register block"]
946 pub const PTR: *const tc0::RegisterBlock = 0x4000_c000 as *const _;
947 #[doc = r"Return the pointer to the register block"]
948 #[inline(always)]
949 pub const fn ptr() -> *const tc0::RegisterBlock {
950 Self::PTR
951 }
952}
953impl Deref for TC0 {
954 type Target = tc0::RegisterBlock;
955 #[inline(always)]
956 fn deref(&self) -> &Self::Target {
957 unsafe { &*Self::PTR }
958 }
959}
960impl core::fmt::Debug for TC0 {
961 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
962 f.debug_struct("TC0").finish()
963 }
964}
965#[doc = "Timer Counter"]
966pub mod tc0;
967#[doc = "Timer Counter"]
968pub struct TC1 {
969 _marker: PhantomData<*const ()>,
970}
971unsafe impl Send for TC1 {}
972impl TC1 {
973 #[doc = r"Pointer to the register block"]
974 pub const PTR: *const tc0::RegisterBlock = 0x4001_0000 as *const _;
975 #[doc = r"Return the pointer to the register block"]
976 #[inline(always)]
977 pub const fn ptr() -> *const tc0::RegisterBlock {
978 Self::PTR
979 }
980}
981impl Deref for TC1 {
982 type Target = tc0::RegisterBlock;
983 #[inline(always)]
984 fn deref(&self) -> &Self::Target {
985 unsafe { &*Self::PTR }
986 }
987}
988impl core::fmt::Debug for TC1 {
989 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
990 f.debug_struct("TC1").finish()
991 }
992}
993#[doc = "Timer Counter"]
994pub use tc0 as tc1;
995#[doc = "Timer Counter"]
996pub struct TC2 {
997 _marker: PhantomData<*const ()>,
998}
999unsafe impl Send for TC2 {}
1000impl TC2 {
1001 #[doc = r"Pointer to the register block"]
1002 pub const PTR: *const tc0::RegisterBlock = 0x4001_4000 as *const _;
1003 #[doc = r"Return the pointer to the register block"]
1004 #[inline(always)]
1005 pub const fn ptr() -> *const tc0::RegisterBlock {
1006 Self::PTR
1007 }
1008}
1009impl Deref for TC2 {
1010 type Target = tc0::RegisterBlock;
1011 #[inline(always)]
1012 fn deref(&self) -> &Self::Target {
1013 unsafe { &*Self::PTR }
1014 }
1015}
1016impl core::fmt::Debug for TC2 {
1017 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1018 f.debug_struct("TC2").finish()
1019 }
1020}
1021#[doc = "Timer Counter"]
1022pub use tc0 as tc2;
1023#[doc = "Timer Counter"]
1024pub struct TC3 {
1025 _marker: PhantomData<*const ()>,
1026}
1027unsafe impl Send for TC3 {}
1028impl TC3 {
1029 #[doc = r"Pointer to the register block"]
1030 pub const PTR: *const tc0::RegisterBlock = 0x4005_4000 as *const _;
1031 #[doc = r"Return the pointer to the register block"]
1032 #[inline(always)]
1033 pub const fn ptr() -> *const tc0::RegisterBlock {
1034 Self::PTR
1035 }
1036}
1037impl Deref for TC3 {
1038 type Target = tc0::RegisterBlock;
1039 #[inline(always)]
1040 fn deref(&self) -> &Self::Target {
1041 unsafe { &*Self::PTR }
1042 }
1043}
1044impl core::fmt::Debug for TC3 {
1045 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1046 f.debug_struct("TC3").finish()
1047 }
1048}
1049#[doc = "Timer Counter"]
1050pub use tc0 as tc3;
1051#[doc = "True Random Number Generator"]
1052pub struct TRNG {
1053 _marker: PhantomData<*const ()>,
1054}
1055unsafe impl Send for TRNG {}
1056impl TRNG {
1057 #[doc = r"Pointer to the register block"]
1058 pub const PTR: *const trng::RegisterBlock = 0x4007_0000 as *const _;
1059 #[doc = r"Return the pointer to the register block"]
1060 #[inline(always)]
1061 pub const fn ptr() -> *const trng::RegisterBlock {
1062 Self::PTR
1063 }
1064}
1065impl Deref for TRNG {
1066 type Target = trng::RegisterBlock;
1067 #[inline(always)]
1068 fn deref(&self) -> &Self::Target {
1069 unsafe { &*Self::PTR }
1070 }
1071}
1072impl core::fmt::Debug for TRNG {
1073 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1074 f.debug_struct("TRNG").finish()
1075 }
1076}
1077#[doc = "True Random Number Generator"]
1078pub mod trng;
1079#[doc = "Two-wire Interface High Speed"]
1080pub struct TWIHS0 {
1081 _marker: PhantomData<*const ()>,
1082}
1083unsafe impl Send for TWIHS0 {}
1084impl TWIHS0 {
1085 #[doc = r"Pointer to the register block"]
1086 pub const PTR: *const twihs0::RegisterBlock = 0x4001_8000 as *const _;
1087 #[doc = r"Return the pointer to the register block"]
1088 #[inline(always)]
1089 pub const fn ptr() -> *const twihs0::RegisterBlock {
1090 Self::PTR
1091 }
1092}
1093impl Deref for TWIHS0 {
1094 type Target = twihs0::RegisterBlock;
1095 #[inline(always)]
1096 fn deref(&self) -> &Self::Target {
1097 unsafe { &*Self::PTR }
1098 }
1099}
1100impl core::fmt::Debug for TWIHS0 {
1101 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1102 f.debug_struct("TWIHS0").finish()
1103 }
1104}
1105#[doc = "Two-wire Interface High Speed"]
1106pub mod twihs0;
1107#[doc = "Two-wire Interface High Speed"]
1108pub struct TWIHS1 {
1109 _marker: PhantomData<*const ()>,
1110}
1111unsafe impl Send for TWIHS1 {}
1112impl TWIHS1 {
1113 #[doc = r"Pointer to the register block"]
1114 pub const PTR: *const twihs0::RegisterBlock = 0x4001_c000 as *const _;
1115 #[doc = r"Return the pointer to the register block"]
1116 #[inline(always)]
1117 pub const fn ptr() -> *const twihs0::RegisterBlock {
1118 Self::PTR
1119 }
1120}
1121impl Deref for TWIHS1 {
1122 type Target = twihs0::RegisterBlock;
1123 #[inline(always)]
1124 fn deref(&self) -> &Self::Target {
1125 unsafe { &*Self::PTR }
1126 }
1127}
1128impl core::fmt::Debug for TWIHS1 {
1129 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1130 f.debug_struct("TWIHS1").finish()
1131 }
1132}
1133#[doc = "Two-wire Interface High Speed"]
1134pub use twihs0 as twihs1;
1135#[doc = "Universal Asynchronous Receiver Transmitter"]
1136pub struct UART0 {
1137 _marker: PhantomData<*const ()>,
1138}
1139unsafe impl Send for UART0 {}
1140impl UART0 {
1141 #[doc = r"Pointer to the register block"]
1142 pub const PTR: *const uart0::RegisterBlock = 0x400e_0800 as *const _;
1143 #[doc = r"Return the pointer to the register block"]
1144 #[inline(always)]
1145 pub const fn ptr() -> *const uart0::RegisterBlock {
1146 Self::PTR
1147 }
1148}
1149impl Deref for UART0 {
1150 type Target = uart0::RegisterBlock;
1151 #[inline(always)]
1152 fn deref(&self) -> &Self::Target {
1153 unsafe { &*Self::PTR }
1154 }
1155}
1156impl core::fmt::Debug for UART0 {
1157 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1158 f.debug_struct("UART0").finish()
1159 }
1160}
1161#[doc = "Universal Asynchronous Receiver Transmitter"]
1162pub mod uart0;
1163#[doc = "Universal Asynchronous Receiver Transmitter"]
1164pub struct UART1 {
1165 _marker: PhantomData<*const ()>,
1166}
1167unsafe impl Send for UART1 {}
1168impl UART1 {
1169 #[doc = r"Pointer to the register block"]
1170 pub const PTR: *const uart0::RegisterBlock = 0x400e_0a00 as *const _;
1171 #[doc = r"Return the pointer to the register block"]
1172 #[inline(always)]
1173 pub const fn ptr() -> *const uart0::RegisterBlock {
1174 Self::PTR
1175 }
1176}
1177impl Deref for UART1 {
1178 type Target = uart0::RegisterBlock;
1179 #[inline(always)]
1180 fn deref(&self) -> &Self::Target {
1181 unsafe { &*Self::PTR }
1182 }
1183}
1184impl core::fmt::Debug for UART1 {
1185 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1186 f.debug_struct("UART1").finish()
1187 }
1188}
1189#[doc = "Universal Asynchronous Receiver Transmitter"]
1190pub use uart0 as uart1;
1191#[doc = "Universal Asynchronous Receiver Transmitter"]
1192pub struct UART2 {
1193 _marker: PhantomData<*const ()>,
1194}
1195unsafe impl Send for UART2 {}
1196impl UART2 {
1197 #[doc = r"Pointer to the register block"]
1198 pub const PTR: *const uart0::RegisterBlock = 0x400e_1a00 as *const _;
1199 #[doc = r"Return the pointer to the register block"]
1200 #[inline(always)]
1201 pub const fn ptr() -> *const uart0::RegisterBlock {
1202 Self::PTR
1203 }
1204}
1205impl Deref for UART2 {
1206 type Target = uart0::RegisterBlock;
1207 #[inline(always)]
1208 fn deref(&self) -> &Self::Target {
1209 unsafe { &*Self::PTR }
1210 }
1211}
1212impl core::fmt::Debug for UART2 {
1213 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1214 f.debug_struct("UART2").finish()
1215 }
1216}
1217#[doc = "Universal Asynchronous Receiver Transmitter"]
1218pub use uart0 as uart2;
1219#[doc = "Universal Synchronous Asynchronous Receiver Transmitter"]
1220pub struct USART0 {
1221 _marker: PhantomData<*const ()>,
1222}
1223unsafe impl Send for USART0 {}
1224impl USART0 {
1225 #[doc = r"Pointer to the register block"]
1226 pub const PTR: *const usart0::RegisterBlock = 0x4002_4000 as *const _;
1227 #[doc = r"Return the pointer to the register block"]
1228 #[inline(always)]
1229 pub const fn ptr() -> *const usart0::RegisterBlock {
1230 Self::PTR
1231 }
1232}
1233impl Deref for USART0 {
1234 type Target = usart0::RegisterBlock;
1235 #[inline(always)]
1236 fn deref(&self) -> &Self::Target {
1237 unsafe { &*Self::PTR }
1238 }
1239}
1240impl core::fmt::Debug for USART0 {
1241 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1242 f.debug_struct("USART0").finish()
1243 }
1244}
1245#[doc = "Universal Synchronous Asynchronous Receiver Transmitter"]
1246pub mod usart0;
1247#[doc = "Universal Synchronous Asynchronous Receiver Transmitter"]
1248pub struct USART1 {
1249 _marker: PhantomData<*const ()>,
1250}
1251unsafe impl Send for USART1 {}
1252impl USART1 {
1253 #[doc = r"Pointer to the register block"]
1254 pub const PTR: *const usart0::RegisterBlock = 0x4002_8000 as *const _;
1255 #[doc = r"Return the pointer to the register block"]
1256 #[inline(always)]
1257 pub const fn ptr() -> *const usart0::RegisterBlock {
1258 Self::PTR
1259 }
1260}
1261impl Deref for USART1 {
1262 type Target = usart0::RegisterBlock;
1263 #[inline(always)]
1264 fn deref(&self) -> &Self::Target {
1265 unsafe { &*Self::PTR }
1266 }
1267}
1268impl core::fmt::Debug for USART1 {
1269 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1270 f.debug_struct("USART1").finish()
1271 }
1272}
1273#[doc = "Universal Synchronous Asynchronous Receiver Transmitter"]
1274pub use usart0 as usart1;
1275#[doc = "USB High-Speed Interface"]
1276pub struct USBHS {
1277 _marker: PhantomData<*const ()>,
1278}
1279unsafe impl Send for USBHS {}
1280impl USBHS {
1281 #[doc = r"Pointer to the register block"]
1282 pub const PTR: *const usbhs::RegisterBlock = 0x4003_8000 as *const _;
1283 #[doc = r"Return the pointer to the register block"]
1284 #[inline(always)]
1285 pub const fn ptr() -> *const usbhs::RegisterBlock {
1286 Self::PTR
1287 }
1288}
1289impl Deref for USBHS {
1290 type Target = usbhs::RegisterBlock;
1291 #[inline(always)]
1292 fn deref(&self) -> &Self::Target {
1293 unsafe { &*Self::PTR }
1294 }
1295}
1296impl core::fmt::Debug for USBHS {
1297 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1298 f.debug_struct("USBHS").finish()
1299 }
1300}
1301#[doc = "USB High-Speed Interface"]
1302pub mod usbhs;
1303#[doc = "USB Transmitter Interface Macrocell"]
1304pub struct UTMI {
1305 _marker: PhantomData<*const ()>,
1306}
1307unsafe impl Send for UTMI {}
1308impl UTMI {
1309 #[doc = r"Pointer to the register block"]
1310 pub const PTR: *const utmi::RegisterBlock = 0x400e_0400 as *const _;
1311 #[doc = r"Return the pointer to the register block"]
1312 #[inline(always)]
1313 pub const fn ptr() -> *const utmi::RegisterBlock {
1314 Self::PTR
1315 }
1316}
1317impl Deref for UTMI {
1318 type Target = utmi::RegisterBlock;
1319 #[inline(always)]
1320 fn deref(&self) -> &Self::Target {
1321 unsafe { &*Self::PTR }
1322 }
1323}
1324impl core::fmt::Debug for UTMI {
1325 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1326 f.debug_struct("UTMI").finish()
1327 }
1328}
1329#[doc = "USB Transmitter Interface Macrocell"]
1330pub mod utmi;
1331#[doc = "Watchdog Timer"]
1332pub struct WDT {
1333 _marker: PhantomData<*const ()>,
1334}
1335unsafe impl Send for WDT {}
1336impl WDT {
1337 #[doc = r"Pointer to the register block"]
1338 pub const PTR: *const wdt::RegisterBlock = 0x400e_1850 as *const _;
1339 #[doc = r"Return the pointer to the register block"]
1340 #[inline(always)]
1341 pub const fn ptr() -> *const wdt::RegisterBlock {
1342 Self::PTR
1343 }
1344}
1345impl Deref for WDT {
1346 type Target = wdt::RegisterBlock;
1347 #[inline(always)]
1348 fn deref(&self) -> &Self::Target {
1349 unsafe { &*Self::PTR }
1350 }
1351}
1352impl core::fmt::Debug for WDT {
1353 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1354 f.debug_struct("WDT").finish()
1355 }
1356}
1357#[doc = "Watchdog Timer"]
1358pub mod wdt;
1359#[doc = "Extensible DMA Controller"]
1360pub struct XDMAC {
1361 _marker: PhantomData<*const ()>,
1362}
1363unsafe impl Send for XDMAC {}
1364impl XDMAC {
1365 #[doc = r"Pointer to the register block"]
1366 pub const PTR: *const xdmac::RegisterBlock = 0x4007_8000 as *const _;
1367 #[doc = r"Return the pointer to the register block"]
1368 #[inline(always)]
1369 pub const fn ptr() -> *const xdmac::RegisterBlock {
1370 Self::PTR
1371 }
1372}
1373impl Deref for XDMAC {
1374 type Target = xdmac::RegisterBlock;
1375 #[inline(always)]
1376 fn deref(&self) -> &Self::Target {
1377 unsafe { &*Self::PTR }
1378 }
1379}
1380impl core::fmt::Debug for XDMAC {
1381 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1382 f.debug_struct("XDMAC").finish()
1383 }
1384}
1385#[doc = "Extensible DMA Controller"]
1386pub mod xdmac;
1387#[doc = "LOCKBIT"]
1388pub struct LOCKBIT {
1389 _marker: PhantomData<*const ()>,
1390}
1391unsafe impl Send for LOCKBIT {}
1392impl LOCKBIT {
1393 #[doc = r"Pointer to the register block"]
1394 pub const PTR: *const lockbit::RegisterBlock = 0 as *const _;
1395 #[doc = r"Return the pointer to the register block"]
1396 #[inline(always)]
1397 pub const fn ptr() -> *const lockbit::RegisterBlock {
1398 Self::PTR
1399 }
1400}
1401impl Deref for LOCKBIT {
1402 type Target = lockbit::RegisterBlock;
1403 #[inline(always)]
1404 fn deref(&self) -> &Self::Target {
1405 unsafe { &*Self::PTR }
1406 }
1407}
1408impl core::fmt::Debug for LOCKBIT {
1409 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1410 f.debug_struct("LOCKBIT").finish()
1411 }
1412}
1413#[doc = "LOCKBIT"]
1414pub mod lockbit;
1415#[doc = "System control not in SCB"]
1416pub struct SCNSCB {
1417 _marker: PhantomData<*const ()>,
1418}
1419unsafe impl Send for SCNSCB {}
1420impl SCNSCB {
1421 #[doc = r"Pointer to the register block"]
1422 pub const PTR: *const scn_scb::RegisterBlock = 0xe000_e000 as *const _;
1423 #[doc = r"Return the pointer to the register block"]
1424 #[inline(always)]
1425 pub const fn ptr() -> *const scn_scb::RegisterBlock {
1426 Self::PTR
1427 }
1428}
1429impl Deref for SCNSCB {
1430 type Target = scn_scb::RegisterBlock;
1431 #[inline(always)]
1432 fn deref(&self) -> &Self::Target {
1433 unsafe { &*Self::PTR }
1434 }
1435}
1436impl core::fmt::Debug for SCNSCB {
1437 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1438 f.debug_struct("SCNSCB").finish()
1439 }
1440}
1441#[doc = "System control not in SCB"]
1442pub mod scn_scb;
1443#[doc = "System timer"]
1444pub struct SYSTICK {
1445 _marker: PhantomData<*const ()>,
1446}
1447unsafe impl Send for SYSTICK {}
1448impl SYSTICK {
1449 #[doc = r"Pointer to the register block"]
1450 pub const PTR: *const sys_tick::RegisterBlock = 0xe000_e010 as *const _;
1451 #[doc = r"Return the pointer to the register block"]
1452 #[inline(always)]
1453 pub const fn ptr() -> *const sys_tick::RegisterBlock {
1454 Self::PTR
1455 }
1456}
1457impl Deref for SYSTICK {
1458 type Target = sys_tick::RegisterBlock;
1459 #[inline(always)]
1460 fn deref(&self) -> &Self::Target {
1461 unsafe { &*Self::PTR }
1462 }
1463}
1464impl core::fmt::Debug for SYSTICK {
1465 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1466 f.debug_struct("SYSTICK").finish()
1467 }
1468}
1469#[doc = "System timer"]
1470pub mod sys_tick;
1471#[no_mangle]
1472static mut DEVICE_PERIPHERALS: bool = false;
1473#[doc = r"All the peripherals"]
1474#[allow(non_snake_case)]
1475pub struct Peripherals {
1476 #[doc = "ACC"]
1477 pub ACC: ACC,
1478 #[doc = "AES"]
1479 pub AES: AES,
1480 #[doc = "AFEC0"]
1481 pub AFEC0: AFEC0,
1482 #[doc = "AFEC1"]
1483 pub AFEC1: AFEC1,
1484 #[doc = "CHIPID"]
1485 pub CHIPID: CHIPID,
1486 #[doc = "DACC"]
1487 pub DACC: DACC,
1488 #[doc = "EFC"]
1489 pub EFC: EFC,
1490 #[doc = "GPBR"]
1491 pub GPBR: GPBR,
1492 #[doc = "ICM"]
1493 pub ICM: ICM,
1494 #[doc = "ISI"]
1495 pub ISI: ISI,
1496 #[doc = "MATRIX"]
1497 pub MATRIX: MATRIX,
1498 #[doc = "PIOA"]
1499 pub PIOA: PIOA,
1500 #[doc = "PIOB"]
1501 pub PIOB: PIOB,
1502 #[doc = "PIOD"]
1503 pub PIOD: PIOD,
1504 #[doc = "PMC"]
1505 pub PMC: PMC,
1506 #[doc = "PWM0"]
1507 pub PWM0: PWM0,
1508 #[doc = "PWM1"]
1509 pub PWM1: PWM1,
1510 #[doc = "QSPI"]
1511 pub QSPI: QSPI,
1512 #[doc = "RSTC"]
1513 pub RSTC: RSTC,
1514 #[doc = "RSWDT"]
1515 pub RSWDT: RSWDT,
1516 #[doc = "RTC"]
1517 pub RTC: RTC,
1518 #[doc = "RTT"]
1519 pub RTT: RTT,
1520 #[doc = "SSC"]
1521 pub SSC: SSC,
1522 #[doc = "SUPC"]
1523 pub SUPC: SUPC,
1524 #[doc = "TC0"]
1525 pub TC0: TC0,
1526 #[doc = "TC1"]
1527 pub TC1: TC1,
1528 #[doc = "TC2"]
1529 pub TC2: TC2,
1530 #[doc = "TC3"]
1531 pub TC3: TC3,
1532 #[doc = "TRNG"]
1533 pub TRNG: TRNG,
1534 #[doc = "TWIHS0"]
1535 pub TWIHS0: TWIHS0,
1536 #[doc = "TWIHS1"]
1537 pub TWIHS1: TWIHS1,
1538 #[doc = "UART0"]
1539 pub UART0: UART0,
1540 #[doc = "UART1"]
1541 pub UART1: UART1,
1542 #[doc = "UART2"]
1543 pub UART2: UART2,
1544 #[doc = "USART0"]
1545 pub USART0: USART0,
1546 #[doc = "USART1"]
1547 pub USART1: USART1,
1548 #[doc = "USBHS"]
1549 pub USBHS: USBHS,
1550 #[doc = "UTMI"]
1551 pub UTMI: UTMI,
1552 #[doc = "WDT"]
1553 pub WDT: WDT,
1554 #[doc = "XDMAC"]
1555 pub XDMAC: XDMAC,
1556 #[doc = "LOCKBIT"]
1557 pub LOCKBIT: LOCKBIT,
1558 #[doc = "SCNSCB"]
1559 pub SCNSCB: SCNSCB,
1560 #[doc = "SYSTICK"]
1561 pub SYSTICK: SYSTICK,
1562}
1563impl Peripherals {
1564 #[doc = r"Returns all the peripherals *once*"]
1565 #[inline]
1566 pub fn take() -> Option<Self> {
1567 cortex_m::interrupt::free(|_| {
1568 if unsafe { DEVICE_PERIPHERALS } {
1569 None
1570 } else {
1571 Some(unsafe { Peripherals::steal() })
1572 }
1573 })
1574 }
1575 #[doc = r"Unchecked version of `Peripherals::take`"]
1576 #[inline]
1577 pub unsafe fn steal() -> Self {
1578 DEVICE_PERIPHERALS = true;
1579 Peripherals {
1580 ACC: ACC {
1581 _marker: PhantomData,
1582 },
1583 AES: AES {
1584 _marker: PhantomData,
1585 },
1586 AFEC0: AFEC0 {
1587 _marker: PhantomData,
1588 },
1589 AFEC1: AFEC1 {
1590 _marker: PhantomData,
1591 },
1592 CHIPID: CHIPID {
1593 _marker: PhantomData,
1594 },
1595 DACC: DACC {
1596 _marker: PhantomData,
1597 },
1598 EFC: EFC {
1599 _marker: PhantomData,
1600 },
1601 GPBR: GPBR {
1602 _marker: PhantomData,
1603 },
1604 ICM: ICM {
1605 _marker: PhantomData,
1606 },
1607 ISI: ISI {
1608 _marker: PhantomData,
1609 },
1610 MATRIX: MATRIX {
1611 _marker: PhantomData,
1612 },
1613 PIOA: PIOA {
1614 _marker: PhantomData,
1615 },
1616 PIOB: PIOB {
1617 _marker: PhantomData,
1618 },
1619 PIOD: PIOD {
1620 _marker: PhantomData,
1621 },
1622 PMC: PMC {
1623 _marker: PhantomData,
1624 },
1625 PWM0: PWM0 {
1626 _marker: PhantomData,
1627 },
1628 PWM1: PWM1 {
1629 _marker: PhantomData,
1630 },
1631 QSPI: QSPI {
1632 _marker: PhantomData,
1633 },
1634 RSTC: RSTC {
1635 _marker: PhantomData,
1636 },
1637 RSWDT: RSWDT {
1638 _marker: PhantomData,
1639 },
1640 RTC: RTC {
1641 _marker: PhantomData,
1642 },
1643 RTT: RTT {
1644 _marker: PhantomData,
1645 },
1646 SSC: SSC {
1647 _marker: PhantomData,
1648 },
1649 SUPC: SUPC {
1650 _marker: PhantomData,
1651 },
1652 TC0: TC0 {
1653 _marker: PhantomData,
1654 },
1655 TC1: TC1 {
1656 _marker: PhantomData,
1657 },
1658 TC2: TC2 {
1659 _marker: PhantomData,
1660 },
1661 TC3: TC3 {
1662 _marker: PhantomData,
1663 },
1664 TRNG: TRNG {
1665 _marker: PhantomData,
1666 },
1667 TWIHS0: TWIHS0 {
1668 _marker: PhantomData,
1669 },
1670 TWIHS1: TWIHS1 {
1671 _marker: PhantomData,
1672 },
1673 UART0: UART0 {
1674 _marker: PhantomData,
1675 },
1676 UART1: UART1 {
1677 _marker: PhantomData,
1678 },
1679 UART2: UART2 {
1680 _marker: PhantomData,
1681 },
1682 USART0: USART0 {
1683 _marker: PhantomData,
1684 },
1685 USART1: USART1 {
1686 _marker: PhantomData,
1687 },
1688 USBHS: USBHS {
1689 _marker: PhantomData,
1690 },
1691 UTMI: UTMI {
1692 _marker: PhantomData,
1693 },
1694 WDT: WDT {
1695 _marker: PhantomData,
1696 },
1697 XDMAC: XDMAC {
1698 _marker: PhantomData,
1699 },
1700 LOCKBIT: LOCKBIT {
1701 _marker: PhantomData,
1702 },
1703 SCNSCB: SCNSCB {
1704 _marker: PhantomData,
1705 },
1706 SYSTICK: SYSTICK {
1707 _marker: PhantomData,
1708 },
1709 }
1710 }
1711}