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