1#![doc = "Peripheral access API for ESP32-S2 microcontrollers (generated using svd2rust v0.35.0 ( ))\n\nYou can find an overview of the generated API [here].\n\nAPI features to be included in the [next] svd2rust 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.35.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"]
2#![allow(non_camel_case_types)]
3#![allow(non_snake_case)]
4#![doc(html_logo_url = "https://avatars.githubusercontent.com/u/46717278")]
5#![no_std]
6use core::marker::PhantomData;
7use core::ops::Deref;
8#[doc = r"Number available in the NVIC for configuring priority"]
9pub const NVIC_PRIO_BITS: u8 = 0;
10#[allow(unused_imports)]
11use generic::*;
12#[doc = r"Common register and bit access and modify traits"]
13pub mod generic;
14#[cfg(feature = "rt")]
15extern "C" {
16 fn WIFI_MAC();
17 fn WIFI_NMI();
18 fn WIFI_PWR();
19 fn WIFI_BB();
20 fn BT_MAC();
21 fn BT_BB();
22 fn BT_BB_NMI();
23 fn RWBT();
24 fn RWBLE();
25 fn RWBT_NMI();
26 fn RWBLE_NMI();
27 fn SLC0();
28 fn SLC1();
29 fn UHCI0();
30 fn UHCI1();
31 fn TG0_T0_LEVEL();
32 fn TG0_T1_LEVEL();
33 fn TG0_WDT_LEVEL();
34 fn TG0_LACT_LEVEL();
35 fn TG1_T0_LEVEL();
36 fn TG1_T1_LEVEL();
37 fn TG1_WDT_LEVEL();
38 fn TG1_LACT_LEVEL();
39 fn GPIO();
40 fn GPIO_NMI();
41 fn GPIO_INTR_2();
42 fn GPIO_NMI_2();
43 fn DEDICATED_GPIO();
44 fn FROM_CPU_INTR0();
45 fn FROM_CPU_INTR1();
46 fn FROM_CPU_INTR2();
47 fn FROM_CPU_INTR3();
48 fn SPI1();
49 fn SPI2();
50 fn SPI3();
51 fn I2S0();
52 fn I2S1();
53 fn UART0();
54 fn UART1();
55 fn UART2();
56 fn SDIO_HOST();
57 fn LEDC();
58 fn EFUSE();
59 fn TWAI0();
60 fn USB();
61 fn RTC_CORE();
62 fn RMT();
63 fn PCNT();
64 fn I2C_EXT0();
65 fn I2C_EXT1();
66 fn RSA();
67 fn SHA();
68 fn AES();
69 fn SPI2_DMA();
70 fn SPI3_DMA();
71 fn WDT();
72 fn TIMER1();
73 fn TIMER2();
74 fn TG0_T0_EDGE();
75 fn TG0_T1_EDGE();
76 fn TG0_WDT_EDGE();
77 fn TG0_LACT_EDGE();
78 fn TG1_T0_EDGE();
79 fn TG1_T1_EDGE();
80 fn TG1_WDT_EDGE();
81 fn TG1_LACT_EDGE();
82 fn CACHE_IA();
83 fn SYSTIMER_TARGET0();
84 fn SYSTIMER_TARGET1();
85 fn SYSTIMER_TARGET2();
86 fn PMS_PRO_IRAM0_ILG();
87 fn PMS_PRO_DRAM0_ILG();
88 fn PMS_PRO_DPORT_ILG();
89 fn PMS_PRO_AHB_ILG();
90 fn PMS_PRO_CACHE_ILG();
91 fn PMS_DMA_APB_I_ILG();
92 fn PMS_DMA_RX_I_ILG();
93 fn PMS_DMA_TX_I_ILG();
94 fn SPI0_REJECT_CACHE();
95 fn DMA_COPY();
96 fn SPI4_DMA();
97 fn SPI4();
98 fn ICACHE_PRELOAD();
99 fn DCACHE_PRELOAD();
100 fn APB_ADC();
101 fn CRYPTO_DMA();
102 fn CPU_PERI_ERR();
103 fn APB_PERI_ERR();
104 fn DCACHE_SYNC();
105 fn ICACHE_SYNC();
106}
107#[doc(hidden)]
108#[repr(C)]
109pub union Vector {
110 pub _handler: unsafe extern "C" fn(),
111 _reserved: u32,
112}
113#[cfg(feature = "rt")]
114#[link_section = ".rwtext"]
115#[doc(hidden)]
116pub static __INTERRUPTS: [Vector; 95] = [
117 Vector { _handler: WIFI_MAC },
118 Vector { _handler: WIFI_NMI },
119 Vector { _handler: WIFI_PWR },
120 Vector { _handler: WIFI_BB },
121 Vector { _handler: BT_MAC },
122 Vector { _handler: BT_BB },
123 Vector {
124 _handler: BT_BB_NMI,
125 },
126 Vector { _handler: RWBT },
127 Vector { _handler: RWBLE },
128 Vector { _handler: RWBT_NMI },
129 Vector {
130 _handler: RWBLE_NMI,
131 },
132 Vector { _handler: SLC0 },
133 Vector { _handler: SLC1 },
134 Vector { _handler: UHCI0 },
135 Vector { _handler: UHCI1 },
136 Vector {
137 _handler: TG0_T0_LEVEL,
138 },
139 Vector {
140 _handler: TG0_T1_LEVEL,
141 },
142 Vector {
143 _handler: TG0_WDT_LEVEL,
144 },
145 Vector {
146 _handler: TG0_LACT_LEVEL,
147 },
148 Vector {
149 _handler: TG1_T0_LEVEL,
150 },
151 Vector {
152 _handler: TG1_T1_LEVEL,
153 },
154 Vector {
155 _handler: TG1_WDT_LEVEL,
156 },
157 Vector {
158 _handler: TG1_LACT_LEVEL,
159 },
160 Vector { _handler: GPIO },
161 Vector { _handler: GPIO_NMI },
162 Vector {
163 _handler: GPIO_INTR_2,
164 },
165 Vector {
166 _handler: GPIO_NMI_2,
167 },
168 Vector {
169 _handler: DEDICATED_GPIO,
170 },
171 Vector {
172 _handler: FROM_CPU_INTR0,
173 },
174 Vector {
175 _handler: FROM_CPU_INTR1,
176 },
177 Vector {
178 _handler: FROM_CPU_INTR2,
179 },
180 Vector {
181 _handler: FROM_CPU_INTR3,
182 },
183 Vector { _handler: SPI1 },
184 Vector { _handler: SPI2 },
185 Vector { _handler: SPI3 },
186 Vector { _handler: I2S0 },
187 Vector { _handler: I2S1 },
188 Vector { _handler: UART0 },
189 Vector { _handler: UART1 },
190 Vector { _handler: UART2 },
191 Vector {
192 _handler: SDIO_HOST,
193 },
194 Vector { _reserved: 0 },
195 Vector { _reserved: 0 },
196 Vector { _reserved: 0 },
197 Vector { _reserved: 0 },
198 Vector { _handler: LEDC },
199 Vector { _handler: EFUSE },
200 Vector { _handler: TWAI0 },
201 Vector { _handler: USB },
202 Vector { _handler: RTC_CORE },
203 Vector { _handler: RMT },
204 Vector { _handler: PCNT },
205 Vector { _handler: I2C_EXT0 },
206 Vector { _handler: I2C_EXT1 },
207 Vector { _handler: RSA },
208 Vector { _handler: SHA },
209 Vector { _handler: AES },
210 Vector { _handler: SPI2_DMA },
211 Vector { _handler: SPI3_DMA },
212 Vector { _handler: WDT },
213 Vector { _handler: TIMER1 },
214 Vector { _handler: TIMER2 },
215 Vector {
216 _handler: TG0_T0_EDGE,
217 },
218 Vector {
219 _handler: TG0_T1_EDGE,
220 },
221 Vector {
222 _handler: TG0_WDT_EDGE,
223 },
224 Vector {
225 _handler: TG0_LACT_EDGE,
226 },
227 Vector {
228 _handler: TG1_T0_EDGE,
229 },
230 Vector {
231 _handler: TG1_T1_EDGE,
232 },
233 Vector {
234 _handler: TG1_WDT_EDGE,
235 },
236 Vector {
237 _handler: TG1_LACT_EDGE,
238 },
239 Vector { _handler: CACHE_IA },
240 Vector {
241 _handler: SYSTIMER_TARGET0,
242 },
243 Vector {
244 _handler: SYSTIMER_TARGET1,
245 },
246 Vector {
247 _handler: SYSTIMER_TARGET2,
248 },
249 Vector { _reserved: 0 },
250 Vector {
251 _handler: PMS_PRO_IRAM0_ILG,
252 },
253 Vector {
254 _handler: PMS_PRO_DRAM0_ILG,
255 },
256 Vector {
257 _handler: PMS_PRO_DPORT_ILG,
258 },
259 Vector {
260 _handler: PMS_PRO_AHB_ILG,
261 },
262 Vector {
263 _handler: PMS_PRO_CACHE_ILG,
264 },
265 Vector {
266 _handler: PMS_DMA_APB_I_ILG,
267 },
268 Vector {
269 _handler: PMS_DMA_RX_I_ILG,
270 },
271 Vector {
272 _handler: PMS_DMA_TX_I_ILG,
273 },
274 Vector {
275 _handler: SPI0_REJECT_CACHE,
276 },
277 Vector { _handler: DMA_COPY },
278 Vector { _handler: SPI4_DMA },
279 Vector { _handler: SPI4 },
280 Vector {
281 _handler: ICACHE_PRELOAD,
282 },
283 Vector {
284 _handler: DCACHE_PRELOAD,
285 },
286 Vector { _handler: APB_ADC },
287 Vector {
288 _handler: CRYPTO_DMA,
289 },
290 Vector {
291 _handler: CPU_PERI_ERR,
292 },
293 Vector {
294 _handler: APB_PERI_ERR,
295 },
296 Vector {
297 _handler: DCACHE_SYNC,
298 },
299 Vector {
300 _handler: ICACHE_SYNC,
301 },
302];
303#[doc = r"Enumeration of all the interrupts."]
304#[cfg_attr(feature = "defmt", derive(defmt::Format))]
305#[derive(Copy, Clone, Debug, PartialEq, Eq)]
306#[repr(u16)]
307pub enum Interrupt {
308 #[doc = "0 - WIFI_MAC"]
309 WIFI_MAC = 0,
310 #[doc = "1 - WIFI_NMI"]
311 WIFI_NMI = 1,
312 #[doc = "2 - WIFI_PWR"]
313 WIFI_PWR = 2,
314 #[doc = "3 - WIFI_BB"]
315 WIFI_BB = 3,
316 #[doc = "4 - BT_MAC"]
317 BT_MAC = 4,
318 #[doc = "5 - BT_BB"]
319 BT_BB = 5,
320 #[doc = "6 - BT_BB_NMI"]
321 BT_BB_NMI = 6,
322 #[doc = "7 - RWBT"]
323 RWBT = 7,
324 #[doc = "8 - RWBLE"]
325 RWBLE = 8,
326 #[doc = "9 - RWBT_NMI"]
327 RWBT_NMI = 9,
328 #[doc = "10 - RWBLE_NMI"]
329 RWBLE_NMI = 10,
330 #[doc = "11 - SLC0"]
331 SLC0 = 11,
332 #[doc = "12 - SLC1"]
333 SLC1 = 12,
334 #[doc = "13 - UHCI0"]
335 UHCI0 = 13,
336 #[doc = "14 - UHCI1"]
337 UHCI1 = 14,
338 #[doc = "15 - TG0_T0_LEVEL"]
339 TG0_T0_LEVEL = 15,
340 #[doc = "16 - TG0_T1_LEVEL"]
341 TG0_T1_LEVEL = 16,
342 #[doc = "17 - TG0_WDT_LEVEL"]
343 TG0_WDT_LEVEL = 17,
344 #[doc = "18 - TG0_LACT_LEVEL"]
345 TG0_LACT_LEVEL = 18,
346 #[doc = "19 - TG1_T0_LEVEL"]
347 TG1_T0_LEVEL = 19,
348 #[doc = "20 - TG1_T1_LEVEL"]
349 TG1_T1_LEVEL = 20,
350 #[doc = "21 - TG1_WDT_LEVEL"]
351 TG1_WDT_LEVEL = 21,
352 #[doc = "22 - TG1_LACT_LEVEL"]
353 TG1_LACT_LEVEL = 22,
354 #[doc = "23 - GPIO"]
355 GPIO = 23,
356 #[doc = "24 - GPIO_NMI"]
357 GPIO_NMI = 24,
358 #[doc = "25 - GPIO_INTR_2"]
359 GPIO_INTR_2 = 25,
360 #[doc = "26 - GPIO_NMI_2"]
361 GPIO_NMI_2 = 26,
362 #[doc = "27 - DEDICATED_GPIO"]
363 DEDICATED_GPIO = 27,
364 #[doc = "28 - FROM_CPU_INTR0"]
365 FROM_CPU_INTR0 = 28,
366 #[doc = "29 - FROM_CPU_INTR1"]
367 FROM_CPU_INTR1 = 29,
368 #[doc = "30 - FROM_CPU_INTR2"]
369 FROM_CPU_INTR2 = 30,
370 #[doc = "31 - FROM_CPU_INTR3"]
371 FROM_CPU_INTR3 = 31,
372 #[doc = "32 - SPI1"]
373 SPI1 = 32,
374 #[doc = "33 - SPI2"]
375 SPI2 = 33,
376 #[doc = "34 - SPI3"]
377 SPI3 = 34,
378 #[doc = "35 - I2S0"]
379 I2S0 = 35,
380 #[doc = "36 - I2S1"]
381 I2S1 = 36,
382 #[doc = "37 - UART0"]
383 UART0 = 37,
384 #[doc = "38 - UART1"]
385 UART1 = 38,
386 #[doc = "39 - UART2"]
387 UART2 = 39,
388 #[doc = "40 - SDIO_HOST"]
389 SDIO_HOST = 40,
390 #[doc = "45 - LEDC"]
391 LEDC = 45,
392 #[doc = "46 - EFUSE"]
393 EFUSE = 46,
394 #[doc = "47 - TWAI0"]
395 TWAI0 = 47,
396 #[doc = "48 - USB"]
397 USB = 48,
398 #[doc = "49 - RTC_CORE"]
399 RTC_CORE = 49,
400 #[doc = "50 - RMT"]
401 RMT = 50,
402 #[doc = "51 - PCNT"]
403 PCNT = 51,
404 #[doc = "52 - I2C_EXT0"]
405 I2C_EXT0 = 52,
406 #[doc = "53 - I2C_EXT1"]
407 I2C_EXT1 = 53,
408 #[doc = "54 - RSA"]
409 RSA = 54,
410 #[doc = "55 - SHA"]
411 SHA = 55,
412 #[doc = "56 - AES"]
413 AES = 56,
414 #[doc = "57 - SPI2_DMA"]
415 SPI2_DMA = 57,
416 #[doc = "58 - SPI3_DMA"]
417 SPI3_DMA = 58,
418 #[doc = "59 - WDT"]
419 WDT = 59,
420 #[doc = "60 - TIMER1"]
421 TIMER1 = 60,
422 #[doc = "61 - TIMER2"]
423 TIMER2 = 61,
424 #[doc = "62 - TG0_T0_EDGE"]
425 TG0_T0_EDGE = 62,
426 #[doc = "63 - TG0_T1_EDGE"]
427 TG0_T1_EDGE = 63,
428 #[doc = "64 - TG0_WDT_EDGE"]
429 TG0_WDT_EDGE = 64,
430 #[doc = "65 - TG0_LACT_EDGE"]
431 TG0_LACT_EDGE = 65,
432 #[doc = "66 - TG1_T0_EDGE"]
433 TG1_T0_EDGE = 66,
434 #[doc = "67 - TG1_T1_EDGE"]
435 TG1_T1_EDGE = 67,
436 #[doc = "68 - TG1_WDT_EDGE"]
437 TG1_WDT_EDGE = 68,
438 #[doc = "69 - TG1_LACT_EDGE"]
439 TG1_LACT_EDGE = 69,
440 #[doc = "70 - CACHE_IA"]
441 CACHE_IA = 70,
442 #[doc = "71 - SYSTIMER_TARGET0"]
443 SYSTIMER_TARGET0 = 71,
444 #[doc = "72 - SYSTIMER_TARGET1"]
445 SYSTIMER_TARGET1 = 72,
446 #[doc = "73 - SYSTIMER_TARGET2"]
447 SYSTIMER_TARGET2 = 73,
448 #[doc = "75 - PMS_PRO_IRAM0_ILG"]
449 PMS_PRO_IRAM0_ILG = 75,
450 #[doc = "76 - PMS_PRO_DRAM0_ILG"]
451 PMS_PRO_DRAM0_ILG = 76,
452 #[doc = "77 - PMS_PRO_DPORT_ILG"]
453 PMS_PRO_DPORT_ILG = 77,
454 #[doc = "78 - PMS_PRO_AHB_ILG"]
455 PMS_PRO_AHB_ILG = 78,
456 #[doc = "79 - PMS_PRO_CACHE_ILG"]
457 PMS_PRO_CACHE_ILG = 79,
458 #[doc = "80 - PMS_DMA_APB_I_ILG"]
459 PMS_DMA_APB_I_ILG = 80,
460 #[doc = "81 - PMS_DMA_RX_I_ILG"]
461 PMS_DMA_RX_I_ILG = 81,
462 #[doc = "82 - PMS_DMA_TX_I_ILG"]
463 PMS_DMA_TX_I_ILG = 82,
464 #[doc = "83 - SPI0_REJECT_CACHE"]
465 SPI0_REJECT_CACHE = 83,
466 #[doc = "84 - DMA_COPY"]
467 DMA_COPY = 84,
468 #[doc = "85 - SPI4_DMA"]
469 SPI4_DMA = 85,
470 #[doc = "86 - SPI4"]
471 SPI4 = 86,
472 #[doc = "87 - ICACHE_PRELOAD"]
473 ICACHE_PRELOAD = 87,
474 #[doc = "88 - DCACHE_PRELOAD"]
475 DCACHE_PRELOAD = 88,
476 #[doc = "89 - APB_ADC"]
477 APB_ADC = 89,
478 #[doc = "90 - CRYPTO_DMA"]
479 CRYPTO_DMA = 90,
480 #[doc = "91 - CPU_PERI_ERR"]
481 CPU_PERI_ERR = 91,
482 #[doc = "92 - APB_PERI_ERR"]
483 APB_PERI_ERR = 92,
484 #[doc = "93 - DCACHE_SYNC"]
485 DCACHE_SYNC = 93,
486 #[doc = "94 - ICACHE_SYNC"]
487 ICACHE_SYNC = 94,
488}
489#[doc = r" TryFromInterruptError"]
490#[cfg_attr(feature = "defmt", derive(defmt::Format))]
491#[derive(Debug, Copy, Clone)]
492pub struct TryFromInterruptError(());
493impl Interrupt {
494 #[doc = r" Attempt to convert a given value into an `Interrupt`"]
495 #[inline]
496 pub fn try_from(value: u16) -> Result<Self, TryFromInterruptError> {
497 match value {
498 0 => Ok(Interrupt::WIFI_MAC),
499 1 => Ok(Interrupt::WIFI_NMI),
500 2 => Ok(Interrupt::WIFI_PWR),
501 3 => Ok(Interrupt::WIFI_BB),
502 4 => Ok(Interrupt::BT_MAC),
503 5 => Ok(Interrupt::BT_BB),
504 6 => Ok(Interrupt::BT_BB_NMI),
505 7 => Ok(Interrupt::RWBT),
506 8 => Ok(Interrupt::RWBLE),
507 9 => Ok(Interrupt::RWBT_NMI),
508 10 => Ok(Interrupt::RWBLE_NMI),
509 11 => Ok(Interrupt::SLC0),
510 12 => Ok(Interrupt::SLC1),
511 13 => Ok(Interrupt::UHCI0),
512 14 => Ok(Interrupt::UHCI1),
513 15 => Ok(Interrupt::TG0_T0_LEVEL),
514 16 => Ok(Interrupt::TG0_T1_LEVEL),
515 17 => Ok(Interrupt::TG0_WDT_LEVEL),
516 18 => Ok(Interrupt::TG0_LACT_LEVEL),
517 19 => Ok(Interrupt::TG1_T0_LEVEL),
518 20 => Ok(Interrupt::TG1_T1_LEVEL),
519 21 => Ok(Interrupt::TG1_WDT_LEVEL),
520 22 => Ok(Interrupt::TG1_LACT_LEVEL),
521 23 => Ok(Interrupt::GPIO),
522 24 => Ok(Interrupt::GPIO_NMI),
523 25 => Ok(Interrupt::GPIO_INTR_2),
524 26 => Ok(Interrupt::GPIO_NMI_2),
525 27 => Ok(Interrupt::DEDICATED_GPIO),
526 28 => Ok(Interrupt::FROM_CPU_INTR0),
527 29 => Ok(Interrupt::FROM_CPU_INTR1),
528 30 => Ok(Interrupt::FROM_CPU_INTR2),
529 31 => Ok(Interrupt::FROM_CPU_INTR3),
530 32 => Ok(Interrupt::SPI1),
531 33 => Ok(Interrupt::SPI2),
532 34 => Ok(Interrupt::SPI3),
533 35 => Ok(Interrupt::I2S0),
534 36 => Ok(Interrupt::I2S1),
535 37 => Ok(Interrupt::UART0),
536 38 => Ok(Interrupt::UART1),
537 39 => Ok(Interrupt::UART2),
538 40 => Ok(Interrupt::SDIO_HOST),
539 45 => Ok(Interrupt::LEDC),
540 46 => Ok(Interrupt::EFUSE),
541 47 => Ok(Interrupt::TWAI0),
542 48 => Ok(Interrupt::USB),
543 49 => Ok(Interrupt::RTC_CORE),
544 50 => Ok(Interrupt::RMT),
545 51 => Ok(Interrupt::PCNT),
546 52 => Ok(Interrupt::I2C_EXT0),
547 53 => Ok(Interrupt::I2C_EXT1),
548 54 => Ok(Interrupt::RSA),
549 55 => Ok(Interrupt::SHA),
550 56 => Ok(Interrupt::AES),
551 57 => Ok(Interrupt::SPI2_DMA),
552 58 => Ok(Interrupt::SPI3_DMA),
553 59 => Ok(Interrupt::WDT),
554 60 => Ok(Interrupt::TIMER1),
555 61 => Ok(Interrupt::TIMER2),
556 62 => Ok(Interrupt::TG0_T0_EDGE),
557 63 => Ok(Interrupt::TG0_T1_EDGE),
558 64 => Ok(Interrupt::TG0_WDT_EDGE),
559 65 => Ok(Interrupt::TG0_LACT_EDGE),
560 66 => Ok(Interrupt::TG1_T0_EDGE),
561 67 => Ok(Interrupt::TG1_T1_EDGE),
562 68 => Ok(Interrupt::TG1_WDT_EDGE),
563 69 => Ok(Interrupt::TG1_LACT_EDGE),
564 70 => Ok(Interrupt::CACHE_IA),
565 71 => Ok(Interrupt::SYSTIMER_TARGET0),
566 72 => Ok(Interrupt::SYSTIMER_TARGET1),
567 73 => Ok(Interrupt::SYSTIMER_TARGET2),
568 75 => Ok(Interrupt::PMS_PRO_IRAM0_ILG),
569 76 => Ok(Interrupt::PMS_PRO_DRAM0_ILG),
570 77 => Ok(Interrupt::PMS_PRO_DPORT_ILG),
571 78 => Ok(Interrupt::PMS_PRO_AHB_ILG),
572 79 => Ok(Interrupt::PMS_PRO_CACHE_ILG),
573 80 => Ok(Interrupt::PMS_DMA_APB_I_ILG),
574 81 => Ok(Interrupt::PMS_DMA_RX_I_ILG),
575 82 => Ok(Interrupt::PMS_DMA_TX_I_ILG),
576 83 => Ok(Interrupt::SPI0_REJECT_CACHE),
577 84 => Ok(Interrupt::DMA_COPY),
578 85 => Ok(Interrupt::SPI4_DMA),
579 86 => Ok(Interrupt::SPI4),
580 87 => Ok(Interrupt::ICACHE_PRELOAD),
581 88 => Ok(Interrupt::DCACHE_PRELOAD),
582 89 => Ok(Interrupt::APB_ADC),
583 90 => Ok(Interrupt::CRYPTO_DMA),
584 91 => Ok(Interrupt::CPU_PERI_ERR),
585 92 => Ok(Interrupt::APB_PERI_ERR),
586 93 => Ok(Interrupt::DCACHE_SYNC),
587 94 => Ok(Interrupt::ICACHE_SYNC),
588 _ => Err(TryFromInterruptError(())),
589 }
590 }
591}
592#[doc = "AES (Advanced Encryption Standard) Accelerator"]
593pub struct AES {
594 _marker: PhantomData<*const ()>,
595}
596unsafe impl Send for AES {}
597impl AES {
598 #[doc = r"Pointer to the register block"]
599 pub const PTR: *const aes::RegisterBlock = 0x6003_a000 as *const _;
600 #[doc = r"Return the pointer to the register block"]
601 #[inline(always)]
602 pub const fn ptr() -> *const aes::RegisterBlock {
603 Self::PTR
604 }
605 #[doc = r" Steal an instance of this peripheral"]
606 #[doc = r""]
607 #[doc = r" # Safety"]
608 #[doc = r""]
609 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
610 #[doc = r" that may race with any existing instances, for example by only"]
611 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
612 #[doc = r" original peripheral and using critical sections to coordinate"]
613 #[doc = r" access between multiple new instances."]
614 #[doc = r""]
615 #[doc = r" Additionally, other software such as HALs may rely on only one"]
616 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
617 #[doc = r" no stolen instances are passed to such software."]
618 pub unsafe fn steal() -> Self {
619 Self {
620 _marker: PhantomData,
621 }
622 }
623}
624impl Deref for AES {
625 type Target = aes::RegisterBlock;
626 #[inline(always)]
627 fn deref(&self) -> &Self::Target {
628 unsafe { &*Self::PTR }
629 }
630}
631impl core::fmt::Debug for AES {
632 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
633 f.debug_struct("AES").finish()
634 }
635}
636#[doc = "AES (Advanced Encryption Standard) Accelerator"]
637pub mod aes;
638#[doc = "SAR (Successive Approximation Register) Analog-to-Digital Converter"]
639pub struct APB_SARADC {
640 _marker: PhantomData<*const ()>,
641}
642unsafe impl Send for APB_SARADC {}
643impl APB_SARADC {
644 #[doc = r"Pointer to the register block"]
645 pub const PTR: *const apb_saradc::RegisterBlock = 0x3f44_0000 as *const _;
646 #[doc = r"Return the pointer to the register block"]
647 #[inline(always)]
648 pub const fn ptr() -> *const apb_saradc::RegisterBlock {
649 Self::PTR
650 }
651 #[doc = r" Steal an instance of this peripheral"]
652 #[doc = r""]
653 #[doc = r" # Safety"]
654 #[doc = r""]
655 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
656 #[doc = r" that may race with any existing instances, for example by only"]
657 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
658 #[doc = r" original peripheral and using critical sections to coordinate"]
659 #[doc = r" access between multiple new instances."]
660 #[doc = r""]
661 #[doc = r" Additionally, other software such as HALs may rely on only one"]
662 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
663 #[doc = r" no stolen instances are passed to such software."]
664 pub unsafe fn steal() -> Self {
665 Self {
666 _marker: PhantomData,
667 }
668 }
669}
670impl Deref for APB_SARADC {
671 type Target = apb_saradc::RegisterBlock;
672 #[inline(always)]
673 fn deref(&self) -> &Self::Target {
674 unsafe { &*Self::PTR }
675 }
676}
677impl core::fmt::Debug for APB_SARADC {
678 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
679 f.debug_struct("APB_SARADC").finish()
680 }
681}
682#[doc = "SAR (Successive Approximation Register) Analog-to-Digital Converter"]
683pub mod apb_saradc;
684#[doc = "BB Peripheral"]
685pub struct BB {
686 _marker: PhantomData<*const ()>,
687}
688unsafe impl Send for BB {}
689impl BB {
690 #[doc = r"Pointer to the register block"]
691 pub const PTR: *const bb::RegisterBlock = 0x3f41_d000 as *const _;
692 #[doc = r"Return the pointer to the register block"]
693 #[inline(always)]
694 pub const fn ptr() -> *const bb::RegisterBlock {
695 Self::PTR
696 }
697 #[doc = r" Steal an instance of this peripheral"]
698 #[doc = r""]
699 #[doc = r" # Safety"]
700 #[doc = r""]
701 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
702 #[doc = r" that may race with any existing instances, for example by only"]
703 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
704 #[doc = r" original peripheral and using critical sections to coordinate"]
705 #[doc = r" access between multiple new instances."]
706 #[doc = r""]
707 #[doc = r" Additionally, other software such as HALs may rely on only one"]
708 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
709 #[doc = r" no stolen instances are passed to such software."]
710 pub unsafe fn steal() -> Self {
711 Self {
712 _marker: PhantomData,
713 }
714 }
715}
716impl Deref for BB {
717 type Target = bb::RegisterBlock;
718 #[inline(always)]
719 fn deref(&self) -> &Self::Target {
720 unsafe { &*Self::PTR }
721 }
722}
723impl core::fmt::Debug for BB {
724 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
725 f.debug_struct("BB").finish()
726 }
727}
728#[doc = "BB Peripheral"]
729pub mod bb;
730#[doc = "DEDICATED_GPIO Peripheral"]
731pub struct DEDICATED_GPIO {
732 _marker: PhantomData<*const ()>,
733}
734unsafe impl Send for DEDICATED_GPIO {}
735impl DEDICATED_GPIO {
736 #[doc = r"Pointer to the register block"]
737 pub const PTR: *const dedicated_gpio::RegisterBlock = 0x3f4c_f000 as *const _;
738 #[doc = r"Return the pointer to the register block"]
739 #[inline(always)]
740 pub const fn ptr() -> *const dedicated_gpio::RegisterBlock {
741 Self::PTR
742 }
743 #[doc = r" Steal an instance of this peripheral"]
744 #[doc = r""]
745 #[doc = r" # Safety"]
746 #[doc = r""]
747 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
748 #[doc = r" that may race with any existing instances, for example by only"]
749 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
750 #[doc = r" original peripheral and using critical sections to coordinate"]
751 #[doc = r" access between multiple new instances."]
752 #[doc = r""]
753 #[doc = r" Additionally, other software such as HALs may rely on only one"]
754 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
755 #[doc = r" no stolen instances are passed to such software."]
756 pub unsafe fn steal() -> Self {
757 Self {
758 _marker: PhantomData,
759 }
760 }
761}
762impl Deref for DEDICATED_GPIO {
763 type Target = dedicated_gpio::RegisterBlock;
764 #[inline(always)]
765 fn deref(&self) -> &Self::Target {
766 unsafe { &*Self::PTR }
767 }
768}
769impl core::fmt::Debug for DEDICATED_GPIO {
770 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
771 f.debug_struct("DEDICATED_GPIO").finish()
772 }
773}
774#[doc = "DEDICATED_GPIO Peripheral"]
775pub mod dedicated_gpio;
776#[doc = "Digital Signature"]
777pub struct DS {
778 _marker: PhantomData<*const ()>,
779}
780unsafe impl Send for DS {}
781impl DS {
782 #[doc = r"Pointer to the register block"]
783 pub const PTR: *const ds::RegisterBlock = 0x6003_d000 as *const _;
784 #[doc = r"Return the pointer to the register block"]
785 #[inline(always)]
786 pub const fn ptr() -> *const ds::RegisterBlock {
787 Self::PTR
788 }
789 #[doc = r" Steal an instance of this peripheral"]
790 #[doc = r""]
791 #[doc = r" # Safety"]
792 #[doc = r""]
793 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
794 #[doc = r" that may race with any existing instances, for example by only"]
795 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
796 #[doc = r" original peripheral and using critical sections to coordinate"]
797 #[doc = r" access between multiple new instances."]
798 #[doc = r""]
799 #[doc = r" Additionally, other software such as HALs may rely on only one"]
800 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
801 #[doc = r" no stolen instances are passed to such software."]
802 pub unsafe fn steal() -> Self {
803 Self {
804 _marker: PhantomData,
805 }
806 }
807}
808impl Deref for DS {
809 type Target = ds::RegisterBlock;
810 #[inline(always)]
811 fn deref(&self) -> &Self::Target {
812 unsafe { &*Self::PTR }
813 }
814}
815impl core::fmt::Debug for DS {
816 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
817 f.debug_struct("DS").finish()
818 }
819}
820#[doc = "Digital Signature"]
821pub mod ds;
822#[doc = "eFuse Controller"]
823pub struct EFUSE {
824 _marker: PhantomData<*const ()>,
825}
826unsafe impl Send for EFUSE {}
827impl EFUSE {
828 #[doc = r"Pointer to the register block"]
829 pub const PTR: *const efuse::RegisterBlock = 0x3f41_a000 as *const _;
830 #[doc = r"Return the pointer to the register block"]
831 #[inline(always)]
832 pub const fn ptr() -> *const efuse::RegisterBlock {
833 Self::PTR
834 }
835 #[doc = r" Steal an instance of this peripheral"]
836 #[doc = r""]
837 #[doc = r" # Safety"]
838 #[doc = r""]
839 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
840 #[doc = r" that may race with any existing instances, for example by only"]
841 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
842 #[doc = r" original peripheral and using critical sections to coordinate"]
843 #[doc = r" access between multiple new instances."]
844 #[doc = r""]
845 #[doc = r" Additionally, other software such as HALs may rely on only one"]
846 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
847 #[doc = r" no stolen instances are passed to such software."]
848 pub unsafe fn steal() -> Self {
849 Self {
850 _marker: PhantomData,
851 }
852 }
853}
854impl Deref for EFUSE {
855 type Target = efuse::RegisterBlock;
856 #[inline(always)]
857 fn deref(&self) -> &Self::Target {
858 unsafe { &*Self::PTR }
859 }
860}
861impl core::fmt::Debug for EFUSE {
862 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
863 f.debug_struct("EFUSE").finish()
864 }
865}
866#[doc = "eFuse Controller"]
867pub mod efuse;
868#[doc = "External Memory"]
869pub struct EXTMEM {
870 _marker: PhantomData<*const ()>,
871}
872unsafe impl Send for EXTMEM {}
873impl EXTMEM {
874 #[doc = r"Pointer to the register block"]
875 pub const PTR: *const extmem::RegisterBlock = 0x6180_0000 as *const _;
876 #[doc = r"Return the pointer to the register block"]
877 #[inline(always)]
878 pub const fn ptr() -> *const extmem::RegisterBlock {
879 Self::PTR
880 }
881 #[doc = r" Steal an instance of this peripheral"]
882 #[doc = r""]
883 #[doc = r" # Safety"]
884 #[doc = r""]
885 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
886 #[doc = r" that may race with any existing instances, for example by only"]
887 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
888 #[doc = r" original peripheral and using critical sections to coordinate"]
889 #[doc = r" access between multiple new instances."]
890 #[doc = r""]
891 #[doc = r" Additionally, other software such as HALs may rely on only one"]
892 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
893 #[doc = r" no stolen instances are passed to such software."]
894 pub unsafe fn steal() -> Self {
895 Self {
896 _marker: PhantomData,
897 }
898 }
899}
900impl Deref for EXTMEM {
901 type Target = extmem::RegisterBlock;
902 #[inline(always)]
903 fn deref(&self) -> &Self::Target {
904 unsafe { &*Self::PTR }
905 }
906}
907impl core::fmt::Debug for EXTMEM {
908 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
909 f.debug_struct("EXTMEM").finish()
910 }
911}
912#[doc = "External Memory"]
913pub mod extmem;
914#[doc = "General Purpose Input/Output"]
915pub struct GPIO {
916 _marker: PhantomData<*const ()>,
917}
918unsafe impl Send for GPIO {}
919impl GPIO {
920 #[doc = r"Pointer to the register block"]
921 pub const PTR: *const gpio::RegisterBlock = 0x3f40_4000 as *const _;
922 #[doc = r"Return the pointer to the register block"]
923 #[inline(always)]
924 pub const fn ptr() -> *const gpio::RegisterBlock {
925 Self::PTR
926 }
927 #[doc = r" Steal an instance of this peripheral"]
928 #[doc = r""]
929 #[doc = r" # Safety"]
930 #[doc = r""]
931 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
932 #[doc = r" that may race with any existing instances, for example by only"]
933 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
934 #[doc = r" original peripheral and using critical sections to coordinate"]
935 #[doc = r" access between multiple new instances."]
936 #[doc = r""]
937 #[doc = r" Additionally, other software such as HALs may rely on only one"]
938 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
939 #[doc = r" no stolen instances are passed to such software."]
940 pub unsafe fn steal() -> Self {
941 Self {
942 _marker: PhantomData,
943 }
944 }
945}
946impl Deref for GPIO {
947 type Target = gpio::RegisterBlock;
948 #[inline(always)]
949 fn deref(&self) -> &Self::Target {
950 unsafe { &*Self::PTR }
951 }
952}
953impl core::fmt::Debug for GPIO {
954 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
955 f.debug_struct("GPIO").finish()
956 }
957}
958#[doc = "General Purpose Input/Output"]
959pub mod gpio;
960#[doc = "Sigma-Delta Modulation"]
961pub struct GPIO_SD {
962 _marker: PhantomData<*const ()>,
963}
964unsafe impl Send for GPIO_SD {}
965impl GPIO_SD {
966 #[doc = r"Pointer to the register block"]
967 pub const PTR: *const gpio_sd::RegisterBlock = 0x3f40_4f00 as *const _;
968 #[doc = r"Return the pointer to the register block"]
969 #[inline(always)]
970 pub const fn ptr() -> *const gpio_sd::RegisterBlock {
971 Self::PTR
972 }
973 #[doc = r" Steal an instance of this peripheral"]
974 #[doc = r""]
975 #[doc = r" # Safety"]
976 #[doc = r""]
977 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
978 #[doc = r" that may race with any existing instances, for example by only"]
979 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
980 #[doc = r" original peripheral and using critical sections to coordinate"]
981 #[doc = r" access between multiple new instances."]
982 #[doc = r""]
983 #[doc = r" Additionally, other software such as HALs may rely on only one"]
984 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
985 #[doc = r" no stolen instances are passed to such software."]
986 pub unsafe fn steal() -> Self {
987 Self {
988 _marker: PhantomData,
989 }
990 }
991}
992impl Deref for GPIO_SD {
993 type Target = gpio_sd::RegisterBlock;
994 #[inline(always)]
995 fn deref(&self) -> &Self::Target {
996 unsafe { &*Self::PTR }
997 }
998}
999impl core::fmt::Debug for GPIO_SD {
1000 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1001 f.debug_struct("GPIO_SD").finish()
1002 }
1003}
1004#[doc = "Sigma-Delta Modulation"]
1005pub mod gpio_sd;
1006#[doc = "HMAC (Hash-based Message Authentication Code) Accelerator"]
1007pub struct HMAC {
1008 _marker: PhantomData<*const ()>,
1009}
1010unsafe impl Send for HMAC {}
1011impl HMAC {
1012 #[doc = r"Pointer to the register block"]
1013 pub const PTR: *const hmac::RegisterBlock = 0x6003_e000 as *const _;
1014 #[doc = r"Return the pointer to the register block"]
1015 #[inline(always)]
1016 pub const fn ptr() -> *const hmac::RegisterBlock {
1017 Self::PTR
1018 }
1019 #[doc = r" Steal an instance of this peripheral"]
1020 #[doc = r""]
1021 #[doc = r" # Safety"]
1022 #[doc = r""]
1023 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1024 #[doc = r" that may race with any existing instances, for example by only"]
1025 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1026 #[doc = r" original peripheral and using critical sections to coordinate"]
1027 #[doc = r" access between multiple new instances."]
1028 #[doc = r""]
1029 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1030 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1031 #[doc = r" no stolen instances are passed to such software."]
1032 pub unsafe fn steal() -> Self {
1033 Self {
1034 _marker: PhantomData,
1035 }
1036 }
1037}
1038impl Deref for HMAC {
1039 type Target = hmac::RegisterBlock;
1040 #[inline(always)]
1041 fn deref(&self) -> &Self::Target {
1042 unsafe { &*Self::PTR }
1043 }
1044}
1045impl core::fmt::Debug for HMAC {
1046 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1047 f.debug_struct("HMAC").finish()
1048 }
1049}
1050#[doc = "HMAC (Hash-based Message Authentication Code) Accelerator"]
1051pub mod hmac;
1052#[doc = "I2C (Inter-Integrated Circuit) Controller 0"]
1053pub struct I2C0 {
1054 _marker: PhantomData<*const ()>,
1055}
1056unsafe impl Send for I2C0 {}
1057impl I2C0 {
1058 #[doc = r"Pointer to the register block"]
1059 pub const PTR: *const i2c0::RegisterBlock = 0x3f41_3000 as *const _;
1060 #[doc = r"Return the pointer to the register block"]
1061 #[inline(always)]
1062 pub const fn ptr() -> *const i2c0::RegisterBlock {
1063 Self::PTR
1064 }
1065 #[doc = r" Steal an instance of this peripheral"]
1066 #[doc = r""]
1067 #[doc = r" # Safety"]
1068 #[doc = r""]
1069 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1070 #[doc = r" that may race with any existing instances, for example by only"]
1071 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1072 #[doc = r" original peripheral and using critical sections to coordinate"]
1073 #[doc = r" access between multiple new instances."]
1074 #[doc = r""]
1075 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1076 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1077 #[doc = r" no stolen instances are passed to such software."]
1078 pub unsafe fn steal() -> Self {
1079 Self {
1080 _marker: PhantomData,
1081 }
1082 }
1083}
1084impl Deref for I2C0 {
1085 type Target = i2c0::RegisterBlock;
1086 #[inline(always)]
1087 fn deref(&self) -> &Self::Target {
1088 unsafe { &*Self::PTR }
1089 }
1090}
1091impl core::fmt::Debug for I2C0 {
1092 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1093 f.debug_struct("I2C0").finish()
1094 }
1095}
1096#[doc = "I2C (Inter-Integrated Circuit) Controller 0"]
1097pub mod i2c0;
1098#[doc = "I2C (Inter-Integrated Circuit) Controller 1"]
1099pub struct I2C1 {
1100 _marker: PhantomData<*const ()>,
1101}
1102unsafe impl Send for I2C1 {}
1103impl I2C1 {
1104 #[doc = r"Pointer to the register block"]
1105 pub const PTR: *const i2c0::RegisterBlock = 0x3f42_7000 as *const _;
1106 #[doc = r"Return the pointer to the register block"]
1107 #[inline(always)]
1108 pub const fn ptr() -> *const i2c0::RegisterBlock {
1109 Self::PTR
1110 }
1111 #[doc = r" Steal an instance of this peripheral"]
1112 #[doc = r""]
1113 #[doc = r" # Safety"]
1114 #[doc = r""]
1115 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1116 #[doc = r" that may race with any existing instances, for example by only"]
1117 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1118 #[doc = r" original peripheral and using critical sections to coordinate"]
1119 #[doc = r" access between multiple new instances."]
1120 #[doc = r""]
1121 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1122 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1123 #[doc = r" no stolen instances are passed to such software."]
1124 pub unsafe fn steal() -> Self {
1125 Self {
1126 _marker: PhantomData,
1127 }
1128 }
1129}
1130impl Deref for I2C1 {
1131 type Target = i2c0::RegisterBlock;
1132 #[inline(always)]
1133 fn deref(&self) -> &Self::Target {
1134 unsafe { &*Self::PTR }
1135 }
1136}
1137impl core::fmt::Debug for I2C1 {
1138 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1139 f.debug_struct("I2C1").finish()
1140 }
1141}
1142#[doc = "I2C (Inter-Integrated Circuit) Controller 1"]
1143pub use self::i2c0 as i2c1;
1144#[doc = "I2S (Inter-IC Sound) Controller 0"]
1145pub struct I2S0 {
1146 _marker: PhantomData<*const ()>,
1147}
1148unsafe impl Send for I2S0 {}
1149impl I2S0 {
1150 #[doc = r"Pointer to the register block"]
1151 pub const PTR: *const i2s0::RegisterBlock = 0x3f40_f000 as *const _;
1152 #[doc = r"Return the pointer to the register block"]
1153 #[inline(always)]
1154 pub const fn ptr() -> *const i2s0::RegisterBlock {
1155 Self::PTR
1156 }
1157 #[doc = r" Steal an instance of this peripheral"]
1158 #[doc = r""]
1159 #[doc = r" # Safety"]
1160 #[doc = r""]
1161 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1162 #[doc = r" that may race with any existing instances, for example by only"]
1163 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1164 #[doc = r" original peripheral and using critical sections to coordinate"]
1165 #[doc = r" access between multiple new instances."]
1166 #[doc = r""]
1167 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1168 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1169 #[doc = r" no stolen instances are passed to such software."]
1170 pub unsafe fn steal() -> Self {
1171 Self {
1172 _marker: PhantomData,
1173 }
1174 }
1175}
1176impl Deref for I2S0 {
1177 type Target = i2s0::RegisterBlock;
1178 #[inline(always)]
1179 fn deref(&self) -> &Self::Target {
1180 unsafe { &*Self::PTR }
1181 }
1182}
1183impl core::fmt::Debug for I2S0 {
1184 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1185 f.debug_struct("I2S0").finish()
1186 }
1187}
1188#[doc = "I2S (Inter-IC Sound) Controller 0"]
1189pub mod i2s0;
1190#[doc = "Interrupt Controller (Core 0)"]
1191pub struct INTERRUPT_CORE0 {
1192 _marker: PhantomData<*const ()>,
1193}
1194unsafe impl Send for INTERRUPT_CORE0 {}
1195impl INTERRUPT_CORE0 {
1196 #[doc = r"Pointer to the register block"]
1197 pub const PTR: *const interrupt_core0::RegisterBlock = 0x3f4c_2000 as *const _;
1198 #[doc = r"Return the pointer to the register block"]
1199 #[inline(always)]
1200 pub const fn ptr() -> *const interrupt_core0::RegisterBlock {
1201 Self::PTR
1202 }
1203 #[doc = r" Steal an instance of this peripheral"]
1204 #[doc = r""]
1205 #[doc = r" # Safety"]
1206 #[doc = r""]
1207 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1208 #[doc = r" that may race with any existing instances, for example by only"]
1209 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1210 #[doc = r" original peripheral and using critical sections to coordinate"]
1211 #[doc = r" access between multiple new instances."]
1212 #[doc = r""]
1213 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1214 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1215 #[doc = r" no stolen instances are passed to such software."]
1216 pub unsafe fn steal() -> Self {
1217 Self {
1218 _marker: PhantomData,
1219 }
1220 }
1221}
1222impl Deref for INTERRUPT_CORE0 {
1223 type Target = interrupt_core0::RegisterBlock;
1224 #[inline(always)]
1225 fn deref(&self) -> &Self::Target {
1226 unsafe { &*Self::PTR }
1227 }
1228}
1229impl core::fmt::Debug for INTERRUPT_CORE0 {
1230 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1231 f.debug_struct("INTERRUPT_CORE0").finish()
1232 }
1233}
1234#[doc = "Interrupt Controller (Core 0)"]
1235pub mod interrupt_core0;
1236#[doc = "Input/Output Multiplexer"]
1237pub struct IO_MUX {
1238 _marker: PhantomData<*const ()>,
1239}
1240unsafe impl Send for IO_MUX {}
1241impl IO_MUX {
1242 #[doc = r"Pointer to the register block"]
1243 pub const PTR: *const io_mux::RegisterBlock = 0x3f40_9000 as *const _;
1244 #[doc = r"Return the pointer to the register block"]
1245 #[inline(always)]
1246 pub const fn ptr() -> *const io_mux::RegisterBlock {
1247 Self::PTR
1248 }
1249 #[doc = r" Steal an instance of this peripheral"]
1250 #[doc = r""]
1251 #[doc = r" # Safety"]
1252 #[doc = r""]
1253 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1254 #[doc = r" that may race with any existing instances, for example by only"]
1255 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1256 #[doc = r" original peripheral and using critical sections to coordinate"]
1257 #[doc = r" access between multiple new instances."]
1258 #[doc = r""]
1259 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1260 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1261 #[doc = r" no stolen instances are passed to such software."]
1262 pub unsafe fn steal() -> Self {
1263 Self {
1264 _marker: PhantomData,
1265 }
1266 }
1267}
1268impl Deref for IO_MUX {
1269 type Target = io_mux::RegisterBlock;
1270 #[inline(always)]
1271 fn deref(&self) -> &Self::Target {
1272 unsafe { &*Self::PTR }
1273 }
1274}
1275impl core::fmt::Debug for IO_MUX {
1276 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1277 f.debug_struct("IO_MUX").finish()
1278 }
1279}
1280#[doc = "Input/Output Multiplexer"]
1281pub mod io_mux;
1282#[doc = "LED Control PWM (Pulse Width Modulation)"]
1283pub struct LEDC {
1284 _marker: PhantomData<*const ()>,
1285}
1286unsafe impl Send for LEDC {}
1287impl LEDC {
1288 #[doc = r"Pointer to the register block"]
1289 pub const PTR: *const ledc::RegisterBlock = 0x3f41_9000 as *const _;
1290 #[doc = r"Return the pointer to the register block"]
1291 #[inline(always)]
1292 pub const fn ptr() -> *const ledc::RegisterBlock {
1293 Self::PTR
1294 }
1295 #[doc = r" Steal an instance of this peripheral"]
1296 #[doc = r""]
1297 #[doc = r" # Safety"]
1298 #[doc = r""]
1299 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1300 #[doc = r" that may race with any existing instances, for example by only"]
1301 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1302 #[doc = r" original peripheral and using critical sections to coordinate"]
1303 #[doc = r" access between multiple new instances."]
1304 #[doc = r""]
1305 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1306 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1307 #[doc = r" no stolen instances are passed to such software."]
1308 pub unsafe fn steal() -> Self {
1309 Self {
1310 _marker: PhantomData,
1311 }
1312 }
1313}
1314impl Deref for LEDC {
1315 type Target = ledc::RegisterBlock;
1316 #[inline(always)]
1317 fn deref(&self) -> &Self::Target {
1318 unsafe { &*Self::PTR }
1319 }
1320}
1321impl core::fmt::Debug for LEDC {
1322 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1323 f.debug_struct("LEDC").finish()
1324 }
1325}
1326#[doc = "LED Control PWM (Pulse Width Modulation)"]
1327pub mod ledc;
1328#[doc = "Pulse Count Controller"]
1329pub struct PCNT {
1330 _marker: PhantomData<*const ()>,
1331}
1332unsafe impl Send for PCNT {}
1333impl PCNT {
1334 #[doc = r"Pointer to the register block"]
1335 pub const PTR: *const pcnt::RegisterBlock = 0x3f41_7000 as *const _;
1336 #[doc = r"Return the pointer to the register block"]
1337 #[inline(always)]
1338 pub const fn ptr() -> *const pcnt::RegisterBlock {
1339 Self::PTR
1340 }
1341 #[doc = r" Steal an instance of this peripheral"]
1342 #[doc = r""]
1343 #[doc = r" # Safety"]
1344 #[doc = r""]
1345 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1346 #[doc = r" that may race with any existing instances, for example by only"]
1347 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1348 #[doc = r" original peripheral and using critical sections to coordinate"]
1349 #[doc = r" access between multiple new instances."]
1350 #[doc = r""]
1351 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1352 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1353 #[doc = r" no stolen instances are passed to such software."]
1354 pub unsafe fn steal() -> Self {
1355 Self {
1356 _marker: PhantomData,
1357 }
1358 }
1359}
1360impl Deref for PCNT {
1361 type Target = pcnt::RegisterBlock;
1362 #[inline(always)]
1363 fn deref(&self) -> &Self::Target {
1364 unsafe { &*Self::PTR }
1365 }
1366}
1367impl core::fmt::Debug for PCNT {
1368 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1369 f.debug_struct("PCNT").finish()
1370 }
1371}
1372#[doc = "Pulse Count Controller"]
1373pub mod pcnt;
1374#[doc = "Permissions Controller"]
1375pub struct PMS {
1376 _marker: PhantomData<*const ()>,
1377}
1378unsafe impl Send for PMS {}
1379impl PMS {
1380 #[doc = r"Pointer to the register block"]
1381 pub const PTR: *const pms::RegisterBlock = 0x3f4c_1000 as *const _;
1382 #[doc = r"Return the pointer to the register block"]
1383 #[inline(always)]
1384 pub const fn ptr() -> *const pms::RegisterBlock {
1385 Self::PTR
1386 }
1387 #[doc = r" Steal an instance of this peripheral"]
1388 #[doc = r""]
1389 #[doc = r" # Safety"]
1390 #[doc = r""]
1391 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1392 #[doc = r" that may race with any existing instances, for example by only"]
1393 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1394 #[doc = r" original peripheral and using critical sections to coordinate"]
1395 #[doc = r" access between multiple new instances."]
1396 #[doc = r""]
1397 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1398 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1399 #[doc = r" no stolen instances are passed to such software."]
1400 pub unsafe fn steal() -> Self {
1401 Self {
1402 _marker: PhantomData,
1403 }
1404 }
1405}
1406impl Deref for PMS {
1407 type Target = pms::RegisterBlock;
1408 #[inline(always)]
1409 fn deref(&self) -> &Self::Target {
1410 unsafe { &*Self::PTR }
1411 }
1412}
1413impl core::fmt::Debug for PMS {
1414 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1415 f.debug_struct("PMS").finish()
1416 }
1417}
1418#[doc = "Permissions Controller"]
1419pub mod pms;
1420#[doc = "Remote Control"]
1421pub struct RMT {
1422 _marker: PhantomData<*const ()>,
1423}
1424unsafe impl Send for RMT {}
1425impl RMT {
1426 #[doc = r"Pointer to the register block"]
1427 pub const PTR: *const rmt::RegisterBlock = 0x3f41_6000 as *const _;
1428 #[doc = r"Return the pointer to the register block"]
1429 #[inline(always)]
1430 pub const fn ptr() -> *const rmt::RegisterBlock {
1431 Self::PTR
1432 }
1433 #[doc = r" Steal an instance of this peripheral"]
1434 #[doc = r""]
1435 #[doc = r" # Safety"]
1436 #[doc = r""]
1437 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1438 #[doc = r" that may race with any existing instances, for example by only"]
1439 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1440 #[doc = r" original peripheral and using critical sections to coordinate"]
1441 #[doc = r" access between multiple new instances."]
1442 #[doc = r""]
1443 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1444 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1445 #[doc = r" no stolen instances are passed to such software."]
1446 pub unsafe fn steal() -> Self {
1447 Self {
1448 _marker: PhantomData,
1449 }
1450 }
1451}
1452impl Deref for RMT {
1453 type Target = rmt::RegisterBlock;
1454 #[inline(always)]
1455 fn deref(&self) -> &Self::Target {
1456 unsafe { &*Self::PTR }
1457 }
1458}
1459impl core::fmt::Debug for RMT {
1460 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1461 f.debug_struct("RMT").finish()
1462 }
1463}
1464#[doc = "Remote Control"]
1465pub mod rmt;
1466#[doc = "Hardware Random Number Generator"]
1467pub struct RNG {
1468 _marker: PhantomData<*const ()>,
1469}
1470unsafe impl Send for RNG {}
1471impl RNG {
1472 #[doc = r"Pointer to the register block"]
1473 pub const PTR: *const rng::RegisterBlock = 0x6003_5000 as *const _;
1474 #[doc = r"Return the pointer to the register block"]
1475 #[inline(always)]
1476 pub const fn ptr() -> *const rng::RegisterBlock {
1477 Self::PTR
1478 }
1479 #[doc = r" Steal an instance of this peripheral"]
1480 #[doc = r""]
1481 #[doc = r" # Safety"]
1482 #[doc = r""]
1483 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1484 #[doc = r" that may race with any existing instances, for example by only"]
1485 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1486 #[doc = r" original peripheral and using critical sections to coordinate"]
1487 #[doc = r" access between multiple new instances."]
1488 #[doc = r""]
1489 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1490 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1491 #[doc = r" no stolen instances are passed to such software."]
1492 pub unsafe fn steal() -> Self {
1493 Self {
1494 _marker: PhantomData,
1495 }
1496 }
1497}
1498impl Deref for RNG {
1499 type Target = rng::RegisterBlock;
1500 #[inline(always)]
1501 fn deref(&self) -> &Self::Target {
1502 unsafe { &*Self::PTR }
1503 }
1504}
1505impl core::fmt::Debug for RNG {
1506 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1507 f.debug_struct("RNG").finish()
1508 }
1509}
1510#[doc = "Hardware Random Number Generator"]
1511pub mod rng;
1512#[doc = "RSA (Rivest Shamir Adleman) Accelerator"]
1513pub struct RSA {
1514 _marker: PhantomData<*const ()>,
1515}
1516unsafe impl Send for RSA {}
1517impl RSA {
1518 #[doc = r"Pointer to the register block"]
1519 pub const PTR: *const rsa::RegisterBlock = 0x6003_c000 as *const _;
1520 #[doc = r"Return the pointer to the register block"]
1521 #[inline(always)]
1522 pub const fn ptr() -> *const rsa::RegisterBlock {
1523 Self::PTR
1524 }
1525 #[doc = r" Steal an instance of this peripheral"]
1526 #[doc = r""]
1527 #[doc = r" # Safety"]
1528 #[doc = r""]
1529 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1530 #[doc = r" that may race with any existing instances, for example by only"]
1531 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1532 #[doc = r" original peripheral and using critical sections to coordinate"]
1533 #[doc = r" access between multiple new instances."]
1534 #[doc = r""]
1535 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1536 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1537 #[doc = r" no stolen instances are passed to such software."]
1538 pub unsafe fn steal() -> Self {
1539 Self {
1540 _marker: PhantomData,
1541 }
1542 }
1543}
1544impl Deref for RSA {
1545 type Target = rsa::RegisterBlock;
1546 #[inline(always)]
1547 fn deref(&self) -> &Self::Target {
1548 unsafe { &*Self::PTR }
1549 }
1550}
1551impl core::fmt::Debug for RSA {
1552 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1553 f.debug_struct("RSA").finish()
1554 }
1555}
1556#[doc = "RSA (Rivest Shamir Adleman) Accelerator"]
1557pub mod rsa;
1558#[doc = "Low-power Input/Output"]
1559pub struct RTC_IO {
1560 _marker: PhantomData<*const ()>,
1561}
1562unsafe impl Send for RTC_IO {}
1563impl RTC_IO {
1564 #[doc = r"Pointer to the register block"]
1565 pub const PTR: *const rtc_io::RegisterBlock = 0x3f40_8400 as *const _;
1566 #[doc = r"Return the pointer to the register block"]
1567 #[inline(always)]
1568 pub const fn ptr() -> *const rtc_io::RegisterBlock {
1569 Self::PTR
1570 }
1571 #[doc = r" Steal an instance of this peripheral"]
1572 #[doc = r""]
1573 #[doc = r" # Safety"]
1574 #[doc = r""]
1575 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1576 #[doc = r" that may race with any existing instances, for example by only"]
1577 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1578 #[doc = r" original peripheral and using critical sections to coordinate"]
1579 #[doc = r" access between multiple new instances."]
1580 #[doc = r""]
1581 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1582 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1583 #[doc = r" no stolen instances are passed to such software."]
1584 pub unsafe fn steal() -> Self {
1585 Self {
1586 _marker: PhantomData,
1587 }
1588 }
1589}
1590impl Deref for RTC_IO {
1591 type Target = rtc_io::RegisterBlock;
1592 #[inline(always)]
1593 fn deref(&self) -> &Self::Target {
1594 unsafe { &*Self::PTR }
1595 }
1596}
1597impl core::fmt::Debug for RTC_IO {
1598 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1599 f.debug_struct("RTC_IO").finish()
1600 }
1601}
1602#[doc = "Low-power Input/Output"]
1603pub mod rtc_io;
1604#[doc = "Real-Time Clock Control"]
1605pub struct RTC_CNTL {
1606 _marker: PhantomData<*const ()>,
1607}
1608unsafe impl Send for RTC_CNTL {}
1609impl RTC_CNTL {
1610 #[doc = r"Pointer to the register block"]
1611 pub const PTR: *const rtc_cntl::RegisterBlock = 0x3f40_8000 as *const _;
1612 #[doc = r"Return the pointer to the register block"]
1613 #[inline(always)]
1614 pub const fn ptr() -> *const rtc_cntl::RegisterBlock {
1615 Self::PTR
1616 }
1617 #[doc = r" Steal an instance of this peripheral"]
1618 #[doc = r""]
1619 #[doc = r" # Safety"]
1620 #[doc = r""]
1621 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1622 #[doc = r" that may race with any existing instances, for example by only"]
1623 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1624 #[doc = r" original peripheral and using critical sections to coordinate"]
1625 #[doc = r" access between multiple new instances."]
1626 #[doc = r""]
1627 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1628 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1629 #[doc = r" no stolen instances are passed to such software."]
1630 pub unsafe fn steal() -> Self {
1631 Self {
1632 _marker: PhantomData,
1633 }
1634 }
1635}
1636impl Deref for RTC_CNTL {
1637 type Target = rtc_cntl::RegisterBlock;
1638 #[inline(always)]
1639 fn deref(&self) -> &Self::Target {
1640 unsafe { &*Self::PTR }
1641 }
1642}
1643impl core::fmt::Debug for RTC_CNTL {
1644 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1645 f.debug_struct("RTC_CNTL").finish()
1646 }
1647}
1648#[doc = "Real-Time Clock Control"]
1649pub mod rtc_cntl;
1650#[doc = "Low-power I2C (Inter-Integrated Circuit) Controller"]
1651pub struct RTC_I2C {
1652 _marker: PhantomData<*const ()>,
1653}
1654unsafe impl Send for RTC_I2C {}
1655impl RTC_I2C {
1656 #[doc = r"Pointer to the register block"]
1657 pub const PTR: *const rtc_i2c::RegisterBlock = 0x3f40_8c00 as *const _;
1658 #[doc = r"Return the pointer to the register block"]
1659 #[inline(always)]
1660 pub const fn ptr() -> *const rtc_i2c::RegisterBlock {
1661 Self::PTR
1662 }
1663 #[doc = r" Steal an instance of this peripheral"]
1664 #[doc = r""]
1665 #[doc = r" # Safety"]
1666 #[doc = r""]
1667 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1668 #[doc = r" that may race with any existing instances, for example by only"]
1669 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1670 #[doc = r" original peripheral and using critical sections to coordinate"]
1671 #[doc = r" access between multiple new instances."]
1672 #[doc = r""]
1673 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1674 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1675 #[doc = r" no stolen instances are passed to such software."]
1676 pub unsafe fn steal() -> Self {
1677 Self {
1678 _marker: PhantomData,
1679 }
1680 }
1681}
1682impl Deref for RTC_I2C {
1683 type Target = rtc_i2c::RegisterBlock;
1684 #[inline(always)]
1685 fn deref(&self) -> &Self::Target {
1686 unsafe { &*Self::PTR }
1687 }
1688}
1689impl core::fmt::Debug for RTC_I2C {
1690 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1691 f.debug_struct("RTC_I2C").finish()
1692 }
1693}
1694#[doc = "Low-power I2C (Inter-Integrated Circuit) Controller"]
1695pub mod rtc_i2c;
1696#[doc = "SENS Peripheral"]
1697pub struct SENS {
1698 _marker: PhantomData<*const ()>,
1699}
1700unsafe impl Send for SENS {}
1701impl SENS {
1702 #[doc = r"Pointer to the register block"]
1703 pub const PTR: *const sens::RegisterBlock = 0x3f40_8800 as *const _;
1704 #[doc = r"Return the pointer to the register block"]
1705 #[inline(always)]
1706 pub const fn ptr() -> *const sens::RegisterBlock {
1707 Self::PTR
1708 }
1709 #[doc = r" Steal an instance of this peripheral"]
1710 #[doc = r""]
1711 #[doc = r" # Safety"]
1712 #[doc = r""]
1713 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1714 #[doc = r" that may race with any existing instances, for example by only"]
1715 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1716 #[doc = r" original peripheral and using critical sections to coordinate"]
1717 #[doc = r" access between multiple new instances."]
1718 #[doc = r""]
1719 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1720 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1721 #[doc = r" no stolen instances are passed to such software."]
1722 pub unsafe fn steal() -> Self {
1723 Self {
1724 _marker: PhantomData,
1725 }
1726 }
1727}
1728impl Deref for SENS {
1729 type Target = sens::RegisterBlock;
1730 #[inline(always)]
1731 fn deref(&self) -> &Self::Target {
1732 unsafe { &*Self::PTR }
1733 }
1734}
1735impl core::fmt::Debug for SENS {
1736 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1737 f.debug_struct("SENS").finish()
1738 }
1739}
1740#[doc = "SENS Peripheral"]
1741pub mod sens;
1742#[doc = "SHA (Secure Hash Algorithm) Accelerator"]
1743pub struct SHA {
1744 _marker: PhantomData<*const ()>,
1745}
1746unsafe impl Send for SHA {}
1747impl SHA {
1748 #[doc = r"Pointer to the register block"]
1749 pub const PTR: *const sha::RegisterBlock = 0x6003_b000 as *const _;
1750 #[doc = r"Return the pointer to the register block"]
1751 #[inline(always)]
1752 pub const fn ptr() -> *const sha::RegisterBlock {
1753 Self::PTR
1754 }
1755 #[doc = r" Steal an instance of this peripheral"]
1756 #[doc = r""]
1757 #[doc = r" # Safety"]
1758 #[doc = r""]
1759 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1760 #[doc = r" that may race with any existing instances, for example by only"]
1761 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1762 #[doc = r" original peripheral and using critical sections to coordinate"]
1763 #[doc = r" access between multiple new instances."]
1764 #[doc = r""]
1765 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1766 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1767 #[doc = r" no stolen instances are passed to such software."]
1768 pub unsafe fn steal() -> Self {
1769 Self {
1770 _marker: PhantomData,
1771 }
1772 }
1773}
1774impl Deref for SHA {
1775 type Target = sha::RegisterBlock;
1776 #[inline(always)]
1777 fn deref(&self) -> &Self::Target {
1778 unsafe { &*Self::PTR }
1779 }
1780}
1781impl core::fmt::Debug for SHA {
1782 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1783 f.debug_struct("SHA").finish()
1784 }
1785}
1786#[doc = "SHA (Secure Hash Algorithm) Accelerator"]
1787pub mod sha;
1788#[doc = "SPI (Serial Peripheral Interface) Controller 0"]
1789pub struct SPI0 {
1790 _marker: PhantomData<*const ()>,
1791}
1792unsafe impl Send for SPI0 {}
1793impl SPI0 {
1794 #[doc = r"Pointer to the register block"]
1795 pub const PTR: *const spi0::RegisterBlock = 0x3f40_3000 as *const _;
1796 #[doc = r"Return the pointer to the register block"]
1797 #[inline(always)]
1798 pub const fn ptr() -> *const spi0::RegisterBlock {
1799 Self::PTR
1800 }
1801 #[doc = r" Steal an instance of this peripheral"]
1802 #[doc = r""]
1803 #[doc = r" # Safety"]
1804 #[doc = r""]
1805 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1806 #[doc = r" that may race with any existing instances, for example by only"]
1807 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1808 #[doc = r" original peripheral and using critical sections to coordinate"]
1809 #[doc = r" access between multiple new instances."]
1810 #[doc = r""]
1811 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1812 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1813 #[doc = r" no stolen instances are passed to such software."]
1814 pub unsafe fn steal() -> Self {
1815 Self {
1816 _marker: PhantomData,
1817 }
1818 }
1819}
1820impl Deref for SPI0 {
1821 type Target = spi0::RegisterBlock;
1822 #[inline(always)]
1823 fn deref(&self) -> &Self::Target {
1824 unsafe { &*Self::PTR }
1825 }
1826}
1827impl core::fmt::Debug for SPI0 {
1828 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1829 f.debug_struct("SPI0").finish()
1830 }
1831}
1832#[doc = "SPI (Serial Peripheral Interface) Controller 0"]
1833pub mod spi0;
1834#[doc = "SPI (Serial Peripheral Interface) Controller 1"]
1835pub struct SPI1 {
1836 _marker: PhantomData<*const ()>,
1837}
1838unsafe impl Send for SPI1 {}
1839impl SPI1 {
1840 #[doc = r"Pointer to the register block"]
1841 pub const PTR: *const spi0::RegisterBlock = 0x3f40_2000 as *const _;
1842 #[doc = r"Return the pointer to the register block"]
1843 #[inline(always)]
1844 pub const fn ptr() -> *const spi0::RegisterBlock {
1845 Self::PTR
1846 }
1847 #[doc = r" Steal an instance of this peripheral"]
1848 #[doc = r""]
1849 #[doc = r" # Safety"]
1850 #[doc = r""]
1851 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1852 #[doc = r" that may race with any existing instances, for example by only"]
1853 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1854 #[doc = r" original peripheral and using critical sections to coordinate"]
1855 #[doc = r" access between multiple new instances."]
1856 #[doc = r""]
1857 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1858 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1859 #[doc = r" no stolen instances are passed to such software."]
1860 pub unsafe fn steal() -> Self {
1861 Self {
1862 _marker: PhantomData,
1863 }
1864 }
1865}
1866impl Deref for SPI1 {
1867 type Target = spi0::RegisterBlock;
1868 #[inline(always)]
1869 fn deref(&self) -> &Self::Target {
1870 unsafe { &*Self::PTR }
1871 }
1872}
1873impl core::fmt::Debug for SPI1 {
1874 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1875 f.debug_struct("SPI1").finish()
1876 }
1877}
1878#[doc = "SPI (Serial Peripheral Interface) Controller 1"]
1879pub use self::spi0 as spi1;
1880#[doc = "SPI (Serial Peripheral Interface) Controller 2"]
1881pub struct SPI2 {
1882 _marker: PhantomData<*const ()>,
1883}
1884unsafe impl Send for SPI2 {}
1885impl SPI2 {
1886 #[doc = r"Pointer to the register block"]
1887 pub const PTR: *const spi0::RegisterBlock = 0x3f42_4000 as *const _;
1888 #[doc = r"Return the pointer to the register block"]
1889 #[inline(always)]
1890 pub const fn ptr() -> *const spi0::RegisterBlock {
1891 Self::PTR
1892 }
1893 #[doc = r" Steal an instance of this peripheral"]
1894 #[doc = r""]
1895 #[doc = r" # Safety"]
1896 #[doc = r""]
1897 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1898 #[doc = r" that may race with any existing instances, for example by only"]
1899 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1900 #[doc = r" original peripheral and using critical sections to coordinate"]
1901 #[doc = r" access between multiple new instances."]
1902 #[doc = r""]
1903 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1904 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1905 #[doc = r" no stolen instances are passed to such software."]
1906 pub unsafe fn steal() -> Self {
1907 Self {
1908 _marker: PhantomData,
1909 }
1910 }
1911}
1912impl Deref for SPI2 {
1913 type Target = spi0::RegisterBlock;
1914 #[inline(always)]
1915 fn deref(&self) -> &Self::Target {
1916 unsafe { &*Self::PTR }
1917 }
1918}
1919impl core::fmt::Debug for SPI2 {
1920 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1921 f.debug_struct("SPI2").finish()
1922 }
1923}
1924#[doc = "SPI (Serial Peripheral Interface) Controller 2"]
1925pub use self::spi0 as spi2;
1926#[doc = "SPI (Serial Peripheral Interface) Controller 3"]
1927pub struct SPI3 {
1928 _marker: PhantomData<*const ()>,
1929}
1930unsafe impl Send for SPI3 {}
1931impl SPI3 {
1932 #[doc = r"Pointer to the register block"]
1933 pub const PTR: *const spi0::RegisterBlock = 0x3f42_5000 as *const _;
1934 #[doc = r"Return the pointer to the register block"]
1935 #[inline(always)]
1936 pub const fn ptr() -> *const spi0::RegisterBlock {
1937 Self::PTR
1938 }
1939 #[doc = r" Steal an instance of this peripheral"]
1940 #[doc = r""]
1941 #[doc = r" # Safety"]
1942 #[doc = r""]
1943 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1944 #[doc = r" that may race with any existing instances, for example by only"]
1945 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1946 #[doc = r" original peripheral and using critical sections to coordinate"]
1947 #[doc = r" access between multiple new instances."]
1948 #[doc = r""]
1949 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1950 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1951 #[doc = r" no stolen instances are passed to such software."]
1952 pub unsafe fn steal() -> Self {
1953 Self {
1954 _marker: PhantomData,
1955 }
1956 }
1957}
1958impl Deref for SPI3 {
1959 type Target = spi0::RegisterBlock;
1960 #[inline(always)]
1961 fn deref(&self) -> &Self::Target {
1962 unsafe { &*Self::PTR }
1963 }
1964}
1965impl core::fmt::Debug for SPI3 {
1966 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1967 f.debug_struct("SPI3").finish()
1968 }
1969}
1970#[doc = "SPI (Serial Peripheral Interface) Controller 3"]
1971pub use self::spi0 as spi3;
1972#[doc = "SPI (Serial Peripheral Interface) Controller 4"]
1973pub struct SPI4 {
1974 _marker: PhantomData<*const ()>,
1975}
1976unsafe impl Send for SPI4 {}
1977impl SPI4 {
1978 #[doc = r"Pointer to the register block"]
1979 pub const PTR: *const spi0::RegisterBlock = 0x3f43_7000 as *const _;
1980 #[doc = r"Return the pointer to the register block"]
1981 #[inline(always)]
1982 pub const fn ptr() -> *const spi0::RegisterBlock {
1983 Self::PTR
1984 }
1985 #[doc = r" Steal an instance of this peripheral"]
1986 #[doc = r""]
1987 #[doc = r" # Safety"]
1988 #[doc = r""]
1989 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1990 #[doc = r" that may race with any existing instances, for example by only"]
1991 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1992 #[doc = r" original peripheral and using critical sections to coordinate"]
1993 #[doc = r" access between multiple new instances."]
1994 #[doc = r""]
1995 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1996 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1997 #[doc = r" no stolen instances are passed to such software."]
1998 pub unsafe fn steal() -> Self {
1999 Self {
2000 _marker: PhantomData,
2001 }
2002 }
2003}
2004impl Deref for SPI4 {
2005 type Target = spi0::RegisterBlock;
2006 #[inline(always)]
2007 fn deref(&self) -> &Self::Target {
2008 unsafe { &*Self::PTR }
2009 }
2010}
2011impl core::fmt::Debug for SPI4 {
2012 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2013 f.debug_struct("SPI4").finish()
2014 }
2015}
2016#[doc = "SPI (Serial Peripheral Interface) Controller 4"]
2017pub use self::spi0 as spi4;
2018#[doc = "SYSCON Peripheral"]
2019pub struct SYSCON {
2020 _marker: PhantomData<*const ()>,
2021}
2022unsafe impl Send for SYSCON {}
2023impl SYSCON {
2024 #[doc = r"Pointer to the register block"]
2025 pub const PTR: *const syscon::RegisterBlock = 0x3f42_6000 as *const _;
2026 #[doc = r"Return the pointer to the register block"]
2027 #[inline(always)]
2028 pub const fn ptr() -> *const syscon::RegisterBlock {
2029 Self::PTR
2030 }
2031 #[doc = r" Steal an instance of this peripheral"]
2032 #[doc = r""]
2033 #[doc = r" # Safety"]
2034 #[doc = r""]
2035 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2036 #[doc = r" that may race with any existing instances, for example by only"]
2037 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2038 #[doc = r" original peripheral and using critical sections to coordinate"]
2039 #[doc = r" access between multiple new instances."]
2040 #[doc = r""]
2041 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2042 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2043 #[doc = r" no stolen instances are passed to such software."]
2044 pub unsafe fn steal() -> Self {
2045 Self {
2046 _marker: PhantomData,
2047 }
2048 }
2049}
2050impl Deref for SYSCON {
2051 type Target = syscon::RegisterBlock;
2052 #[inline(always)]
2053 fn deref(&self) -> &Self::Target {
2054 unsafe { &*Self::PTR }
2055 }
2056}
2057impl core::fmt::Debug for SYSCON {
2058 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2059 f.debug_struct("SYSCON").finish()
2060 }
2061}
2062#[doc = "SYSCON Peripheral"]
2063pub mod syscon;
2064#[doc = "System Configuration Registers"]
2065pub struct SYSTEM {
2066 _marker: PhantomData<*const ()>,
2067}
2068unsafe impl Send for SYSTEM {}
2069impl SYSTEM {
2070 #[doc = r"Pointer to the register block"]
2071 pub const PTR: *const system::RegisterBlock = 0x3f4c_0000 as *const _;
2072 #[doc = r"Return the pointer to the register block"]
2073 #[inline(always)]
2074 pub const fn ptr() -> *const system::RegisterBlock {
2075 Self::PTR
2076 }
2077 #[doc = r" Steal an instance of this peripheral"]
2078 #[doc = r""]
2079 #[doc = r" # Safety"]
2080 #[doc = r""]
2081 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2082 #[doc = r" that may race with any existing instances, for example by only"]
2083 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2084 #[doc = r" original peripheral and using critical sections to coordinate"]
2085 #[doc = r" access between multiple new instances."]
2086 #[doc = r""]
2087 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2088 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2089 #[doc = r" no stolen instances are passed to such software."]
2090 pub unsafe fn steal() -> Self {
2091 Self {
2092 _marker: PhantomData,
2093 }
2094 }
2095}
2096impl Deref for SYSTEM {
2097 type Target = system::RegisterBlock;
2098 #[inline(always)]
2099 fn deref(&self) -> &Self::Target {
2100 unsafe { &*Self::PTR }
2101 }
2102}
2103impl core::fmt::Debug for SYSTEM {
2104 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2105 f.debug_struct("SYSTEM").finish()
2106 }
2107}
2108#[doc = "System Configuration Registers"]
2109pub mod system;
2110#[doc = "System Timer"]
2111pub struct SYSTIMER {
2112 _marker: PhantomData<*const ()>,
2113}
2114unsafe impl Send for SYSTIMER {}
2115impl SYSTIMER {
2116 #[doc = r"Pointer to the register block"]
2117 pub const PTR: *const systimer::RegisterBlock = 0x3f42_3000 as *const _;
2118 #[doc = r"Return the pointer to the register block"]
2119 #[inline(always)]
2120 pub const fn ptr() -> *const systimer::RegisterBlock {
2121 Self::PTR
2122 }
2123 #[doc = r" Steal an instance of this peripheral"]
2124 #[doc = r""]
2125 #[doc = r" # Safety"]
2126 #[doc = r""]
2127 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2128 #[doc = r" that may race with any existing instances, for example by only"]
2129 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2130 #[doc = r" original peripheral and using critical sections to coordinate"]
2131 #[doc = r" access between multiple new instances."]
2132 #[doc = r""]
2133 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2134 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2135 #[doc = r" no stolen instances are passed to such software."]
2136 pub unsafe fn steal() -> Self {
2137 Self {
2138 _marker: PhantomData,
2139 }
2140 }
2141}
2142impl Deref for SYSTIMER {
2143 type Target = systimer::RegisterBlock;
2144 #[inline(always)]
2145 fn deref(&self) -> &Self::Target {
2146 unsafe { &*Self::PTR }
2147 }
2148}
2149impl core::fmt::Debug for SYSTIMER {
2150 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2151 f.debug_struct("SYSTIMER").finish()
2152 }
2153}
2154#[doc = "System Timer"]
2155pub mod systimer;
2156#[doc = "Timer Group 0"]
2157pub struct TIMG0 {
2158 _marker: PhantomData<*const ()>,
2159}
2160unsafe impl Send for TIMG0 {}
2161impl TIMG0 {
2162 #[doc = r"Pointer to the register block"]
2163 pub const PTR: *const timg0::RegisterBlock = 0x3f41_f000 as *const _;
2164 #[doc = r"Return the pointer to the register block"]
2165 #[inline(always)]
2166 pub const fn ptr() -> *const timg0::RegisterBlock {
2167 Self::PTR
2168 }
2169 #[doc = r" Steal an instance of this peripheral"]
2170 #[doc = r""]
2171 #[doc = r" # Safety"]
2172 #[doc = r""]
2173 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2174 #[doc = r" that may race with any existing instances, for example by only"]
2175 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2176 #[doc = r" original peripheral and using critical sections to coordinate"]
2177 #[doc = r" access between multiple new instances."]
2178 #[doc = r""]
2179 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2180 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2181 #[doc = r" no stolen instances are passed to such software."]
2182 pub unsafe fn steal() -> Self {
2183 Self {
2184 _marker: PhantomData,
2185 }
2186 }
2187}
2188impl Deref for TIMG0 {
2189 type Target = timg0::RegisterBlock;
2190 #[inline(always)]
2191 fn deref(&self) -> &Self::Target {
2192 unsafe { &*Self::PTR }
2193 }
2194}
2195impl core::fmt::Debug for TIMG0 {
2196 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2197 f.debug_struct("TIMG0").finish()
2198 }
2199}
2200#[doc = "Timer Group 0"]
2201pub mod timg0;
2202#[doc = "Timer Group 1"]
2203pub struct TIMG1 {
2204 _marker: PhantomData<*const ()>,
2205}
2206unsafe impl Send for TIMG1 {}
2207impl TIMG1 {
2208 #[doc = r"Pointer to the register block"]
2209 pub const PTR: *const timg0::RegisterBlock = 0x3f42_0000 as *const _;
2210 #[doc = r"Return the pointer to the register block"]
2211 #[inline(always)]
2212 pub const fn ptr() -> *const timg0::RegisterBlock {
2213 Self::PTR
2214 }
2215 #[doc = r" Steal an instance of this peripheral"]
2216 #[doc = r""]
2217 #[doc = r" # Safety"]
2218 #[doc = r""]
2219 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2220 #[doc = r" that may race with any existing instances, for example by only"]
2221 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2222 #[doc = r" original peripheral and using critical sections to coordinate"]
2223 #[doc = r" access between multiple new instances."]
2224 #[doc = r""]
2225 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2226 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2227 #[doc = r" no stolen instances are passed to such software."]
2228 pub unsafe fn steal() -> Self {
2229 Self {
2230 _marker: PhantomData,
2231 }
2232 }
2233}
2234impl Deref for TIMG1 {
2235 type Target = timg0::RegisterBlock;
2236 #[inline(always)]
2237 fn deref(&self) -> &Self::Target {
2238 unsafe { &*Self::PTR }
2239 }
2240}
2241impl core::fmt::Debug for TIMG1 {
2242 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2243 f.debug_struct("TIMG1").finish()
2244 }
2245}
2246#[doc = "Timer Group 1"]
2247pub use self::timg0 as timg1;
2248#[doc = "Two-Wire Automotive Interface"]
2249pub struct TWAI0 {
2250 _marker: PhantomData<*const ()>,
2251}
2252unsafe impl Send for TWAI0 {}
2253impl TWAI0 {
2254 #[doc = r"Pointer to the register block"]
2255 pub const PTR: *const twai0::RegisterBlock = 0x3f42_b000 as *const _;
2256 #[doc = r"Return the pointer to the register block"]
2257 #[inline(always)]
2258 pub const fn ptr() -> *const twai0::RegisterBlock {
2259 Self::PTR
2260 }
2261 #[doc = r" Steal an instance of this peripheral"]
2262 #[doc = r""]
2263 #[doc = r" # Safety"]
2264 #[doc = r""]
2265 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2266 #[doc = r" that may race with any existing instances, for example by only"]
2267 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2268 #[doc = r" original peripheral and using critical sections to coordinate"]
2269 #[doc = r" access between multiple new instances."]
2270 #[doc = r""]
2271 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2272 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2273 #[doc = r" no stolen instances are passed to such software."]
2274 pub unsafe fn steal() -> Self {
2275 Self {
2276 _marker: PhantomData,
2277 }
2278 }
2279}
2280impl Deref for TWAI0 {
2281 type Target = twai0::RegisterBlock;
2282 #[inline(always)]
2283 fn deref(&self) -> &Self::Target {
2284 unsafe { &*Self::PTR }
2285 }
2286}
2287impl core::fmt::Debug for TWAI0 {
2288 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2289 f.debug_struct("TWAI0").finish()
2290 }
2291}
2292#[doc = "Two-Wire Automotive Interface"]
2293pub mod twai0;
2294#[doc = "UART (Universal Asynchronous Receiver-Transmitter) Controller 0"]
2295pub struct UART0 {
2296 _marker: PhantomData<*const ()>,
2297}
2298unsafe impl Send for UART0 {}
2299impl UART0 {
2300 #[doc = r"Pointer to the register block"]
2301 pub const PTR: *const uart0::RegisterBlock = 0x3f40_0000 as *const _;
2302 #[doc = r"Return the pointer to the register block"]
2303 #[inline(always)]
2304 pub const fn ptr() -> *const uart0::RegisterBlock {
2305 Self::PTR
2306 }
2307 #[doc = r" Steal an instance of this peripheral"]
2308 #[doc = r""]
2309 #[doc = r" # Safety"]
2310 #[doc = r""]
2311 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2312 #[doc = r" that may race with any existing instances, for example by only"]
2313 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2314 #[doc = r" original peripheral and using critical sections to coordinate"]
2315 #[doc = r" access between multiple new instances."]
2316 #[doc = r""]
2317 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2318 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2319 #[doc = r" no stolen instances are passed to such software."]
2320 pub unsafe fn steal() -> Self {
2321 Self {
2322 _marker: PhantomData,
2323 }
2324 }
2325}
2326impl Deref for UART0 {
2327 type Target = uart0::RegisterBlock;
2328 #[inline(always)]
2329 fn deref(&self) -> &Self::Target {
2330 unsafe { &*Self::PTR }
2331 }
2332}
2333impl core::fmt::Debug for UART0 {
2334 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2335 f.debug_struct("UART0").finish()
2336 }
2337}
2338#[doc = "UART (Universal Asynchronous Receiver-Transmitter) Controller 0"]
2339pub mod uart0;
2340#[doc = "UART (Universal Asynchronous Receiver-Transmitter) Controller 1"]
2341pub struct UART1 {
2342 _marker: PhantomData<*const ()>,
2343}
2344unsafe impl Send for UART1 {}
2345impl UART1 {
2346 #[doc = r"Pointer to the register block"]
2347 pub const PTR: *const uart0::RegisterBlock = 0x3f41_0000 as *const _;
2348 #[doc = r"Return the pointer to the register block"]
2349 #[inline(always)]
2350 pub const fn ptr() -> *const uart0::RegisterBlock {
2351 Self::PTR
2352 }
2353 #[doc = r" Steal an instance of this peripheral"]
2354 #[doc = r""]
2355 #[doc = r" # Safety"]
2356 #[doc = r""]
2357 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2358 #[doc = r" that may race with any existing instances, for example by only"]
2359 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2360 #[doc = r" original peripheral and using critical sections to coordinate"]
2361 #[doc = r" access between multiple new instances."]
2362 #[doc = r""]
2363 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2364 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2365 #[doc = r" no stolen instances are passed to such software."]
2366 pub unsafe fn steal() -> Self {
2367 Self {
2368 _marker: PhantomData,
2369 }
2370 }
2371}
2372impl Deref for UART1 {
2373 type Target = uart0::RegisterBlock;
2374 #[inline(always)]
2375 fn deref(&self) -> &Self::Target {
2376 unsafe { &*Self::PTR }
2377 }
2378}
2379impl core::fmt::Debug for UART1 {
2380 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2381 f.debug_struct("UART1").finish()
2382 }
2383}
2384#[doc = "UART (Universal Asynchronous Receiver-Transmitter) Controller 1"]
2385pub use self::uart0 as uart1;
2386#[doc = "Universal Host Controller Interface 0"]
2387pub struct UHCI0 {
2388 _marker: PhantomData<*const ()>,
2389}
2390unsafe impl Send for UHCI0 {}
2391impl UHCI0 {
2392 #[doc = r"Pointer to the register block"]
2393 pub const PTR: *const uhci0::RegisterBlock = 0x3f41_4000 as *const _;
2394 #[doc = r"Return the pointer to the register block"]
2395 #[inline(always)]
2396 pub const fn ptr() -> *const uhci0::RegisterBlock {
2397 Self::PTR
2398 }
2399 #[doc = r" Steal an instance of this peripheral"]
2400 #[doc = r""]
2401 #[doc = r" # Safety"]
2402 #[doc = r""]
2403 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2404 #[doc = r" that may race with any existing instances, for example by only"]
2405 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2406 #[doc = r" original peripheral and using critical sections to coordinate"]
2407 #[doc = r" access between multiple new instances."]
2408 #[doc = r""]
2409 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2410 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2411 #[doc = r" no stolen instances are passed to such software."]
2412 pub unsafe fn steal() -> Self {
2413 Self {
2414 _marker: PhantomData,
2415 }
2416 }
2417}
2418impl Deref for UHCI0 {
2419 type Target = uhci0::RegisterBlock;
2420 #[inline(always)]
2421 fn deref(&self) -> &Self::Target {
2422 unsafe { &*Self::PTR }
2423 }
2424}
2425impl core::fmt::Debug for UHCI0 {
2426 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2427 f.debug_struct("UHCI0").finish()
2428 }
2429}
2430#[doc = "Universal Host Controller Interface 0"]
2431pub mod uhci0;
2432#[doc = "USB OTG (On-The-Go)"]
2433pub struct USB0 {
2434 _marker: PhantomData<*const ()>,
2435}
2436unsafe impl Send for USB0 {}
2437impl USB0 {
2438 #[doc = r"Pointer to the register block"]
2439 pub const PTR: *const usb0::RegisterBlock = 0x6008_0000 as *const _;
2440 #[doc = r"Return the pointer to the register block"]
2441 #[inline(always)]
2442 pub const fn ptr() -> *const usb0::RegisterBlock {
2443 Self::PTR
2444 }
2445 #[doc = r" Steal an instance of this peripheral"]
2446 #[doc = r""]
2447 #[doc = r" # Safety"]
2448 #[doc = r""]
2449 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2450 #[doc = r" that may race with any existing instances, for example by only"]
2451 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2452 #[doc = r" original peripheral and using critical sections to coordinate"]
2453 #[doc = r" access between multiple new instances."]
2454 #[doc = r""]
2455 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2456 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2457 #[doc = r" no stolen instances are passed to such software."]
2458 pub unsafe fn steal() -> Self {
2459 Self {
2460 _marker: PhantomData,
2461 }
2462 }
2463}
2464impl Deref for USB0 {
2465 type Target = usb0::RegisterBlock;
2466 #[inline(always)]
2467 fn deref(&self) -> &Self::Target {
2468 unsafe { &*Self::PTR }
2469 }
2470}
2471impl core::fmt::Debug for USB0 {
2472 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2473 f.debug_struct("USB0").finish()
2474 }
2475}
2476#[doc = "USB OTG (On-The-Go)"]
2477pub mod usb0;
2478#[doc = "USB_WRAP Peripheral"]
2479pub struct USB_WRAP {
2480 _marker: PhantomData<*const ()>,
2481}
2482unsafe impl Send for USB_WRAP {}
2483impl USB_WRAP {
2484 #[doc = r"Pointer to the register block"]
2485 pub const PTR: *const usb_wrap::RegisterBlock = 0x3f43_9000 as *const _;
2486 #[doc = r"Return the pointer to the register block"]
2487 #[inline(always)]
2488 pub const fn ptr() -> *const usb_wrap::RegisterBlock {
2489 Self::PTR
2490 }
2491 #[doc = r" Steal an instance of this peripheral"]
2492 #[doc = r""]
2493 #[doc = r" # Safety"]
2494 #[doc = r""]
2495 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2496 #[doc = r" that may race with any existing instances, for example by only"]
2497 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2498 #[doc = r" original peripheral and using critical sections to coordinate"]
2499 #[doc = r" access between multiple new instances."]
2500 #[doc = r""]
2501 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2502 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2503 #[doc = r" no stolen instances are passed to such software."]
2504 pub unsafe fn steal() -> Self {
2505 Self {
2506 _marker: PhantomData,
2507 }
2508 }
2509}
2510impl Deref for USB_WRAP {
2511 type Target = usb_wrap::RegisterBlock;
2512 #[inline(always)]
2513 fn deref(&self) -> &Self::Target {
2514 unsafe { &*Self::PTR }
2515 }
2516}
2517impl core::fmt::Debug for USB_WRAP {
2518 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2519 f.debug_struct("USB_WRAP").finish()
2520 }
2521}
2522#[doc = "USB_WRAP Peripheral"]
2523pub mod usb_wrap;
2524#[doc = "XTS-AES-128 Flash Encryption"]
2525pub struct XTS_AES {
2526 _marker: PhantomData<*const ()>,
2527}
2528unsafe impl Send for XTS_AES {}
2529impl XTS_AES {
2530 #[doc = r"Pointer to the register block"]
2531 pub const PTR: *const xts_aes::RegisterBlock = 0x6003_a100 as *const _;
2532 #[doc = r"Return the pointer to the register block"]
2533 #[inline(always)]
2534 pub const fn ptr() -> *const xts_aes::RegisterBlock {
2535 Self::PTR
2536 }
2537 #[doc = r" Steal an instance of this peripheral"]
2538 #[doc = r""]
2539 #[doc = r" # Safety"]
2540 #[doc = r""]
2541 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2542 #[doc = r" that may race with any existing instances, for example by only"]
2543 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2544 #[doc = r" original peripheral and using critical sections to coordinate"]
2545 #[doc = r" access between multiple new instances."]
2546 #[doc = r""]
2547 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2548 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2549 #[doc = r" no stolen instances are passed to such software."]
2550 pub unsafe fn steal() -> Self {
2551 Self {
2552 _marker: PhantomData,
2553 }
2554 }
2555}
2556impl Deref for XTS_AES {
2557 type Target = xts_aes::RegisterBlock;
2558 #[inline(always)]
2559 fn deref(&self) -> &Self::Target {
2560 unsafe { &*Self::PTR }
2561 }
2562}
2563impl core::fmt::Debug for XTS_AES {
2564 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2565 f.debug_struct("XTS_AES").finish()
2566 }
2567}
2568#[doc = "XTS-AES-128 Flash Encryption"]
2569pub mod xts_aes;
2570#[doc = "NRX Peripheral"]
2571pub struct NRX {
2572 _marker: PhantomData<*const ()>,
2573}
2574unsafe impl Send for NRX {}
2575impl NRX {
2576 #[doc = r"Pointer to the register block"]
2577 pub const PTR: *const nrx::RegisterBlock = 0x3f41_cc00 as *const _;
2578 #[doc = r"Return the pointer to the register block"]
2579 #[inline(always)]
2580 pub const fn ptr() -> *const nrx::RegisterBlock {
2581 Self::PTR
2582 }
2583 #[doc = r" Steal an instance of this peripheral"]
2584 #[doc = r""]
2585 #[doc = r" # Safety"]
2586 #[doc = r""]
2587 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2588 #[doc = r" that may race with any existing instances, for example by only"]
2589 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2590 #[doc = r" original peripheral and using critical sections to coordinate"]
2591 #[doc = r" access between multiple new instances."]
2592 #[doc = r""]
2593 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2594 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2595 #[doc = r" no stolen instances are passed to such software."]
2596 pub unsafe fn steal() -> Self {
2597 Self {
2598 _marker: PhantomData,
2599 }
2600 }
2601}
2602impl Deref for NRX {
2603 type Target = nrx::RegisterBlock;
2604 #[inline(always)]
2605 fn deref(&self) -> &Self::Target {
2606 unsafe { &*Self::PTR }
2607 }
2608}
2609impl core::fmt::Debug for NRX {
2610 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2611 f.debug_struct("NRX").finish()
2612 }
2613}
2614#[doc = "NRX Peripheral"]
2615pub mod nrx;
2616#[doc = "FE Peripheral"]
2617pub struct FE {
2618 _marker: PhantomData<*const ()>,
2619}
2620unsafe impl Send for FE {}
2621impl FE {
2622 #[doc = r"Pointer to the register block"]
2623 pub const PTR: *const fe::RegisterBlock = 0x3f40_6000 as *const _;
2624 #[doc = r"Return the pointer to the register block"]
2625 #[inline(always)]
2626 pub const fn ptr() -> *const fe::RegisterBlock {
2627 Self::PTR
2628 }
2629 #[doc = r" Steal an instance of this peripheral"]
2630 #[doc = r""]
2631 #[doc = r" # Safety"]
2632 #[doc = r""]
2633 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2634 #[doc = r" that may race with any existing instances, for example by only"]
2635 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2636 #[doc = r" original peripheral and using critical sections to coordinate"]
2637 #[doc = r" access between multiple new instances."]
2638 #[doc = r""]
2639 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2640 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2641 #[doc = r" no stolen instances are passed to such software."]
2642 pub unsafe fn steal() -> Self {
2643 Self {
2644 _marker: PhantomData,
2645 }
2646 }
2647}
2648impl Deref for FE {
2649 type Target = fe::RegisterBlock;
2650 #[inline(always)]
2651 fn deref(&self) -> &Self::Target {
2652 unsafe { &*Self::PTR }
2653 }
2654}
2655impl core::fmt::Debug for FE {
2656 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2657 f.debug_struct("FE").finish()
2658 }
2659}
2660#[doc = "FE Peripheral"]
2661pub mod fe;
2662#[doc = "FE2 Peripheral"]
2663pub struct FE2 {
2664 _marker: PhantomData<*const ()>,
2665}
2666unsafe impl Send for FE2 {}
2667impl FE2 {
2668 #[doc = r"Pointer to the register block"]
2669 pub const PTR: *const fe2::RegisterBlock = 0x3f40_5000 as *const _;
2670 #[doc = r"Return the pointer to the register block"]
2671 #[inline(always)]
2672 pub const fn ptr() -> *const fe2::RegisterBlock {
2673 Self::PTR
2674 }
2675 #[doc = r" Steal an instance of this peripheral"]
2676 #[doc = r""]
2677 #[doc = r" # Safety"]
2678 #[doc = r""]
2679 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2680 #[doc = r" that may race with any existing instances, for example by only"]
2681 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2682 #[doc = r" original peripheral and using critical sections to coordinate"]
2683 #[doc = r" access between multiple new instances."]
2684 #[doc = r""]
2685 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2686 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2687 #[doc = r" no stolen instances are passed to such software."]
2688 pub unsafe fn steal() -> Self {
2689 Self {
2690 _marker: PhantomData,
2691 }
2692 }
2693}
2694impl Deref for FE2 {
2695 type Target = fe2::RegisterBlock;
2696 #[inline(always)]
2697 fn deref(&self) -> &Self::Target {
2698 unsafe { &*Self::PTR }
2699 }
2700}
2701impl core::fmt::Debug for FE2 {
2702 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2703 f.debug_struct("FE2").finish()
2704 }
2705}
2706#[doc = "FE2 Peripheral"]
2707pub mod fe2;
2708#[doc = "Copy DMA Controller"]
2709pub struct COPY_DMA {
2710 _marker: PhantomData<*const ()>,
2711}
2712unsafe impl Send for COPY_DMA {}
2713impl COPY_DMA {
2714 #[doc = r"Pointer to the register block"]
2715 pub const PTR: *const copy_dma::RegisterBlock = 0x3f4c_3000 as *const _;
2716 #[doc = r"Return the pointer to the register block"]
2717 #[inline(always)]
2718 pub const fn ptr() -> *const copy_dma::RegisterBlock {
2719 Self::PTR
2720 }
2721 #[doc = r" Steal an instance of this peripheral"]
2722 #[doc = r""]
2723 #[doc = r" # Safety"]
2724 #[doc = r""]
2725 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2726 #[doc = r" that may race with any existing instances, for example by only"]
2727 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2728 #[doc = r" original peripheral and using critical sections to coordinate"]
2729 #[doc = r" access between multiple new instances."]
2730 #[doc = r""]
2731 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2732 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2733 #[doc = r" no stolen instances are passed to such software."]
2734 pub unsafe fn steal() -> Self {
2735 Self {
2736 _marker: PhantomData,
2737 }
2738 }
2739}
2740impl Deref for COPY_DMA {
2741 type Target = copy_dma::RegisterBlock;
2742 #[inline(always)]
2743 fn deref(&self) -> &Self::Target {
2744 unsafe { &*Self::PTR }
2745 }
2746}
2747impl core::fmt::Debug for COPY_DMA {
2748 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2749 f.debug_struct("COPY_DMA").finish()
2750 }
2751}
2752#[doc = "Copy DMA Controller"]
2753pub mod copy_dma;
2754#[doc = "Crypto DMA Controller"]
2755pub struct CRYPTO_DMA {
2756 _marker: PhantomData<*const ()>,
2757}
2758unsafe impl Send for CRYPTO_DMA {}
2759impl CRYPTO_DMA {
2760 #[doc = r"Pointer to the register block"]
2761 pub const PTR: *const crypto_dma::RegisterBlock = 0x6003_f000 as *const _;
2762 #[doc = r"Return the pointer to the register block"]
2763 #[inline(always)]
2764 pub const fn ptr() -> *const crypto_dma::RegisterBlock {
2765 Self::PTR
2766 }
2767 #[doc = r" Steal an instance of this peripheral"]
2768 #[doc = r""]
2769 #[doc = r" # Safety"]
2770 #[doc = r""]
2771 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2772 #[doc = r" that may race with any existing instances, for example by only"]
2773 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2774 #[doc = r" original peripheral and using critical sections to coordinate"]
2775 #[doc = r" access between multiple new instances."]
2776 #[doc = r""]
2777 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2778 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2779 #[doc = r" no stolen instances are passed to such software."]
2780 pub unsafe fn steal() -> Self {
2781 Self {
2782 _marker: PhantomData,
2783 }
2784 }
2785}
2786impl Deref for CRYPTO_DMA {
2787 type Target = crypto_dma::RegisterBlock;
2788 #[inline(always)]
2789 fn deref(&self) -> &Self::Target {
2790 unsafe { &*Self::PTR }
2791 }
2792}
2793impl core::fmt::Debug for CRYPTO_DMA {
2794 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2795 f.debug_struct("CRYPTO_DMA").finish()
2796 }
2797}
2798#[doc = "Crypto DMA Controller"]
2799pub mod crypto_dma;
2800#[doc = "I2C Analog Master"]
2801pub struct I2C_ANA_MST {
2802 _marker: PhantomData<*const ()>,
2803}
2804unsafe impl Send for I2C_ANA_MST {}
2805impl I2C_ANA_MST {
2806 #[doc = r"Pointer to the register block"]
2807 pub const PTR: *const i2c_ana_mst::RegisterBlock = 0x6000_e000 as *const _;
2808 #[doc = r"Return the pointer to the register block"]
2809 #[inline(always)]
2810 pub const fn ptr() -> *const i2c_ana_mst::RegisterBlock {
2811 Self::PTR
2812 }
2813 #[doc = r" Steal an instance of this peripheral"]
2814 #[doc = r""]
2815 #[doc = r" # Safety"]
2816 #[doc = r""]
2817 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2818 #[doc = r" that may race with any existing instances, for example by only"]
2819 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2820 #[doc = r" original peripheral and using critical sections to coordinate"]
2821 #[doc = r" access between multiple new instances."]
2822 #[doc = r""]
2823 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2824 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2825 #[doc = r" no stolen instances are passed to such software."]
2826 pub unsafe fn steal() -> Self {
2827 Self {
2828 _marker: PhantomData,
2829 }
2830 }
2831}
2832impl Deref for I2C_ANA_MST {
2833 type Target = i2c_ana_mst::RegisterBlock;
2834 #[inline(always)]
2835 fn deref(&self) -> &Self::Target {
2836 unsafe { &*Self::PTR }
2837 }
2838}
2839impl core::fmt::Debug for I2C_ANA_MST {
2840 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2841 f.debug_struct("I2C_ANA_MST").finish()
2842 }
2843}
2844#[doc = "I2C Analog Master"]
2845pub mod i2c_ana_mst;
2846#[doc = "MAC controller for Wi-Fi peripheral"]
2847pub struct WIFI {
2848 _marker: PhantomData<*const ()>,
2849}
2850unsafe impl Send for WIFI {}
2851impl WIFI {
2852 #[doc = r"Pointer to the register block"]
2853 pub const PTR: *const wifi::RegisterBlock = 0x6003_3000 as *const _;
2854 #[doc = r"Return the pointer to the register block"]
2855 #[inline(always)]
2856 pub const fn ptr() -> *const wifi::RegisterBlock {
2857 Self::PTR
2858 }
2859 #[doc = r" Steal an instance of this peripheral"]
2860 #[doc = r""]
2861 #[doc = r" # Safety"]
2862 #[doc = r""]
2863 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2864 #[doc = r" that may race with any existing instances, for example by only"]
2865 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2866 #[doc = r" original peripheral and using critical sections to coordinate"]
2867 #[doc = r" access between multiple new instances."]
2868 #[doc = r""]
2869 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2870 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2871 #[doc = r" no stolen instances are passed to such software."]
2872 pub unsafe fn steal() -> Self {
2873 Self {
2874 _marker: PhantomData,
2875 }
2876 }
2877}
2878impl Deref for WIFI {
2879 type Target = wifi::RegisterBlock;
2880 #[inline(always)]
2881 fn deref(&self) -> &Self::Target {
2882 unsafe { &*Self::PTR }
2883 }
2884}
2885impl core::fmt::Debug for WIFI {
2886 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2887 f.debug_struct("WIFI").finish()
2888 }
2889}
2890#[doc = "MAC controller for Wi-Fi peripheral"]
2891pub mod wifi;
2892#[no_mangle]
2893static mut DEVICE_PERIPHERALS: bool = false;
2894#[doc = r" All the peripherals."]
2895#[allow(non_snake_case)]
2896pub struct Peripherals {
2897 #[doc = "AES"]
2898 pub AES: AES,
2899 #[doc = "APB_SARADC"]
2900 pub APB_SARADC: APB_SARADC,
2901 #[doc = "BB"]
2902 pub BB: BB,
2903 #[doc = "DEDICATED_GPIO"]
2904 pub DEDICATED_GPIO: DEDICATED_GPIO,
2905 #[doc = "DS"]
2906 pub DS: DS,
2907 #[doc = "EFUSE"]
2908 pub EFUSE: EFUSE,
2909 #[doc = "EXTMEM"]
2910 pub EXTMEM: EXTMEM,
2911 #[doc = "GPIO"]
2912 pub GPIO: GPIO,
2913 #[doc = "GPIO_SD"]
2914 pub GPIO_SD: GPIO_SD,
2915 #[doc = "HMAC"]
2916 pub HMAC: HMAC,
2917 #[doc = "I2C0"]
2918 pub I2C0: I2C0,
2919 #[doc = "I2C1"]
2920 pub I2C1: I2C1,
2921 #[doc = "I2S0"]
2922 pub I2S0: I2S0,
2923 #[doc = "INTERRUPT_CORE0"]
2924 pub INTERRUPT_CORE0: INTERRUPT_CORE0,
2925 #[doc = "IO_MUX"]
2926 pub IO_MUX: IO_MUX,
2927 #[doc = "LEDC"]
2928 pub LEDC: LEDC,
2929 #[doc = "PCNT"]
2930 pub PCNT: PCNT,
2931 #[doc = "PMS"]
2932 pub PMS: PMS,
2933 #[doc = "RMT"]
2934 pub RMT: RMT,
2935 #[doc = "RNG"]
2936 pub RNG: RNG,
2937 #[doc = "RSA"]
2938 pub RSA: RSA,
2939 #[doc = "RTC_IO"]
2940 pub RTC_IO: RTC_IO,
2941 #[doc = "RTC_CNTL"]
2942 pub RTC_CNTL: RTC_CNTL,
2943 #[doc = "RTC_I2C"]
2944 pub RTC_I2C: RTC_I2C,
2945 #[doc = "SENS"]
2946 pub SENS: SENS,
2947 #[doc = "SHA"]
2948 pub SHA: SHA,
2949 #[doc = "SPI0"]
2950 pub SPI0: SPI0,
2951 #[doc = "SPI1"]
2952 pub SPI1: SPI1,
2953 #[doc = "SPI2"]
2954 pub SPI2: SPI2,
2955 #[doc = "SPI3"]
2956 pub SPI3: SPI3,
2957 #[doc = "SPI4"]
2958 pub SPI4: SPI4,
2959 #[doc = "SYSCON"]
2960 pub SYSCON: SYSCON,
2961 #[doc = "SYSTEM"]
2962 pub SYSTEM: SYSTEM,
2963 #[doc = "SYSTIMER"]
2964 pub SYSTIMER: SYSTIMER,
2965 #[doc = "TIMG0"]
2966 pub TIMG0: TIMG0,
2967 #[doc = "TIMG1"]
2968 pub TIMG1: TIMG1,
2969 #[doc = "TWAI0"]
2970 pub TWAI0: TWAI0,
2971 #[doc = "UART0"]
2972 pub UART0: UART0,
2973 #[doc = "UART1"]
2974 pub UART1: UART1,
2975 #[doc = "UHCI0"]
2976 pub UHCI0: UHCI0,
2977 #[doc = "USB0"]
2978 pub USB0: USB0,
2979 #[doc = "USB_WRAP"]
2980 pub USB_WRAP: USB_WRAP,
2981 #[doc = "XTS_AES"]
2982 pub XTS_AES: XTS_AES,
2983 #[doc = "NRX"]
2984 pub NRX: NRX,
2985 #[doc = "FE"]
2986 pub FE: FE,
2987 #[doc = "FE2"]
2988 pub FE2: FE2,
2989 #[doc = "COPY_DMA"]
2990 pub COPY_DMA: COPY_DMA,
2991 #[doc = "CRYPTO_DMA"]
2992 pub CRYPTO_DMA: CRYPTO_DMA,
2993 #[doc = "I2C_ANA_MST"]
2994 pub I2C_ANA_MST: I2C_ANA_MST,
2995 #[doc = "WIFI"]
2996 pub WIFI: WIFI,
2997}
2998impl Peripherals {
2999 #[doc = r" Returns all the peripherals *once*."]
3000 #[cfg(feature = "critical-section")]
3001 #[inline]
3002 pub fn take() -> Option<Self> {
3003 critical_section::with(|_| {
3004 if unsafe { DEVICE_PERIPHERALS } {
3005 return None;
3006 }
3007 Some(unsafe { Peripherals::steal() })
3008 })
3009 }
3010 #[doc = r" Unchecked version of `Peripherals::take`."]
3011 #[doc = r""]
3012 #[doc = r" # Safety"]
3013 #[doc = r""]
3014 #[doc = r" Each of the returned peripherals must be used at most once."]
3015 #[inline]
3016 pub unsafe fn steal() -> Self {
3017 DEVICE_PERIPHERALS = true;
3018 Peripherals {
3019 AES: AES::steal(),
3020 APB_SARADC: APB_SARADC::steal(),
3021 BB: BB::steal(),
3022 DEDICATED_GPIO: DEDICATED_GPIO::steal(),
3023 DS: DS::steal(),
3024 EFUSE: EFUSE::steal(),
3025 EXTMEM: EXTMEM::steal(),
3026 GPIO: GPIO::steal(),
3027 GPIO_SD: GPIO_SD::steal(),
3028 HMAC: HMAC::steal(),
3029 I2C0: I2C0::steal(),
3030 I2C1: I2C1::steal(),
3031 I2S0: I2S0::steal(),
3032 INTERRUPT_CORE0: INTERRUPT_CORE0::steal(),
3033 IO_MUX: IO_MUX::steal(),
3034 LEDC: LEDC::steal(),
3035 PCNT: PCNT::steal(),
3036 PMS: PMS::steal(),
3037 RMT: RMT::steal(),
3038 RNG: RNG::steal(),
3039 RSA: RSA::steal(),
3040 RTC_IO: RTC_IO::steal(),
3041 RTC_CNTL: RTC_CNTL::steal(),
3042 RTC_I2C: RTC_I2C::steal(),
3043 SENS: SENS::steal(),
3044 SHA: SHA::steal(),
3045 SPI0: SPI0::steal(),
3046 SPI1: SPI1::steal(),
3047 SPI2: SPI2::steal(),
3048 SPI3: SPI3::steal(),
3049 SPI4: SPI4::steal(),
3050 SYSCON: SYSCON::steal(),
3051 SYSTEM: SYSTEM::steal(),
3052 SYSTIMER: SYSTIMER::steal(),
3053 TIMG0: TIMG0::steal(),
3054 TIMG1: TIMG1::steal(),
3055 TWAI0: TWAI0::steal(),
3056 UART0: UART0::steal(),
3057 UART1: UART1::steal(),
3058 UHCI0: UHCI0::steal(),
3059 USB0: USB0::steal(),
3060 USB_WRAP: USB_WRAP::steal(),
3061 XTS_AES: XTS_AES::steal(),
3062 NRX: NRX::steal(),
3063 FE: FE::steal(),
3064 FE2: FE2::steal(),
3065 COPY_DMA: COPY_DMA::steal(),
3066 CRYPTO_DMA: CRYPTO_DMA::steal(),
3067 I2C_ANA_MST: I2C_ANA_MST::steal(),
3068 WIFI: WIFI::steal(),
3069 }
3070 }
3071}