rp2040_pac/
lib.rs

1#![doc = "Peripheral access API for RP2040 microcontrollers (generated using svd2rust v0.31.5 ( ))  
2
3You can find an overview of the generated API [here].  
4
5API features to be included in the [next]
6svd2rust release can be generated by cloning the svd2rust [repository], checking out the above commit, and running `cargo doc --open`.  
7
8[here]: https://docs.rs/svd2rust/0.31.5/svd2rust/#peripheral-api  
9[next]: https://github.com/rust-embedded/svd2rust/blob/master/CHANGELOG.md#unreleased  
10[repository]: https://github.com/rust-embedded/svd2rust"]
11#![allow(non_camel_case_types)]
12#![allow(non_snake_case)]
13#![no_std]
14use core::marker::PhantomData;
15use core::ops::Deref;
16#[doc = r"Number available in the NVIC for configuring priority"]
17pub const NVIC_PRIO_BITS: u8 = 2;
18#[cfg(feature = "rt")]
19pub use self::Interrupt as interrupt;
20pub use cortex_m::peripheral::Peripherals as CorePeripherals;
21pub use cortex_m::peripheral::{CBP, CPUID, DCB, DWT, FPB, ITM, MPU, NVIC, SCB, SYST, TPIU};
22#[cfg(feature = "rt")]
23pub use cortex_m_rt::interrupt;
24#[allow(unused_imports)]
25use generic::*;
26#[doc = r"Common register and bit access and modify traits"]
27pub mod generic;
28#[cfg(feature = "rt")]
29extern "C" {
30    fn TIMER_IRQ_0();
31    fn TIMER_IRQ_1();
32    fn TIMER_IRQ_2();
33    fn TIMER_IRQ_3();
34    fn PWM_IRQ_WRAP();
35    fn USBCTRL_IRQ();
36    fn XIP_IRQ();
37    fn PIO0_IRQ_0();
38    fn PIO0_IRQ_1();
39    fn PIO1_IRQ_0();
40    fn PIO1_IRQ_1();
41    fn DMA_IRQ_0();
42    fn DMA_IRQ_1();
43    fn IO_IRQ_BANK0();
44    fn IO_IRQ_QSPI();
45    fn SIO_IRQ_PROC0();
46    fn SIO_IRQ_PROC1();
47    fn CLOCKS_IRQ();
48    fn SPI0_IRQ();
49    fn SPI1_IRQ();
50    fn UART0_IRQ();
51    fn UART1_IRQ();
52    fn ADC_IRQ_FIFO();
53    fn I2C0_IRQ();
54    fn I2C1_IRQ();
55    fn RTC_IRQ();
56    fn SW0_IRQ();
57    fn SW1_IRQ();
58    fn SW2_IRQ();
59    fn SW3_IRQ();
60    fn SW4_IRQ();
61    fn SW5_IRQ();
62}
63#[doc(hidden)]
64#[repr(C)]
65pub union Vector {
66    _handler: unsafe extern "C" fn(),
67    _reserved: u32,
68}
69#[cfg(feature = "rt")]
70#[doc(hidden)]
71#[link_section = ".vector_table.interrupts"]
72#[no_mangle]
73pub static __INTERRUPTS: [Vector; 32] = [
74    Vector {
75        _handler: TIMER_IRQ_0,
76    },
77    Vector {
78        _handler: TIMER_IRQ_1,
79    },
80    Vector {
81        _handler: TIMER_IRQ_2,
82    },
83    Vector {
84        _handler: TIMER_IRQ_3,
85    },
86    Vector {
87        _handler: PWM_IRQ_WRAP,
88    },
89    Vector {
90        _handler: USBCTRL_IRQ,
91    },
92    Vector { _handler: XIP_IRQ },
93    Vector {
94        _handler: PIO0_IRQ_0,
95    },
96    Vector {
97        _handler: PIO0_IRQ_1,
98    },
99    Vector {
100        _handler: PIO1_IRQ_0,
101    },
102    Vector {
103        _handler: PIO1_IRQ_1,
104    },
105    Vector {
106        _handler: DMA_IRQ_0,
107    },
108    Vector {
109        _handler: DMA_IRQ_1,
110    },
111    Vector {
112        _handler: IO_IRQ_BANK0,
113    },
114    Vector {
115        _handler: IO_IRQ_QSPI,
116    },
117    Vector {
118        _handler: SIO_IRQ_PROC0,
119    },
120    Vector {
121        _handler: SIO_IRQ_PROC1,
122    },
123    Vector {
124        _handler: CLOCKS_IRQ,
125    },
126    Vector { _handler: SPI0_IRQ },
127    Vector { _handler: SPI1_IRQ },
128    Vector {
129        _handler: UART0_IRQ,
130    },
131    Vector {
132        _handler: UART1_IRQ,
133    },
134    Vector {
135        _handler: ADC_IRQ_FIFO,
136    },
137    Vector { _handler: I2C0_IRQ },
138    Vector { _handler: I2C1_IRQ },
139    Vector { _handler: RTC_IRQ },
140    Vector { _handler: SW0_IRQ },
141    Vector { _handler: SW1_IRQ },
142    Vector { _handler: SW2_IRQ },
143    Vector { _handler: SW3_IRQ },
144    Vector { _handler: SW4_IRQ },
145    Vector { _handler: SW5_IRQ },
146];
147#[doc = r"Enumeration of all the interrupts."]
148#[derive(Copy, Clone, Debug, PartialEq, Eq)]
149#[repr(u16)]
150pub enum Interrupt {
151    #[doc = "0 - TIMER_IRQ_0"]
152    TIMER_IRQ_0 = 0,
153    #[doc = "1 - TIMER_IRQ_1"]
154    TIMER_IRQ_1 = 1,
155    #[doc = "2 - TIMER_IRQ_2"]
156    TIMER_IRQ_2 = 2,
157    #[doc = "3 - TIMER_IRQ_3"]
158    TIMER_IRQ_3 = 3,
159    #[doc = "4 - PWM_IRQ_WRAP"]
160    PWM_IRQ_WRAP = 4,
161    #[doc = "5 - USBCTRL_IRQ"]
162    USBCTRL_IRQ = 5,
163    #[doc = "6 - XIP_IRQ"]
164    XIP_IRQ = 6,
165    #[doc = "7 - PIO0_IRQ_0"]
166    PIO0_IRQ_0 = 7,
167    #[doc = "8 - PIO0_IRQ_1"]
168    PIO0_IRQ_1 = 8,
169    #[doc = "9 - PIO1_IRQ_0"]
170    PIO1_IRQ_0 = 9,
171    #[doc = "10 - PIO1_IRQ_1"]
172    PIO1_IRQ_1 = 10,
173    #[doc = "11 - DMA_IRQ_0"]
174    DMA_IRQ_0 = 11,
175    #[doc = "12 - DMA_IRQ_1"]
176    DMA_IRQ_1 = 12,
177    #[doc = "13 - IO_IRQ_BANK0"]
178    IO_IRQ_BANK0 = 13,
179    #[doc = "14 - IO_IRQ_QSPI"]
180    IO_IRQ_QSPI = 14,
181    #[doc = "15 - SIO_IRQ_PROC0"]
182    SIO_IRQ_PROC0 = 15,
183    #[doc = "16 - SIO_IRQ_PROC1"]
184    SIO_IRQ_PROC1 = 16,
185    #[doc = "17 - CLOCKS_IRQ"]
186    CLOCKS_IRQ = 17,
187    #[doc = "18 - SPI0_IRQ"]
188    SPI0_IRQ = 18,
189    #[doc = "19 - SPI1_IRQ"]
190    SPI1_IRQ = 19,
191    #[doc = "20 - UART0_IRQ"]
192    UART0_IRQ = 20,
193    #[doc = "21 - UART1_IRQ"]
194    UART1_IRQ = 21,
195    #[doc = "22 - ADC_IRQ_FIFO"]
196    ADC_IRQ_FIFO = 22,
197    #[doc = "23 - I2C0_IRQ"]
198    I2C0_IRQ = 23,
199    #[doc = "24 - I2C1_IRQ"]
200    I2C1_IRQ = 24,
201    #[doc = "25 - RTC_IRQ"]
202    RTC_IRQ = 25,
203    #[doc = "26 - Software IRQ 0"]
204    SW0_IRQ = 26,
205    #[doc = "27 - Software IRQ 1"]
206    SW1_IRQ = 27,
207    #[doc = "28 - Software IRQ 2"]
208    SW2_IRQ = 28,
209    #[doc = "29 - Software IRQ 3"]
210    SW3_IRQ = 29,
211    #[doc = "30 - Software IRQ 4"]
212    SW4_IRQ = 30,
213    #[doc = "31 - Software IRQ 5"]
214    SW5_IRQ = 31,
215}
216unsafe impl cortex_m::interrupt::InterruptNumber for Interrupt {
217    #[inline(always)]
218    fn number(self) -> u16 {
219        self as u16
220    }
221}
222#[doc = "QSPI flash execute-in-place block"]
223pub struct XIP_CTRL {
224    _marker: PhantomData<*const ()>,
225}
226unsafe impl Send for XIP_CTRL {}
227impl XIP_CTRL {
228    #[doc = r"Pointer to the register block"]
229    pub const PTR: *const xip_ctrl::RegisterBlock = 0x1400_0000 as *const _;
230    #[doc = r"Return the pointer to the register block"]
231    #[inline(always)]
232    pub const fn ptr() -> *const xip_ctrl::RegisterBlock {
233        Self::PTR
234    }
235    #[doc = r" Steal an instance of this peripheral"]
236    #[doc = r""]
237    #[doc = r" # Safety"]
238    #[doc = r""]
239    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
240    #[doc = r" that may race with any existing instances, for example by only"]
241    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
242    #[doc = r" original peripheral and using critical sections to coordinate"]
243    #[doc = r" access between multiple new instances."]
244    #[doc = r""]
245    #[doc = r" Additionally, other software such as HALs may rely on only one"]
246    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
247    #[doc = r" no stolen instances are passed to such software."]
248    pub unsafe fn steal() -> Self {
249        Self {
250            _marker: PhantomData,
251        }
252    }
253}
254impl Deref for XIP_CTRL {
255    type Target = xip_ctrl::RegisterBlock;
256    #[inline(always)]
257    fn deref(&self) -> &Self::Target {
258        unsafe { &*Self::PTR }
259    }
260}
261impl core::fmt::Debug for XIP_CTRL {
262    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
263        f.debug_struct("XIP_CTRL").finish()
264    }
265}
266#[doc = "QSPI flash execute-in-place block"]
267pub mod xip_ctrl;
268#[doc = "DW_apb_ssi has the following features:  
269 * APB interface - Allows for easy integration into a DesignWare Synthesizable Components for AMBA 2 implementation.  
270 * APB3 and APB4 protocol support.  
271 * Scalable APB data bus width - Supports APB data bus widths of 8, 16, and 32 bits.  
272 * Serial-master or serial-slave operation - Enables serial communication with serial-master or serial-slave peripheral devices.  
273 * Programmable Dual/Quad/Octal SPI support in Master Mode.  
274 * Dual Data Rate (DDR) and Read Data Strobe (RDS) Support - Enables the DW_apb_ssi master to perform operations with the device in DDR and RDS modes when working in Dual/Quad/Octal mode of operation.  
275 * Data Mask Support - Enables the DW_apb_ssi to selectively update the bytes in the device. This feature is applicable only in enhanced SPI modes.  
276 * eXecute-In-Place (XIP) support - Enables the DW_apb_ssi master to behave as a memory mapped I/O and fetches the data from the device based on the APB read request. This feature is applicable only in enhanced SPI modes.  
277 * DMA Controller Interface - Enables the DW_apb_ssi to interface to a DMA controller over the bus using a handshaking interface for transfer requests.  
278 * Independent masking of interrupts - Master collision, transmit FIFO overflow, transmit FIFO empty, receive FIFO full, receive FIFO underflow, and receive FIFO overflow interrupts can all be masked independently.  
279 * Multi-master contention detection - Informs the processor of multiple serial-master accesses on the serial bus.  
280 * Bypass of meta-stability flip-flops for synchronous clocks - When the APB clock (pclk) and the DW_apb_ssi serial clock (ssi_clk) are synchronous, meta-stable flip-flops are not used when transferring control signals across these clock domains.  
281 * Programmable delay on the sample time of the received serial data bit (rxd); enables programmable control of routing delays resulting in higher serial data-bit rates.  
282 * Programmable features:  
283 - Serial interface operation - Choice of Motorola SPI, Texas Instruments Synchronous Serial Protocol or National Semiconductor Microwire.  
284 - Clock bit-rate - Dynamic control of the serial bit rate of the data transfer; used in only serial-master mode of operation.  
285 - Data Item size (4 to 32 bits) - Item size of each data transfer under the control of the programmer.  
286 * Configured features:  
287 - FIFO depth - 16 words deep. The FIFO width is fixed at 32 bits.  
288 - 1 slave select output.  
289 - Hardware slave-select - Dedicated hardware slave-select line.  
290 - Combined interrupt line - one combined interrupt line from the DW_apb_ssi to the interrupt controller.  
291 - Interrupt polarity - active high interrupt lines.  
292 - Serial clock polarity - low serial-clock polarity directly after reset.  
293 - Serial clock phase - capture on first edge of serial-clock directly after reset."]
294pub struct XIP_SSI {
295    _marker: PhantomData<*const ()>,
296}
297unsafe impl Send for XIP_SSI {}
298impl XIP_SSI {
299    #[doc = r"Pointer to the register block"]
300    pub const PTR: *const xip_ssi::RegisterBlock = 0x1800_0000 as *const _;
301    #[doc = r"Return the pointer to the register block"]
302    #[inline(always)]
303    pub const fn ptr() -> *const xip_ssi::RegisterBlock {
304        Self::PTR
305    }
306    #[doc = r" Steal an instance of this peripheral"]
307    #[doc = r""]
308    #[doc = r" # Safety"]
309    #[doc = r""]
310    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
311    #[doc = r" that may race with any existing instances, for example by only"]
312    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
313    #[doc = r" original peripheral and using critical sections to coordinate"]
314    #[doc = r" access between multiple new instances."]
315    #[doc = r""]
316    #[doc = r" Additionally, other software such as HALs may rely on only one"]
317    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
318    #[doc = r" no stolen instances are passed to such software."]
319    pub unsafe fn steal() -> Self {
320        Self {
321            _marker: PhantomData,
322        }
323    }
324}
325impl Deref for XIP_SSI {
326    type Target = xip_ssi::RegisterBlock;
327    #[inline(always)]
328    fn deref(&self) -> &Self::Target {
329        unsafe { &*Self::PTR }
330    }
331}
332impl core::fmt::Debug for XIP_SSI {
333    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
334        f.debug_struct("XIP_SSI").finish()
335    }
336}
337#[doc = "DW_apb_ssi has the following features:  
338 * APB interface - Allows for easy integration into a DesignWare Synthesizable Components for AMBA 2 implementation.  
339 * APB3 and APB4 protocol support.  
340 * Scalable APB data bus width - Supports APB data bus widths of 8, 16, and 32 bits.  
341 * Serial-master or serial-slave operation - Enables serial communication with serial-master or serial-slave peripheral devices.  
342 * Programmable Dual/Quad/Octal SPI support in Master Mode.  
343 * Dual Data Rate (DDR) and Read Data Strobe (RDS) Support - Enables the DW_apb_ssi master to perform operations with the device in DDR and RDS modes when working in Dual/Quad/Octal mode of operation.  
344 * Data Mask Support - Enables the DW_apb_ssi to selectively update the bytes in the device. This feature is applicable only in enhanced SPI modes.  
345 * eXecute-In-Place (XIP) support - Enables the DW_apb_ssi master to behave as a memory mapped I/O and fetches the data from the device based on the APB read request. This feature is applicable only in enhanced SPI modes.  
346 * DMA Controller Interface - Enables the DW_apb_ssi to interface to a DMA controller over the bus using a handshaking interface for transfer requests.  
347 * Independent masking of interrupts - Master collision, transmit FIFO overflow, transmit FIFO empty, receive FIFO full, receive FIFO underflow, and receive FIFO overflow interrupts can all be masked independently.  
348 * Multi-master contention detection - Informs the processor of multiple serial-master accesses on the serial bus.  
349 * Bypass of meta-stability flip-flops for synchronous clocks - When the APB clock (pclk) and the DW_apb_ssi serial clock (ssi_clk) are synchronous, meta-stable flip-flops are not used when transferring control signals across these clock domains.  
350 * Programmable delay on the sample time of the received serial data bit (rxd); enables programmable control of routing delays resulting in higher serial data-bit rates.  
351 * Programmable features:  
352 - Serial interface operation - Choice of Motorola SPI, Texas Instruments Synchronous Serial Protocol or National Semiconductor Microwire.  
353 - Clock bit-rate - Dynamic control of the serial bit rate of the data transfer; used in only serial-master mode of operation.  
354 - Data Item size (4 to 32 bits) - Item size of each data transfer under the control of the programmer.  
355 * Configured features:  
356 - FIFO depth - 16 words deep. The FIFO width is fixed at 32 bits.  
357 - 1 slave select output.  
358 - Hardware slave-select - Dedicated hardware slave-select line.  
359 - Combined interrupt line - one combined interrupt line from the DW_apb_ssi to the interrupt controller.  
360 - Interrupt polarity - active high interrupt lines.  
361 - Serial clock polarity - low serial-clock polarity directly after reset.  
362 - Serial clock phase - capture on first edge of serial-clock directly after reset."]
363pub mod xip_ssi;
364#[doc = "SYSINFO"]
365pub struct SYSINFO {
366    _marker: PhantomData<*const ()>,
367}
368unsafe impl Send for SYSINFO {}
369impl SYSINFO {
370    #[doc = r"Pointer to the register block"]
371    pub const PTR: *const sysinfo::RegisterBlock = 0x4000_0000 as *const _;
372    #[doc = r"Return the pointer to the register block"]
373    #[inline(always)]
374    pub const fn ptr() -> *const sysinfo::RegisterBlock {
375        Self::PTR
376    }
377    #[doc = r" Steal an instance of this peripheral"]
378    #[doc = r""]
379    #[doc = r" # Safety"]
380    #[doc = r""]
381    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
382    #[doc = r" that may race with any existing instances, for example by only"]
383    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
384    #[doc = r" original peripheral and using critical sections to coordinate"]
385    #[doc = r" access between multiple new instances."]
386    #[doc = r""]
387    #[doc = r" Additionally, other software such as HALs may rely on only one"]
388    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
389    #[doc = r" no stolen instances are passed to such software."]
390    pub unsafe fn steal() -> Self {
391        Self {
392            _marker: PhantomData,
393        }
394    }
395}
396impl Deref for SYSINFO {
397    type Target = sysinfo::RegisterBlock;
398    #[inline(always)]
399    fn deref(&self) -> &Self::Target {
400        unsafe { &*Self::PTR }
401    }
402}
403impl core::fmt::Debug for SYSINFO {
404    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
405        f.debug_struct("SYSINFO").finish()
406    }
407}
408#[doc = "SYSINFO"]
409pub mod sysinfo;
410#[doc = "Register block for various chip control signals"]
411pub struct SYSCFG {
412    _marker: PhantomData<*const ()>,
413}
414unsafe impl Send for SYSCFG {}
415impl SYSCFG {
416    #[doc = r"Pointer to the register block"]
417    pub const PTR: *const syscfg::RegisterBlock = 0x4000_4000 as *const _;
418    #[doc = r"Return the pointer to the register block"]
419    #[inline(always)]
420    pub const fn ptr() -> *const syscfg::RegisterBlock {
421        Self::PTR
422    }
423    #[doc = r" Steal an instance of this peripheral"]
424    #[doc = r""]
425    #[doc = r" # Safety"]
426    #[doc = r""]
427    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
428    #[doc = r" that may race with any existing instances, for example by only"]
429    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
430    #[doc = r" original peripheral and using critical sections to coordinate"]
431    #[doc = r" access between multiple new instances."]
432    #[doc = r""]
433    #[doc = r" Additionally, other software such as HALs may rely on only one"]
434    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
435    #[doc = r" no stolen instances are passed to such software."]
436    pub unsafe fn steal() -> Self {
437        Self {
438            _marker: PhantomData,
439        }
440    }
441}
442impl Deref for SYSCFG {
443    type Target = syscfg::RegisterBlock;
444    #[inline(always)]
445    fn deref(&self) -> &Self::Target {
446        unsafe { &*Self::PTR }
447    }
448}
449impl core::fmt::Debug for SYSCFG {
450    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
451        f.debug_struct("SYSCFG").finish()
452    }
453}
454#[doc = "Register block for various chip control signals"]
455pub mod syscfg;
456#[doc = "CLOCKS"]
457pub struct CLOCKS {
458    _marker: PhantomData<*const ()>,
459}
460unsafe impl Send for CLOCKS {}
461impl CLOCKS {
462    #[doc = r"Pointer to the register block"]
463    pub const PTR: *const clocks::RegisterBlock = 0x4000_8000 as *const _;
464    #[doc = r"Return the pointer to the register block"]
465    #[inline(always)]
466    pub const fn ptr() -> *const clocks::RegisterBlock {
467        Self::PTR
468    }
469    #[doc = r" Steal an instance of this peripheral"]
470    #[doc = r""]
471    #[doc = r" # Safety"]
472    #[doc = r""]
473    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
474    #[doc = r" that may race with any existing instances, for example by only"]
475    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
476    #[doc = r" original peripheral and using critical sections to coordinate"]
477    #[doc = r" access between multiple new instances."]
478    #[doc = r""]
479    #[doc = r" Additionally, other software such as HALs may rely on only one"]
480    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
481    #[doc = r" no stolen instances are passed to such software."]
482    pub unsafe fn steal() -> Self {
483        Self {
484            _marker: PhantomData,
485        }
486    }
487}
488impl Deref for CLOCKS {
489    type Target = clocks::RegisterBlock;
490    #[inline(always)]
491    fn deref(&self) -> &Self::Target {
492        unsafe { &*Self::PTR }
493    }
494}
495impl core::fmt::Debug for CLOCKS {
496    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
497        f.debug_struct("CLOCKS").finish()
498    }
499}
500#[doc = "CLOCKS"]
501pub mod clocks;
502#[doc = "RESETS"]
503pub struct RESETS {
504    _marker: PhantomData<*const ()>,
505}
506unsafe impl Send for RESETS {}
507impl RESETS {
508    #[doc = r"Pointer to the register block"]
509    pub const PTR: *const resets::RegisterBlock = 0x4000_c000 as *const _;
510    #[doc = r"Return the pointer to the register block"]
511    #[inline(always)]
512    pub const fn ptr() -> *const resets::RegisterBlock {
513        Self::PTR
514    }
515    #[doc = r" Steal an instance of this peripheral"]
516    #[doc = r""]
517    #[doc = r" # Safety"]
518    #[doc = r""]
519    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
520    #[doc = r" that may race with any existing instances, for example by only"]
521    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
522    #[doc = r" original peripheral and using critical sections to coordinate"]
523    #[doc = r" access between multiple new instances."]
524    #[doc = r""]
525    #[doc = r" Additionally, other software such as HALs may rely on only one"]
526    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
527    #[doc = r" no stolen instances are passed to such software."]
528    pub unsafe fn steal() -> Self {
529        Self {
530            _marker: PhantomData,
531        }
532    }
533}
534impl Deref for RESETS {
535    type Target = resets::RegisterBlock;
536    #[inline(always)]
537    fn deref(&self) -> &Self::Target {
538        unsafe { &*Self::PTR }
539    }
540}
541impl core::fmt::Debug for RESETS {
542    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
543        f.debug_struct("RESETS").finish()
544    }
545}
546#[doc = "RESETS"]
547pub mod resets;
548#[doc = "PSM"]
549pub struct PSM {
550    _marker: PhantomData<*const ()>,
551}
552unsafe impl Send for PSM {}
553impl PSM {
554    #[doc = r"Pointer to the register block"]
555    pub const PTR: *const psm::RegisterBlock = 0x4001_0000 as *const _;
556    #[doc = r"Return the pointer to the register block"]
557    #[inline(always)]
558    pub const fn ptr() -> *const psm::RegisterBlock {
559        Self::PTR
560    }
561    #[doc = r" Steal an instance of this peripheral"]
562    #[doc = r""]
563    #[doc = r" # Safety"]
564    #[doc = r""]
565    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
566    #[doc = r" that may race with any existing instances, for example by only"]
567    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
568    #[doc = r" original peripheral and using critical sections to coordinate"]
569    #[doc = r" access between multiple new instances."]
570    #[doc = r""]
571    #[doc = r" Additionally, other software such as HALs may rely on only one"]
572    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
573    #[doc = r" no stolen instances are passed to such software."]
574    pub unsafe fn steal() -> Self {
575        Self {
576            _marker: PhantomData,
577        }
578    }
579}
580impl Deref for PSM {
581    type Target = psm::RegisterBlock;
582    #[inline(always)]
583    fn deref(&self) -> &Self::Target {
584        unsafe { &*Self::PTR }
585    }
586}
587impl core::fmt::Debug for PSM {
588    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
589        f.debug_struct("PSM").finish()
590    }
591}
592#[doc = "PSM"]
593pub mod psm;
594#[doc = "IO_BANK0"]
595pub struct IO_BANK0 {
596    _marker: PhantomData<*const ()>,
597}
598unsafe impl Send for IO_BANK0 {}
599impl IO_BANK0 {
600    #[doc = r"Pointer to the register block"]
601    pub const PTR: *const io_bank0::RegisterBlock = 0x4001_4000 as *const _;
602    #[doc = r"Return the pointer to the register block"]
603    #[inline(always)]
604    pub const fn ptr() -> *const io_bank0::RegisterBlock {
605        Self::PTR
606    }
607    #[doc = r" Steal an instance of this peripheral"]
608    #[doc = r""]
609    #[doc = r" # Safety"]
610    #[doc = r""]
611    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
612    #[doc = r" that may race with any existing instances, for example by only"]
613    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
614    #[doc = r" original peripheral and using critical sections to coordinate"]
615    #[doc = r" access between multiple new instances."]
616    #[doc = r""]
617    #[doc = r" Additionally, other software such as HALs may rely on only one"]
618    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
619    #[doc = r" no stolen instances are passed to such software."]
620    pub unsafe fn steal() -> Self {
621        Self {
622            _marker: PhantomData,
623        }
624    }
625}
626impl Deref for IO_BANK0 {
627    type Target = io_bank0::RegisterBlock;
628    #[inline(always)]
629    fn deref(&self) -> &Self::Target {
630        unsafe { &*Self::PTR }
631    }
632}
633impl core::fmt::Debug for IO_BANK0 {
634    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
635        f.debug_struct("IO_BANK0").finish()
636    }
637}
638#[doc = "IO_BANK0"]
639pub mod io_bank0;
640#[doc = "IO_QSPI"]
641pub struct IO_QSPI {
642    _marker: PhantomData<*const ()>,
643}
644unsafe impl Send for IO_QSPI {}
645impl IO_QSPI {
646    #[doc = r"Pointer to the register block"]
647    pub const PTR: *const io_qspi::RegisterBlock = 0x4001_8000 as *const _;
648    #[doc = r"Return the pointer to the register block"]
649    #[inline(always)]
650    pub const fn ptr() -> *const io_qspi::RegisterBlock {
651        Self::PTR
652    }
653    #[doc = r" Steal an instance of this peripheral"]
654    #[doc = r""]
655    #[doc = r" # Safety"]
656    #[doc = r""]
657    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
658    #[doc = r" that may race with any existing instances, for example by only"]
659    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
660    #[doc = r" original peripheral and using critical sections to coordinate"]
661    #[doc = r" access between multiple new instances."]
662    #[doc = r""]
663    #[doc = r" Additionally, other software such as HALs may rely on only one"]
664    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
665    #[doc = r" no stolen instances are passed to such software."]
666    pub unsafe fn steal() -> Self {
667        Self {
668            _marker: PhantomData,
669        }
670    }
671}
672impl Deref for IO_QSPI {
673    type Target = io_qspi::RegisterBlock;
674    #[inline(always)]
675    fn deref(&self) -> &Self::Target {
676        unsafe { &*Self::PTR }
677    }
678}
679impl core::fmt::Debug for IO_QSPI {
680    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
681        f.debug_struct("IO_QSPI").finish()
682    }
683}
684#[doc = "IO_QSPI"]
685pub mod io_qspi;
686#[doc = "PADS_BANK0"]
687pub struct PADS_BANK0 {
688    _marker: PhantomData<*const ()>,
689}
690unsafe impl Send for PADS_BANK0 {}
691impl PADS_BANK0 {
692    #[doc = r"Pointer to the register block"]
693    pub const PTR: *const pads_bank0::RegisterBlock = 0x4001_c000 as *const _;
694    #[doc = r"Return the pointer to the register block"]
695    #[inline(always)]
696    pub const fn ptr() -> *const pads_bank0::RegisterBlock {
697        Self::PTR
698    }
699    #[doc = r" Steal an instance of this peripheral"]
700    #[doc = r""]
701    #[doc = r" # Safety"]
702    #[doc = r""]
703    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
704    #[doc = r" that may race with any existing instances, for example by only"]
705    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
706    #[doc = r" original peripheral and using critical sections to coordinate"]
707    #[doc = r" access between multiple new instances."]
708    #[doc = r""]
709    #[doc = r" Additionally, other software such as HALs may rely on only one"]
710    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
711    #[doc = r" no stolen instances are passed to such software."]
712    pub unsafe fn steal() -> Self {
713        Self {
714            _marker: PhantomData,
715        }
716    }
717}
718impl Deref for PADS_BANK0 {
719    type Target = pads_bank0::RegisterBlock;
720    #[inline(always)]
721    fn deref(&self) -> &Self::Target {
722        unsafe { &*Self::PTR }
723    }
724}
725impl core::fmt::Debug for PADS_BANK0 {
726    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
727        f.debug_struct("PADS_BANK0").finish()
728    }
729}
730#[doc = "PADS_BANK0"]
731pub mod pads_bank0;
732#[doc = "PADS_QSPI"]
733pub struct PADS_QSPI {
734    _marker: PhantomData<*const ()>,
735}
736unsafe impl Send for PADS_QSPI {}
737impl PADS_QSPI {
738    #[doc = r"Pointer to the register block"]
739    pub const PTR: *const pads_qspi::RegisterBlock = 0x4002_0000 as *const _;
740    #[doc = r"Return the pointer to the register block"]
741    #[inline(always)]
742    pub const fn ptr() -> *const pads_qspi::RegisterBlock {
743        Self::PTR
744    }
745    #[doc = r" Steal an instance of this peripheral"]
746    #[doc = r""]
747    #[doc = r" # Safety"]
748    #[doc = r""]
749    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
750    #[doc = r" that may race with any existing instances, for example by only"]
751    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
752    #[doc = r" original peripheral and using critical sections to coordinate"]
753    #[doc = r" access between multiple new instances."]
754    #[doc = r""]
755    #[doc = r" Additionally, other software such as HALs may rely on only one"]
756    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
757    #[doc = r" no stolen instances are passed to such software."]
758    pub unsafe fn steal() -> Self {
759        Self {
760            _marker: PhantomData,
761        }
762    }
763}
764impl Deref for PADS_QSPI {
765    type Target = pads_qspi::RegisterBlock;
766    #[inline(always)]
767    fn deref(&self) -> &Self::Target {
768        unsafe { &*Self::PTR }
769    }
770}
771impl core::fmt::Debug for PADS_QSPI {
772    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
773        f.debug_struct("PADS_QSPI").finish()
774    }
775}
776#[doc = "PADS_QSPI"]
777pub mod pads_qspi;
778#[doc = "Controls the crystal oscillator"]
779pub struct XOSC {
780    _marker: PhantomData<*const ()>,
781}
782unsafe impl Send for XOSC {}
783impl XOSC {
784    #[doc = r"Pointer to the register block"]
785    pub const PTR: *const xosc::RegisterBlock = 0x4002_4000 as *const _;
786    #[doc = r"Return the pointer to the register block"]
787    #[inline(always)]
788    pub const fn ptr() -> *const xosc::RegisterBlock {
789        Self::PTR
790    }
791    #[doc = r" Steal an instance of this peripheral"]
792    #[doc = r""]
793    #[doc = r" # Safety"]
794    #[doc = r""]
795    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
796    #[doc = r" that may race with any existing instances, for example by only"]
797    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
798    #[doc = r" original peripheral and using critical sections to coordinate"]
799    #[doc = r" access between multiple new instances."]
800    #[doc = r""]
801    #[doc = r" Additionally, other software such as HALs may rely on only one"]
802    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
803    #[doc = r" no stolen instances are passed to such software."]
804    pub unsafe fn steal() -> Self {
805        Self {
806            _marker: PhantomData,
807        }
808    }
809}
810impl Deref for XOSC {
811    type Target = xosc::RegisterBlock;
812    #[inline(always)]
813    fn deref(&self) -> &Self::Target {
814        unsafe { &*Self::PTR }
815    }
816}
817impl core::fmt::Debug for XOSC {
818    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
819        f.debug_struct("XOSC").finish()
820    }
821}
822#[doc = "Controls the crystal oscillator"]
823pub mod xosc;
824#[doc = "PLL_SYS"]
825pub struct PLL_SYS {
826    _marker: PhantomData<*const ()>,
827}
828unsafe impl Send for PLL_SYS {}
829impl PLL_SYS {
830    #[doc = r"Pointer to the register block"]
831    pub const PTR: *const pll_sys::RegisterBlock = 0x4002_8000 as *const _;
832    #[doc = r"Return the pointer to the register block"]
833    #[inline(always)]
834    pub const fn ptr() -> *const pll_sys::RegisterBlock {
835        Self::PTR
836    }
837    #[doc = r" Steal an instance of this peripheral"]
838    #[doc = r""]
839    #[doc = r" # Safety"]
840    #[doc = r""]
841    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
842    #[doc = r" that may race with any existing instances, for example by only"]
843    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
844    #[doc = r" original peripheral and using critical sections to coordinate"]
845    #[doc = r" access between multiple new instances."]
846    #[doc = r""]
847    #[doc = r" Additionally, other software such as HALs may rely on only one"]
848    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
849    #[doc = r" no stolen instances are passed to such software."]
850    pub unsafe fn steal() -> Self {
851        Self {
852            _marker: PhantomData,
853        }
854    }
855}
856impl Deref for PLL_SYS {
857    type Target = pll_sys::RegisterBlock;
858    #[inline(always)]
859    fn deref(&self) -> &Self::Target {
860        unsafe { &*Self::PTR }
861    }
862}
863impl core::fmt::Debug for PLL_SYS {
864    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
865        f.debug_struct("PLL_SYS").finish()
866    }
867}
868#[doc = "PLL_SYS"]
869pub mod pll_sys;
870#[doc = "PLL_USB"]
871pub struct PLL_USB {
872    _marker: PhantomData<*const ()>,
873}
874unsafe impl Send for PLL_USB {}
875impl PLL_USB {
876    #[doc = r"Pointer to the register block"]
877    pub const PTR: *const pll_sys::RegisterBlock = 0x4002_c000 as *const _;
878    #[doc = r"Return the pointer to the register block"]
879    #[inline(always)]
880    pub const fn ptr() -> *const pll_sys::RegisterBlock {
881        Self::PTR
882    }
883    #[doc = r" Steal an instance of this peripheral"]
884    #[doc = r""]
885    #[doc = r" # Safety"]
886    #[doc = r""]
887    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
888    #[doc = r" that may race with any existing instances, for example by only"]
889    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
890    #[doc = r" original peripheral and using critical sections to coordinate"]
891    #[doc = r" access between multiple new instances."]
892    #[doc = r""]
893    #[doc = r" Additionally, other software such as HALs may rely on only one"]
894    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
895    #[doc = r" no stolen instances are passed to such software."]
896    pub unsafe fn steal() -> Self {
897        Self {
898            _marker: PhantomData,
899        }
900    }
901}
902impl Deref for PLL_USB {
903    type Target = pll_sys::RegisterBlock;
904    #[inline(always)]
905    fn deref(&self) -> &Self::Target {
906        unsafe { &*Self::PTR }
907    }
908}
909impl core::fmt::Debug for PLL_USB {
910    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
911        f.debug_struct("PLL_USB").finish()
912    }
913}
914#[doc = "PLL_USB"]
915pub use self::pll_sys as pll_usb;
916#[doc = "Register block for busfabric control signals and performance counters"]
917pub struct BUSCTRL {
918    _marker: PhantomData<*const ()>,
919}
920unsafe impl Send for BUSCTRL {}
921impl BUSCTRL {
922    #[doc = r"Pointer to the register block"]
923    pub const PTR: *const busctrl::RegisterBlock = 0x4003_0000 as *const _;
924    #[doc = r"Return the pointer to the register block"]
925    #[inline(always)]
926    pub const fn ptr() -> *const busctrl::RegisterBlock {
927        Self::PTR
928    }
929    #[doc = r" Steal an instance of this peripheral"]
930    #[doc = r""]
931    #[doc = r" # Safety"]
932    #[doc = r""]
933    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
934    #[doc = r" that may race with any existing instances, for example by only"]
935    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
936    #[doc = r" original peripheral and using critical sections to coordinate"]
937    #[doc = r" access between multiple new instances."]
938    #[doc = r""]
939    #[doc = r" Additionally, other software such as HALs may rely on only one"]
940    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
941    #[doc = r" no stolen instances are passed to such software."]
942    pub unsafe fn steal() -> Self {
943        Self {
944            _marker: PhantomData,
945        }
946    }
947}
948impl Deref for BUSCTRL {
949    type Target = busctrl::RegisterBlock;
950    #[inline(always)]
951    fn deref(&self) -> &Self::Target {
952        unsafe { &*Self::PTR }
953    }
954}
955impl core::fmt::Debug for BUSCTRL {
956    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
957        f.debug_struct("BUSCTRL").finish()
958    }
959}
960#[doc = "Register block for busfabric control signals and performance counters"]
961pub mod busctrl;
962#[doc = "UART0"]
963pub struct UART0 {
964    _marker: PhantomData<*const ()>,
965}
966unsafe impl Send for UART0 {}
967impl UART0 {
968    #[doc = r"Pointer to the register block"]
969    pub const PTR: *const uart0::RegisterBlock = 0x4003_4000 as *const _;
970    #[doc = r"Return the pointer to the register block"]
971    #[inline(always)]
972    pub const fn ptr() -> *const uart0::RegisterBlock {
973        Self::PTR
974    }
975    #[doc = r" Steal an instance of this peripheral"]
976    #[doc = r""]
977    #[doc = r" # Safety"]
978    #[doc = r""]
979    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
980    #[doc = r" that may race with any existing instances, for example by only"]
981    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
982    #[doc = r" original peripheral and using critical sections to coordinate"]
983    #[doc = r" access between multiple new instances."]
984    #[doc = r""]
985    #[doc = r" Additionally, other software such as HALs may rely on only one"]
986    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
987    #[doc = r" no stolen instances are passed to such software."]
988    pub unsafe fn steal() -> Self {
989        Self {
990            _marker: PhantomData,
991        }
992    }
993}
994impl Deref for UART0 {
995    type Target = uart0::RegisterBlock;
996    #[inline(always)]
997    fn deref(&self) -> &Self::Target {
998        unsafe { &*Self::PTR }
999    }
1000}
1001impl core::fmt::Debug for UART0 {
1002    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1003        f.debug_struct("UART0").finish()
1004    }
1005}
1006#[doc = "UART0"]
1007pub mod uart0;
1008#[doc = "UART1"]
1009pub struct UART1 {
1010    _marker: PhantomData<*const ()>,
1011}
1012unsafe impl Send for UART1 {}
1013impl UART1 {
1014    #[doc = r"Pointer to the register block"]
1015    pub const PTR: *const uart0::RegisterBlock = 0x4003_8000 as *const _;
1016    #[doc = r"Return the pointer to the register block"]
1017    #[inline(always)]
1018    pub const fn ptr() -> *const uart0::RegisterBlock {
1019        Self::PTR
1020    }
1021    #[doc = r" Steal an instance of this peripheral"]
1022    #[doc = r""]
1023    #[doc = r" # Safety"]
1024    #[doc = r""]
1025    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1026    #[doc = r" that may race with any existing instances, for example by only"]
1027    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1028    #[doc = r" original peripheral and using critical sections to coordinate"]
1029    #[doc = r" access between multiple new instances."]
1030    #[doc = r""]
1031    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1032    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1033    #[doc = r" no stolen instances are passed to such software."]
1034    pub unsafe fn steal() -> Self {
1035        Self {
1036            _marker: PhantomData,
1037        }
1038    }
1039}
1040impl Deref for UART1 {
1041    type Target = uart0::RegisterBlock;
1042    #[inline(always)]
1043    fn deref(&self) -> &Self::Target {
1044        unsafe { &*Self::PTR }
1045    }
1046}
1047impl core::fmt::Debug for UART1 {
1048    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1049        f.debug_struct("UART1").finish()
1050    }
1051}
1052#[doc = "UART1"]
1053pub use self::uart0 as uart1;
1054#[doc = "SPI0"]
1055pub struct SPI0 {
1056    _marker: PhantomData<*const ()>,
1057}
1058unsafe impl Send for SPI0 {}
1059impl SPI0 {
1060    #[doc = r"Pointer to the register block"]
1061    pub const PTR: *const spi0::RegisterBlock = 0x4003_c000 as *const _;
1062    #[doc = r"Return the pointer to the register block"]
1063    #[inline(always)]
1064    pub const fn ptr() -> *const spi0::RegisterBlock {
1065        Self::PTR
1066    }
1067    #[doc = r" Steal an instance of this peripheral"]
1068    #[doc = r""]
1069    #[doc = r" # Safety"]
1070    #[doc = r""]
1071    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1072    #[doc = r" that may race with any existing instances, for example by only"]
1073    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1074    #[doc = r" original peripheral and using critical sections to coordinate"]
1075    #[doc = r" access between multiple new instances."]
1076    #[doc = r""]
1077    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1078    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1079    #[doc = r" no stolen instances are passed to such software."]
1080    pub unsafe fn steal() -> Self {
1081        Self {
1082            _marker: PhantomData,
1083        }
1084    }
1085}
1086impl Deref for SPI0 {
1087    type Target = spi0::RegisterBlock;
1088    #[inline(always)]
1089    fn deref(&self) -> &Self::Target {
1090        unsafe { &*Self::PTR }
1091    }
1092}
1093impl core::fmt::Debug for SPI0 {
1094    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1095        f.debug_struct("SPI0").finish()
1096    }
1097}
1098#[doc = "SPI0"]
1099pub mod spi0;
1100#[doc = "SPI1"]
1101pub struct SPI1 {
1102    _marker: PhantomData<*const ()>,
1103}
1104unsafe impl Send for SPI1 {}
1105impl SPI1 {
1106    #[doc = r"Pointer to the register block"]
1107    pub const PTR: *const spi0::RegisterBlock = 0x4004_0000 as *const _;
1108    #[doc = r"Return the pointer to the register block"]
1109    #[inline(always)]
1110    pub const fn ptr() -> *const spi0::RegisterBlock {
1111        Self::PTR
1112    }
1113    #[doc = r" Steal an instance of this peripheral"]
1114    #[doc = r""]
1115    #[doc = r" # Safety"]
1116    #[doc = r""]
1117    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1118    #[doc = r" that may race with any existing instances, for example by only"]
1119    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1120    #[doc = r" original peripheral and using critical sections to coordinate"]
1121    #[doc = r" access between multiple new instances."]
1122    #[doc = r""]
1123    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1124    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1125    #[doc = r" no stolen instances are passed to such software."]
1126    pub unsafe fn steal() -> Self {
1127        Self {
1128            _marker: PhantomData,
1129        }
1130    }
1131}
1132impl Deref for SPI1 {
1133    type Target = spi0::RegisterBlock;
1134    #[inline(always)]
1135    fn deref(&self) -> &Self::Target {
1136        unsafe { &*Self::PTR }
1137    }
1138}
1139impl core::fmt::Debug for SPI1 {
1140    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1141        f.debug_struct("SPI1").finish()
1142    }
1143}
1144#[doc = "SPI1"]
1145pub use self::spi0 as spi1;
1146#[doc = "DW_apb_i2c address block  
1147
1148 List of configuration constants for the Synopsys I2C hardware (you may see references to these in I2C register header; these are *fixed* values, set at hardware design time):  
1149
1150 IC_ULTRA_FAST_MODE ................ 0x0  
1151 IC_UFM_TBUF_CNT_DEFAULT ........... 0x8  
1152 IC_UFM_SCL_LOW_COUNT .............. 0x0008  
1153 IC_UFM_SCL_HIGH_COUNT ............. 0x0006  
1154 IC_TX_TL .......................... 0x0  
1155 IC_TX_CMD_BLOCK ................... 0x1  
1156 IC_HAS_DMA ........................ 0x1  
1157 IC_HAS_ASYNC_FIFO ................. 0x0  
1158 IC_SMBUS_ARP ...................... 0x0  
1159 IC_FIRST_DATA_BYTE_STATUS ......... 0x1  
1160 IC_INTR_IO ........................ 0x1  
1161 IC_MASTER_MODE .................... 0x1  
1162 IC_DEFAULT_ACK_GENERAL_CALL ....... 0x1  
1163 IC_INTR_POL ....................... 0x1  
1164 IC_OPTIONAL_SAR ................... 0x0  
1165 IC_DEFAULT_TAR_SLAVE_ADDR ......... 0x055  
1166 IC_DEFAULT_SLAVE_ADDR ............. 0x055  
1167 IC_DEFAULT_HS_SPKLEN .............. 0x1  
1168 IC_FS_SCL_HIGH_COUNT .............. 0x0006  
1169 IC_HS_SCL_LOW_COUNT ............... 0x0008  
1170 IC_DEVICE_ID_VALUE ................ 0x0  
1171 IC_10BITADDR_MASTER ............... 0x0  
1172 IC_CLK_FREQ_OPTIMIZATION .......... 0x0  
1173 IC_DEFAULT_FS_SPKLEN .............. 0x7  
1174 IC_ADD_ENCODED_PARAMS ............. 0x0  
1175 IC_DEFAULT_SDA_HOLD ............... 0x000001  
1176 IC_DEFAULT_SDA_SETUP .............. 0x64  
1177 IC_AVOID_RX_FIFO_FLUSH_ON_TX_ABRT . 0x0  
1178 IC_CLOCK_PERIOD ................... 100  
1179 IC_EMPTYFIFO_HOLD_MASTER_EN ....... 1  
1180 IC_RESTART_EN ..................... 0x1  
1181 IC_TX_CMD_BLOCK_DEFAULT ........... 0x0  
1182 IC_BUS_CLEAR_FEATURE .............. 0x0  
1183 IC_CAP_LOADING .................... 100  
1184 IC_FS_SCL_LOW_COUNT ............... 0x000d  
1185 APB_DATA_WIDTH .................... 32  
1186 IC_SDA_STUCK_TIMEOUT_DEFAULT ...... 0xffffffff  
1187 IC_SLV_DATA_NACK_ONLY ............. 0x1  
1188 IC_10BITADDR_SLAVE ................ 0x0  
1189 IC_CLK_TYPE ....................... 0x0  
1190 IC_SMBUS_UDID_MSB ................. 0x0  
1191 IC_SMBUS_SUSPEND_ALERT ............ 0x0  
1192 IC_HS_SCL_HIGH_COUNT .............. 0x0006  
1193 IC_SLV_RESTART_DET_EN ............. 0x1  
1194 IC_SMBUS .......................... 0x0  
1195 IC_OPTIONAL_SAR_DEFAULT ........... 0x0  
1196 IC_PERSISTANT_SLV_ADDR_DEFAULT .... 0x0  
1197 IC_USE_COUNTS ..................... 0x0  
1198 IC_RX_BUFFER_DEPTH ................ 16  
1199 IC_SCL_STUCK_TIMEOUT_DEFAULT ...... 0xffffffff  
1200 IC_RX_FULL_HLD_BUS_EN ............. 0x1  
1201 IC_SLAVE_DISABLE .................. 0x1  
1202 IC_RX_TL .......................... 0x0  
1203 IC_DEVICE_ID ...................... 0x0  
1204 IC_HC_COUNT_VALUES ................ 0x0  
1205 I2C_DYNAMIC_TAR_UPDATE ............ 0  
1206 IC_SMBUS_CLK_LOW_MEXT_DEFAULT ..... 0xffffffff  
1207 IC_SMBUS_CLK_LOW_SEXT_DEFAULT ..... 0xffffffff  
1208 IC_HS_MASTER_CODE ................. 0x1  
1209 IC_SMBUS_RST_IDLE_CNT_DEFAULT ..... 0xffff  
1210 IC_SMBUS_UDID_LSB_DEFAULT ......... 0xffffffff  
1211 IC_SS_SCL_HIGH_COUNT .............. 0x0028  
1212 IC_SS_SCL_LOW_COUNT ............... 0x002f  
1213 IC_MAX_SPEED_MODE ................. 0x2  
1214 IC_STAT_FOR_CLK_STRETCH ........... 0x0  
1215 IC_STOP_DET_IF_MASTER_ACTIVE ...... 0x0  
1216 IC_DEFAULT_UFM_SPKLEN ............. 0x1  
1217 IC_TX_BUFFER_DEPTH ................ 16"]
1218pub struct I2C0 {
1219    _marker: PhantomData<*const ()>,
1220}
1221unsafe impl Send for I2C0 {}
1222impl I2C0 {
1223    #[doc = r"Pointer to the register block"]
1224    pub const PTR: *const i2c0::RegisterBlock = 0x4004_4000 as *const _;
1225    #[doc = r"Return the pointer to the register block"]
1226    #[inline(always)]
1227    pub const fn ptr() -> *const i2c0::RegisterBlock {
1228        Self::PTR
1229    }
1230    #[doc = r" Steal an instance of this peripheral"]
1231    #[doc = r""]
1232    #[doc = r" # Safety"]
1233    #[doc = r""]
1234    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1235    #[doc = r" that may race with any existing instances, for example by only"]
1236    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1237    #[doc = r" original peripheral and using critical sections to coordinate"]
1238    #[doc = r" access between multiple new instances."]
1239    #[doc = r""]
1240    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1241    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1242    #[doc = r" no stolen instances are passed to such software."]
1243    pub unsafe fn steal() -> Self {
1244        Self {
1245            _marker: PhantomData,
1246        }
1247    }
1248}
1249impl Deref for I2C0 {
1250    type Target = i2c0::RegisterBlock;
1251    #[inline(always)]
1252    fn deref(&self) -> &Self::Target {
1253        unsafe { &*Self::PTR }
1254    }
1255}
1256impl core::fmt::Debug for I2C0 {
1257    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1258        f.debug_struct("I2C0").finish()
1259    }
1260}
1261#[doc = "DW_apb_i2c address block  
1262
1263 List of configuration constants for the Synopsys I2C hardware (you may see references to these in I2C register header; these are *fixed* values, set at hardware design time):  
1264
1265 IC_ULTRA_FAST_MODE ................ 0x0  
1266 IC_UFM_TBUF_CNT_DEFAULT ........... 0x8  
1267 IC_UFM_SCL_LOW_COUNT .............. 0x0008  
1268 IC_UFM_SCL_HIGH_COUNT ............. 0x0006  
1269 IC_TX_TL .......................... 0x0  
1270 IC_TX_CMD_BLOCK ................... 0x1  
1271 IC_HAS_DMA ........................ 0x1  
1272 IC_HAS_ASYNC_FIFO ................. 0x0  
1273 IC_SMBUS_ARP ...................... 0x0  
1274 IC_FIRST_DATA_BYTE_STATUS ......... 0x1  
1275 IC_INTR_IO ........................ 0x1  
1276 IC_MASTER_MODE .................... 0x1  
1277 IC_DEFAULT_ACK_GENERAL_CALL ....... 0x1  
1278 IC_INTR_POL ....................... 0x1  
1279 IC_OPTIONAL_SAR ................... 0x0  
1280 IC_DEFAULT_TAR_SLAVE_ADDR ......... 0x055  
1281 IC_DEFAULT_SLAVE_ADDR ............. 0x055  
1282 IC_DEFAULT_HS_SPKLEN .............. 0x1  
1283 IC_FS_SCL_HIGH_COUNT .............. 0x0006  
1284 IC_HS_SCL_LOW_COUNT ............... 0x0008  
1285 IC_DEVICE_ID_VALUE ................ 0x0  
1286 IC_10BITADDR_MASTER ............... 0x0  
1287 IC_CLK_FREQ_OPTIMIZATION .......... 0x0  
1288 IC_DEFAULT_FS_SPKLEN .............. 0x7  
1289 IC_ADD_ENCODED_PARAMS ............. 0x0  
1290 IC_DEFAULT_SDA_HOLD ............... 0x000001  
1291 IC_DEFAULT_SDA_SETUP .............. 0x64  
1292 IC_AVOID_RX_FIFO_FLUSH_ON_TX_ABRT . 0x0  
1293 IC_CLOCK_PERIOD ................... 100  
1294 IC_EMPTYFIFO_HOLD_MASTER_EN ....... 1  
1295 IC_RESTART_EN ..................... 0x1  
1296 IC_TX_CMD_BLOCK_DEFAULT ........... 0x0  
1297 IC_BUS_CLEAR_FEATURE .............. 0x0  
1298 IC_CAP_LOADING .................... 100  
1299 IC_FS_SCL_LOW_COUNT ............... 0x000d  
1300 APB_DATA_WIDTH .................... 32  
1301 IC_SDA_STUCK_TIMEOUT_DEFAULT ...... 0xffffffff  
1302 IC_SLV_DATA_NACK_ONLY ............. 0x1  
1303 IC_10BITADDR_SLAVE ................ 0x0  
1304 IC_CLK_TYPE ....................... 0x0  
1305 IC_SMBUS_UDID_MSB ................. 0x0  
1306 IC_SMBUS_SUSPEND_ALERT ............ 0x0  
1307 IC_HS_SCL_HIGH_COUNT .............. 0x0006  
1308 IC_SLV_RESTART_DET_EN ............. 0x1  
1309 IC_SMBUS .......................... 0x0  
1310 IC_OPTIONAL_SAR_DEFAULT ........... 0x0  
1311 IC_PERSISTANT_SLV_ADDR_DEFAULT .... 0x0  
1312 IC_USE_COUNTS ..................... 0x0  
1313 IC_RX_BUFFER_DEPTH ................ 16  
1314 IC_SCL_STUCK_TIMEOUT_DEFAULT ...... 0xffffffff  
1315 IC_RX_FULL_HLD_BUS_EN ............. 0x1  
1316 IC_SLAVE_DISABLE .................. 0x1  
1317 IC_RX_TL .......................... 0x0  
1318 IC_DEVICE_ID ...................... 0x0  
1319 IC_HC_COUNT_VALUES ................ 0x0  
1320 I2C_DYNAMIC_TAR_UPDATE ............ 0  
1321 IC_SMBUS_CLK_LOW_MEXT_DEFAULT ..... 0xffffffff  
1322 IC_SMBUS_CLK_LOW_SEXT_DEFAULT ..... 0xffffffff  
1323 IC_HS_MASTER_CODE ................. 0x1  
1324 IC_SMBUS_RST_IDLE_CNT_DEFAULT ..... 0xffff  
1325 IC_SMBUS_UDID_LSB_DEFAULT ......... 0xffffffff  
1326 IC_SS_SCL_HIGH_COUNT .............. 0x0028  
1327 IC_SS_SCL_LOW_COUNT ............... 0x002f  
1328 IC_MAX_SPEED_MODE ................. 0x2  
1329 IC_STAT_FOR_CLK_STRETCH ........... 0x0  
1330 IC_STOP_DET_IF_MASTER_ACTIVE ...... 0x0  
1331 IC_DEFAULT_UFM_SPKLEN ............. 0x1  
1332 IC_TX_BUFFER_DEPTH ................ 16"]
1333pub mod i2c0;
1334#[doc = "DW_apb_i2c address block  
1335
1336 List of configuration constants for the Synopsys I2C hardware (you may see references to these in I2C register header; these are *fixed* values, set at hardware design time):  
1337
1338 IC_ULTRA_FAST_MODE ................ 0x0  
1339 IC_UFM_TBUF_CNT_DEFAULT ........... 0x8  
1340 IC_UFM_SCL_LOW_COUNT .............. 0x0008  
1341 IC_UFM_SCL_HIGH_COUNT ............. 0x0006  
1342 IC_TX_TL .......................... 0x0  
1343 IC_TX_CMD_BLOCK ................... 0x1  
1344 IC_HAS_DMA ........................ 0x1  
1345 IC_HAS_ASYNC_FIFO ................. 0x0  
1346 IC_SMBUS_ARP ...................... 0x0  
1347 IC_FIRST_DATA_BYTE_STATUS ......... 0x1  
1348 IC_INTR_IO ........................ 0x1  
1349 IC_MASTER_MODE .................... 0x1  
1350 IC_DEFAULT_ACK_GENERAL_CALL ....... 0x1  
1351 IC_INTR_POL ....................... 0x1  
1352 IC_OPTIONAL_SAR ................... 0x0  
1353 IC_DEFAULT_TAR_SLAVE_ADDR ......... 0x055  
1354 IC_DEFAULT_SLAVE_ADDR ............. 0x055  
1355 IC_DEFAULT_HS_SPKLEN .............. 0x1  
1356 IC_FS_SCL_HIGH_COUNT .............. 0x0006  
1357 IC_HS_SCL_LOW_COUNT ............... 0x0008  
1358 IC_DEVICE_ID_VALUE ................ 0x0  
1359 IC_10BITADDR_MASTER ............... 0x0  
1360 IC_CLK_FREQ_OPTIMIZATION .......... 0x0  
1361 IC_DEFAULT_FS_SPKLEN .............. 0x7  
1362 IC_ADD_ENCODED_PARAMS ............. 0x0  
1363 IC_DEFAULT_SDA_HOLD ............... 0x000001  
1364 IC_DEFAULT_SDA_SETUP .............. 0x64  
1365 IC_AVOID_RX_FIFO_FLUSH_ON_TX_ABRT . 0x0  
1366 IC_CLOCK_PERIOD ................... 100  
1367 IC_EMPTYFIFO_HOLD_MASTER_EN ....... 1  
1368 IC_RESTART_EN ..................... 0x1  
1369 IC_TX_CMD_BLOCK_DEFAULT ........... 0x0  
1370 IC_BUS_CLEAR_FEATURE .............. 0x0  
1371 IC_CAP_LOADING .................... 100  
1372 IC_FS_SCL_LOW_COUNT ............... 0x000d  
1373 APB_DATA_WIDTH .................... 32  
1374 IC_SDA_STUCK_TIMEOUT_DEFAULT ...... 0xffffffff  
1375 IC_SLV_DATA_NACK_ONLY ............. 0x1  
1376 IC_10BITADDR_SLAVE ................ 0x0  
1377 IC_CLK_TYPE ....................... 0x0  
1378 IC_SMBUS_UDID_MSB ................. 0x0  
1379 IC_SMBUS_SUSPEND_ALERT ............ 0x0  
1380 IC_HS_SCL_HIGH_COUNT .............. 0x0006  
1381 IC_SLV_RESTART_DET_EN ............. 0x1  
1382 IC_SMBUS .......................... 0x0  
1383 IC_OPTIONAL_SAR_DEFAULT ........... 0x0  
1384 IC_PERSISTANT_SLV_ADDR_DEFAULT .... 0x0  
1385 IC_USE_COUNTS ..................... 0x0  
1386 IC_RX_BUFFER_DEPTH ................ 16  
1387 IC_SCL_STUCK_TIMEOUT_DEFAULT ...... 0xffffffff  
1388 IC_RX_FULL_HLD_BUS_EN ............. 0x1  
1389 IC_SLAVE_DISABLE .................. 0x1  
1390 IC_RX_TL .......................... 0x0  
1391 IC_DEVICE_ID ...................... 0x0  
1392 IC_HC_COUNT_VALUES ................ 0x0  
1393 I2C_DYNAMIC_TAR_UPDATE ............ 0  
1394 IC_SMBUS_CLK_LOW_MEXT_DEFAULT ..... 0xffffffff  
1395 IC_SMBUS_CLK_LOW_SEXT_DEFAULT ..... 0xffffffff  
1396 IC_HS_MASTER_CODE ................. 0x1  
1397 IC_SMBUS_RST_IDLE_CNT_DEFAULT ..... 0xffff  
1398 IC_SMBUS_UDID_LSB_DEFAULT ......... 0xffffffff  
1399 IC_SS_SCL_HIGH_COUNT .............. 0x0028  
1400 IC_SS_SCL_LOW_COUNT ............... 0x002f  
1401 IC_MAX_SPEED_MODE ................. 0x2  
1402 IC_STAT_FOR_CLK_STRETCH ........... 0x0  
1403 IC_STOP_DET_IF_MASTER_ACTIVE ...... 0x0  
1404 IC_DEFAULT_UFM_SPKLEN ............. 0x1  
1405 IC_TX_BUFFER_DEPTH ................ 16"]
1406pub struct I2C1 {
1407    _marker: PhantomData<*const ()>,
1408}
1409unsafe impl Send for I2C1 {}
1410impl I2C1 {
1411    #[doc = r"Pointer to the register block"]
1412    pub const PTR: *const i2c0::RegisterBlock = 0x4004_8000 as *const _;
1413    #[doc = r"Return the pointer to the register block"]
1414    #[inline(always)]
1415    pub const fn ptr() -> *const i2c0::RegisterBlock {
1416        Self::PTR
1417    }
1418    #[doc = r" Steal an instance of this peripheral"]
1419    #[doc = r""]
1420    #[doc = r" # Safety"]
1421    #[doc = r""]
1422    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1423    #[doc = r" that may race with any existing instances, for example by only"]
1424    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1425    #[doc = r" original peripheral and using critical sections to coordinate"]
1426    #[doc = r" access between multiple new instances."]
1427    #[doc = r""]
1428    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1429    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1430    #[doc = r" no stolen instances are passed to such software."]
1431    pub unsafe fn steal() -> Self {
1432        Self {
1433            _marker: PhantomData,
1434        }
1435    }
1436}
1437impl Deref for I2C1 {
1438    type Target = i2c0::RegisterBlock;
1439    #[inline(always)]
1440    fn deref(&self) -> &Self::Target {
1441        unsafe { &*Self::PTR }
1442    }
1443}
1444impl core::fmt::Debug for I2C1 {
1445    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1446        f.debug_struct("I2C1").finish()
1447    }
1448}
1449#[doc = "DW_apb_i2c address block  
1450
1451 List of configuration constants for the Synopsys I2C hardware (you may see references to these in I2C register header; these are *fixed* values, set at hardware design time):  
1452
1453 IC_ULTRA_FAST_MODE ................ 0x0  
1454 IC_UFM_TBUF_CNT_DEFAULT ........... 0x8  
1455 IC_UFM_SCL_LOW_COUNT .............. 0x0008  
1456 IC_UFM_SCL_HIGH_COUNT ............. 0x0006  
1457 IC_TX_TL .......................... 0x0  
1458 IC_TX_CMD_BLOCK ................... 0x1  
1459 IC_HAS_DMA ........................ 0x1  
1460 IC_HAS_ASYNC_FIFO ................. 0x0  
1461 IC_SMBUS_ARP ...................... 0x0  
1462 IC_FIRST_DATA_BYTE_STATUS ......... 0x1  
1463 IC_INTR_IO ........................ 0x1  
1464 IC_MASTER_MODE .................... 0x1  
1465 IC_DEFAULT_ACK_GENERAL_CALL ....... 0x1  
1466 IC_INTR_POL ....................... 0x1  
1467 IC_OPTIONAL_SAR ................... 0x0  
1468 IC_DEFAULT_TAR_SLAVE_ADDR ......... 0x055  
1469 IC_DEFAULT_SLAVE_ADDR ............. 0x055  
1470 IC_DEFAULT_HS_SPKLEN .............. 0x1  
1471 IC_FS_SCL_HIGH_COUNT .............. 0x0006  
1472 IC_HS_SCL_LOW_COUNT ............... 0x0008  
1473 IC_DEVICE_ID_VALUE ................ 0x0  
1474 IC_10BITADDR_MASTER ............... 0x0  
1475 IC_CLK_FREQ_OPTIMIZATION .......... 0x0  
1476 IC_DEFAULT_FS_SPKLEN .............. 0x7  
1477 IC_ADD_ENCODED_PARAMS ............. 0x0  
1478 IC_DEFAULT_SDA_HOLD ............... 0x000001  
1479 IC_DEFAULT_SDA_SETUP .............. 0x64  
1480 IC_AVOID_RX_FIFO_FLUSH_ON_TX_ABRT . 0x0  
1481 IC_CLOCK_PERIOD ................... 100  
1482 IC_EMPTYFIFO_HOLD_MASTER_EN ....... 1  
1483 IC_RESTART_EN ..................... 0x1  
1484 IC_TX_CMD_BLOCK_DEFAULT ........... 0x0  
1485 IC_BUS_CLEAR_FEATURE .............. 0x0  
1486 IC_CAP_LOADING .................... 100  
1487 IC_FS_SCL_LOW_COUNT ............... 0x000d  
1488 APB_DATA_WIDTH .................... 32  
1489 IC_SDA_STUCK_TIMEOUT_DEFAULT ...... 0xffffffff  
1490 IC_SLV_DATA_NACK_ONLY ............. 0x1  
1491 IC_10BITADDR_SLAVE ................ 0x0  
1492 IC_CLK_TYPE ....................... 0x0  
1493 IC_SMBUS_UDID_MSB ................. 0x0  
1494 IC_SMBUS_SUSPEND_ALERT ............ 0x0  
1495 IC_HS_SCL_HIGH_COUNT .............. 0x0006  
1496 IC_SLV_RESTART_DET_EN ............. 0x1  
1497 IC_SMBUS .......................... 0x0  
1498 IC_OPTIONAL_SAR_DEFAULT ........... 0x0  
1499 IC_PERSISTANT_SLV_ADDR_DEFAULT .... 0x0  
1500 IC_USE_COUNTS ..................... 0x0  
1501 IC_RX_BUFFER_DEPTH ................ 16  
1502 IC_SCL_STUCK_TIMEOUT_DEFAULT ...... 0xffffffff  
1503 IC_RX_FULL_HLD_BUS_EN ............. 0x1  
1504 IC_SLAVE_DISABLE .................. 0x1  
1505 IC_RX_TL .......................... 0x0  
1506 IC_DEVICE_ID ...................... 0x0  
1507 IC_HC_COUNT_VALUES ................ 0x0  
1508 I2C_DYNAMIC_TAR_UPDATE ............ 0  
1509 IC_SMBUS_CLK_LOW_MEXT_DEFAULT ..... 0xffffffff  
1510 IC_SMBUS_CLK_LOW_SEXT_DEFAULT ..... 0xffffffff  
1511 IC_HS_MASTER_CODE ................. 0x1  
1512 IC_SMBUS_RST_IDLE_CNT_DEFAULT ..... 0xffff  
1513 IC_SMBUS_UDID_LSB_DEFAULT ......... 0xffffffff  
1514 IC_SS_SCL_HIGH_COUNT .............. 0x0028  
1515 IC_SS_SCL_LOW_COUNT ............... 0x002f  
1516 IC_MAX_SPEED_MODE ................. 0x2  
1517 IC_STAT_FOR_CLK_STRETCH ........... 0x0  
1518 IC_STOP_DET_IF_MASTER_ACTIVE ...... 0x0  
1519 IC_DEFAULT_UFM_SPKLEN ............. 0x1  
1520 IC_TX_BUFFER_DEPTH ................ 16"]
1521pub use self::i2c0 as i2c1;
1522#[doc = "Control and data interface to SAR ADC"]
1523pub struct ADC {
1524    _marker: PhantomData<*const ()>,
1525}
1526unsafe impl Send for ADC {}
1527impl ADC {
1528    #[doc = r"Pointer to the register block"]
1529    pub const PTR: *const adc::RegisterBlock = 0x4004_c000 as *const _;
1530    #[doc = r"Return the pointer to the register block"]
1531    #[inline(always)]
1532    pub const fn ptr() -> *const adc::RegisterBlock {
1533        Self::PTR
1534    }
1535    #[doc = r" Steal an instance of this peripheral"]
1536    #[doc = r""]
1537    #[doc = r" # Safety"]
1538    #[doc = r""]
1539    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1540    #[doc = r" that may race with any existing instances, for example by only"]
1541    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1542    #[doc = r" original peripheral and using critical sections to coordinate"]
1543    #[doc = r" access between multiple new instances."]
1544    #[doc = r""]
1545    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1546    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1547    #[doc = r" no stolen instances are passed to such software."]
1548    pub unsafe fn steal() -> Self {
1549        Self {
1550            _marker: PhantomData,
1551        }
1552    }
1553}
1554impl Deref for ADC {
1555    type Target = adc::RegisterBlock;
1556    #[inline(always)]
1557    fn deref(&self) -> &Self::Target {
1558        unsafe { &*Self::PTR }
1559    }
1560}
1561impl core::fmt::Debug for ADC {
1562    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1563        f.debug_struct("ADC").finish()
1564    }
1565}
1566#[doc = "Control and data interface to SAR ADC"]
1567pub mod adc;
1568#[doc = "Simple PWM"]
1569pub struct PWM {
1570    _marker: PhantomData<*const ()>,
1571}
1572unsafe impl Send for PWM {}
1573impl PWM {
1574    #[doc = r"Pointer to the register block"]
1575    pub const PTR: *const pwm::RegisterBlock = 0x4005_0000 as *const _;
1576    #[doc = r"Return the pointer to the register block"]
1577    #[inline(always)]
1578    pub const fn ptr() -> *const pwm::RegisterBlock {
1579        Self::PTR
1580    }
1581    #[doc = r" Steal an instance of this peripheral"]
1582    #[doc = r""]
1583    #[doc = r" # Safety"]
1584    #[doc = r""]
1585    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1586    #[doc = r" that may race with any existing instances, for example by only"]
1587    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1588    #[doc = r" original peripheral and using critical sections to coordinate"]
1589    #[doc = r" access between multiple new instances."]
1590    #[doc = r""]
1591    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1592    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1593    #[doc = r" no stolen instances are passed to such software."]
1594    pub unsafe fn steal() -> Self {
1595        Self {
1596            _marker: PhantomData,
1597        }
1598    }
1599}
1600impl Deref for PWM {
1601    type Target = pwm::RegisterBlock;
1602    #[inline(always)]
1603    fn deref(&self) -> &Self::Target {
1604        unsafe { &*Self::PTR }
1605    }
1606}
1607impl core::fmt::Debug for PWM {
1608    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1609        f.debug_struct("PWM").finish()
1610    }
1611}
1612#[doc = "Simple PWM"]
1613pub mod pwm;
1614#[doc = "Controls time and alarms  
1615 time is a 64 bit value indicating the time in usec since power-on  
1616 timeh is the top 32 bits of time & timel is the bottom 32 bits  
1617 to change time write to timelw before timehw  
1618 to read time read from timelr before timehr  
1619 An alarm is set by setting alarm_enable and writing to the corresponding alarm register  
1620 When an alarm is pending, the corresponding alarm_running signal will be high  
1621 An alarm can be cancelled before it has finished by clearing the alarm_enable  
1622 When an alarm fires, the corresponding alarm_irq is set and alarm_running is cleared  
1623 To clear the interrupt write a 1 to the corresponding alarm_irq"]
1624pub struct TIMER {
1625    _marker: PhantomData<*const ()>,
1626}
1627unsafe impl Send for TIMER {}
1628impl TIMER {
1629    #[doc = r"Pointer to the register block"]
1630    pub const PTR: *const timer::RegisterBlock = 0x4005_4000 as *const _;
1631    #[doc = r"Return the pointer to the register block"]
1632    #[inline(always)]
1633    pub const fn ptr() -> *const timer::RegisterBlock {
1634        Self::PTR
1635    }
1636    #[doc = r" Steal an instance of this peripheral"]
1637    #[doc = r""]
1638    #[doc = r" # Safety"]
1639    #[doc = r""]
1640    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1641    #[doc = r" that may race with any existing instances, for example by only"]
1642    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1643    #[doc = r" original peripheral and using critical sections to coordinate"]
1644    #[doc = r" access between multiple new instances."]
1645    #[doc = r""]
1646    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1647    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1648    #[doc = r" no stolen instances are passed to such software."]
1649    pub unsafe fn steal() -> Self {
1650        Self {
1651            _marker: PhantomData,
1652        }
1653    }
1654}
1655impl Deref for TIMER {
1656    type Target = timer::RegisterBlock;
1657    #[inline(always)]
1658    fn deref(&self) -> &Self::Target {
1659        unsafe { &*Self::PTR }
1660    }
1661}
1662impl core::fmt::Debug for TIMER {
1663    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1664        f.debug_struct("TIMER").finish()
1665    }
1666}
1667#[doc = "Controls time and alarms  
1668 time is a 64 bit value indicating the time in usec since power-on  
1669 timeh is the top 32 bits of time &amp; timel is the bottom 32 bits  
1670 to change time write to timelw before timehw  
1671 to read time read from timelr before timehr  
1672 An alarm is set by setting alarm_enable and writing to the corresponding alarm register  
1673 When an alarm is pending, the corresponding alarm_running signal will be high  
1674 An alarm can be cancelled before it has finished by clearing the alarm_enable  
1675 When an alarm fires, the corresponding alarm_irq is set and alarm_running is cleared  
1676 To clear the interrupt write a 1 to the corresponding alarm_irq"]
1677pub mod timer;
1678#[doc = "WATCHDOG"]
1679pub struct WATCHDOG {
1680    _marker: PhantomData<*const ()>,
1681}
1682unsafe impl Send for WATCHDOG {}
1683impl WATCHDOG {
1684    #[doc = r"Pointer to the register block"]
1685    pub const PTR: *const watchdog::RegisterBlock = 0x4005_8000 as *const _;
1686    #[doc = r"Return the pointer to the register block"]
1687    #[inline(always)]
1688    pub const fn ptr() -> *const watchdog::RegisterBlock {
1689        Self::PTR
1690    }
1691    #[doc = r" Steal an instance of this peripheral"]
1692    #[doc = r""]
1693    #[doc = r" # Safety"]
1694    #[doc = r""]
1695    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1696    #[doc = r" that may race with any existing instances, for example by only"]
1697    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1698    #[doc = r" original peripheral and using critical sections to coordinate"]
1699    #[doc = r" access between multiple new instances."]
1700    #[doc = r""]
1701    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1702    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1703    #[doc = r" no stolen instances are passed to such software."]
1704    pub unsafe fn steal() -> Self {
1705        Self {
1706            _marker: PhantomData,
1707        }
1708    }
1709}
1710impl Deref for WATCHDOG {
1711    type Target = watchdog::RegisterBlock;
1712    #[inline(always)]
1713    fn deref(&self) -> &Self::Target {
1714        unsafe { &*Self::PTR }
1715    }
1716}
1717impl core::fmt::Debug for WATCHDOG {
1718    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1719        f.debug_struct("WATCHDOG").finish()
1720    }
1721}
1722#[doc = "WATCHDOG"]
1723pub mod watchdog;
1724#[doc = "Register block to control RTC"]
1725pub struct RTC {
1726    _marker: PhantomData<*const ()>,
1727}
1728unsafe impl Send for RTC {}
1729impl RTC {
1730    #[doc = r"Pointer to the register block"]
1731    pub const PTR: *const rtc::RegisterBlock = 0x4005_c000 as *const _;
1732    #[doc = r"Return the pointer to the register block"]
1733    #[inline(always)]
1734    pub const fn ptr() -> *const rtc::RegisterBlock {
1735        Self::PTR
1736    }
1737    #[doc = r" Steal an instance of this peripheral"]
1738    #[doc = r""]
1739    #[doc = r" # Safety"]
1740    #[doc = r""]
1741    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1742    #[doc = r" that may race with any existing instances, for example by only"]
1743    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1744    #[doc = r" original peripheral and using critical sections to coordinate"]
1745    #[doc = r" access between multiple new instances."]
1746    #[doc = r""]
1747    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1748    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1749    #[doc = r" no stolen instances are passed to such software."]
1750    pub unsafe fn steal() -> Self {
1751        Self {
1752            _marker: PhantomData,
1753        }
1754    }
1755}
1756impl Deref for RTC {
1757    type Target = rtc::RegisterBlock;
1758    #[inline(always)]
1759    fn deref(&self) -> &Self::Target {
1760        unsafe { &*Self::PTR }
1761    }
1762}
1763impl core::fmt::Debug for RTC {
1764    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1765        f.debug_struct("RTC").finish()
1766    }
1767}
1768#[doc = "Register block to control RTC"]
1769pub mod rtc;
1770#[doc = "ROSC"]
1771pub struct ROSC {
1772    _marker: PhantomData<*const ()>,
1773}
1774unsafe impl Send for ROSC {}
1775impl ROSC {
1776    #[doc = r"Pointer to the register block"]
1777    pub const PTR: *const rosc::RegisterBlock = 0x4006_0000 as *const _;
1778    #[doc = r"Return the pointer to the register block"]
1779    #[inline(always)]
1780    pub const fn ptr() -> *const rosc::RegisterBlock {
1781        Self::PTR
1782    }
1783    #[doc = r" Steal an instance of this peripheral"]
1784    #[doc = r""]
1785    #[doc = r" # Safety"]
1786    #[doc = r""]
1787    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1788    #[doc = r" that may race with any existing instances, for example by only"]
1789    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1790    #[doc = r" original peripheral and using critical sections to coordinate"]
1791    #[doc = r" access between multiple new instances."]
1792    #[doc = r""]
1793    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1794    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1795    #[doc = r" no stolen instances are passed to such software."]
1796    pub unsafe fn steal() -> Self {
1797        Self {
1798            _marker: PhantomData,
1799        }
1800    }
1801}
1802impl Deref for ROSC {
1803    type Target = rosc::RegisterBlock;
1804    #[inline(always)]
1805    fn deref(&self) -> &Self::Target {
1806        unsafe { &*Self::PTR }
1807    }
1808}
1809impl core::fmt::Debug for ROSC {
1810    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1811        f.debug_struct("ROSC").finish()
1812    }
1813}
1814#[doc = "ROSC"]
1815pub mod rosc;
1816#[doc = "control and status for on-chip voltage regulator and chip level reset subsystem"]
1817pub struct VREG_AND_CHIP_RESET {
1818    _marker: PhantomData<*const ()>,
1819}
1820unsafe impl Send for VREG_AND_CHIP_RESET {}
1821impl VREG_AND_CHIP_RESET {
1822    #[doc = r"Pointer to the register block"]
1823    pub const PTR: *const vreg_and_chip_reset::RegisterBlock = 0x4006_4000 as *const _;
1824    #[doc = r"Return the pointer to the register block"]
1825    #[inline(always)]
1826    pub const fn ptr() -> *const vreg_and_chip_reset::RegisterBlock {
1827        Self::PTR
1828    }
1829    #[doc = r" Steal an instance of this peripheral"]
1830    #[doc = r""]
1831    #[doc = r" # Safety"]
1832    #[doc = r""]
1833    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1834    #[doc = r" that may race with any existing instances, for example by only"]
1835    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1836    #[doc = r" original peripheral and using critical sections to coordinate"]
1837    #[doc = r" access between multiple new instances."]
1838    #[doc = r""]
1839    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1840    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1841    #[doc = r" no stolen instances are passed to such software."]
1842    pub unsafe fn steal() -> Self {
1843        Self {
1844            _marker: PhantomData,
1845        }
1846    }
1847}
1848impl Deref for VREG_AND_CHIP_RESET {
1849    type Target = vreg_and_chip_reset::RegisterBlock;
1850    #[inline(always)]
1851    fn deref(&self) -> &Self::Target {
1852        unsafe { &*Self::PTR }
1853    }
1854}
1855impl core::fmt::Debug for VREG_AND_CHIP_RESET {
1856    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1857        f.debug_struct("VREG_AND_CHIP_RESET").finish()
1858    }
1859}
1860#[doc = "control and status for on-chip voltage regulator and chip level reset subsystem"]
1861pub mod vreg_and_chip_reset;
1862#[doc = "Testbench manager. Allows the programmer to know what platform their software is running on."]
1863pub struct TBMAN {
1864    _marker: PhantomData<*const ()>,
1865}
1866unsafe impl Send for TBMAN {}
1867impl TBMAN {
1868    #[doc = r"Pointer to the register block"]
1869    pub const PTR: *const tbman::RegisterBlock = 0x4006_c000 as *const _;
1870    #[doc = r"Return the pointer to the register block"]
1871    #[inline(always)]
1872    pub const fn ptr() -> *const tbman::RegisterBlock {
1873        Self::PTR
1874    }
1875    #[doc = r" Steal an instance of this peripheral"]
1876    #[doc = r""]
1877    #[doc = r" # Safety"]
1878    #[doc = r""]
1879    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1880    #[doc = r" that may race with any existing instances, for example by only"]
1881    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1882    #[doc = r" original peripheral and using critical sections to coordinate"]
1883    #[doc = r" access between multiple new instances."]
1884    #[doc = r""]
1885    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1886    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1887    #[doc = r" no stolen instances are passed to such software."]
1888    pub unsafe fn steal() -> Self {
1889        Self {
1890            _marker: PhantomData,
1891        }
1892    }
1893}
1894impl Deref for TBMAN {
1895    type Target = tbman::RegisterBlock;
1896    #[inline(always)]
1897    fn deref(&self) -> &Self::Target {
1898        unsafe { &*Self::PTR }
1899    }
1900}
1901impl core::fmt::Debug for TBMAN {
1902    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1903        f.debug_struct("TBMAN").finish()
1904    }
1905}
1906#[doc = "Testbench manager. Allows the programmer to know what platform their software is running on."]
1907pub mod tbman;
1908#[doc = "DMA with separate read and write masters"]
1909pub struct DMA {
1910    _marker: PhantomData<*const ()>,
1911}
1912unsafe impl Send for DMA {}
1913impl DMA {
1914    #[doc = r"Pointer to the register block"]
1915    pub const PTR: *const dma::RegisterBlock = 0x5000_0000 as *const _;
1916    #[doc = r"Return the pointer to the register block"]
1917    #[inline(always)]
1918    pub const fn ptr() -> *const dma::RegisterBlock {
1919        Self::PTR
1920    }
1921    #[doc = r" Steal an instance of this peripheral"]
1922    #[doc = r""]
1923    #[doc = r" # Safety"]
1924    #[doc = r""]
1925    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1926    #[doc = r" that may race with any existing instances, for example by only"]
1927    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1928    #[doc = r" original peripheral and using critical sections to coordinate"]
1929    #[doc = r" access between multiple new instances."]
1930    #[doc = r""]
1931    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1932    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1933    #[doc = r" no stolen instances are passed to such software."]
1934    pub unsafe fn steal() -> Self {
1935        Self {
1936            _marker: PhantomData,
1937        }
1938    }
1939}
1940impl Deref for DMA {
1941    type Target = dma::RegisterBlock;
1942    #[inline(always)]
1943    fn deref(&self) -> &Self::Target {
1944        unsafe { &*Self::PTR }
1945    }
1946}
1947impl core::fmt::Debug for DMA {
1948    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1949        f.debug_struct("DMA").finish()
1950    }
1951}
1952#[doc = "DMA with separate read and write masters"]
1953pub mod dma;
1954#[doc = "DPRAM layout for USB device."]
1955pub struct USBCTRL_DPRAM {
1956    _marker: PhantomData<*const ()>,
1957}
1958unsafe impl Send for USBCTRL_DPRAM {}
1959impl USBCTRL_DPRAM {
1960    #[doc = r"Pointer to the register block"]
1961    pub const PTR: *const usbctrl_dpram::RegisterBlock = 0x5010_0000 as *const _;
1962    #[doc = r"Return the pointer to the register block"]
1963    #[inline(always)]
1964    pub const fn ptr() -> *const usbctrl_dpram::RegisterBlock {
1965        Self::PTR
1966    }
1967    #[doc = r" Steal an instance of this peripheral"]
1968    #[doc = r""]
1969    #[doc = r" # Safety"]
1970    #[doc = r""]
1971    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1972    #[doc = r" that may race with any existing instances, for example by only"]
1973    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1974    #[doc = r" original peripheral and using critical sections to coordinate"]
1975    #[doc = r" access between multiple new instances."]
1976    #[doc = r""]
1977    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1978    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1979    #[doc = r" no stolen instances are passed to such software."]
1980    pub unsafe fn steal() -> Self {
1981        Self {
1982            _marker: PhantomData,
1983        }
1984    }
1985}
1986impl Deref for USBCTRL_DPRAM {
1987    type Target = usbctrl_dpram::RegisterBlock;
1988    #[inline(always)]
1989    fn deref(&self) -> &Self::Target {
1990        unsafe { &*Self::PTR }
1991    }
1992}
1993impl core::fmt::Debug for USBCTRL_DPRAM {
1994    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1995        f.debug_struct("USBCTRL_DPRAM").finish()
1996    }
1997}
1998#[doc = "DPRAM layout for USB device."]
1999pub mod usbctrl_dpram;
2000#[doc = "USB FS/LS controller device registers"]
2001pub struct USBCTRL_REGS {
2002    _marker: PhantomData<*const ()>,
2003}
2004unsafe impl Send for USBCTRL_REGS {}
2005impl USBCTRL_REGS {
2006    #[doc = r"Pointer to the register block"]
2007    pub const PTR: *const usbctrl_regs::RegisterBlock = 0x5011_0000 as *const _;
2008    #[doc = r"Return the pointer to the register block"]
2009    #[inline(always)]
2010    pub const fn ptr() -> *const usbctrl_regs::RegisterBlock {
2011        Self::PTR
2012    }
2013    #[doc = r" Steal an instance of this peripheral"]
2014    #[doc = r""]
2015    #[doc = r" # Safety"]
2016    #[doc = r""]
2017    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2018    #[doc = r" that may race with any existing instances, for example by only"]
2019    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2020    #[doc = r" original peripheral and using critical sections to coordinate"]
2021    #[doc = r" access between multiple new instances."]
2022    #[doc = r""]
2023    #[doc = r" Additionally, other software such as HALs may rely on only one"]
2024    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2025    #[doc = r" no stolen instances are passed to such software."]
2026    pub unsafe fn steal() -> Self {
2027        Self {
2028            _marker: PhantomData,
2029        }
2030    }
2031}
2032impl Deref for USBCTRL_REGS {
2033    type Target = usbctrl_regs::RegisterBlock;
2034    #[inline(always)]
2035    fn deref(&self) -> &Self::Target {
2036        unsafe { &*Self::PTR }
2037    }
2038}
2039impl core::fmt::Debug for USBCTRL_REGS {
2040    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2041        f.debug_struct("USBCTRL_REGS").finish()
2042    }
2043}
2044#[doc = "USB FS/LS controller device registers"]
2045pub mod usbctrl_regs;
2046#[doc = "Programmable IO block"]
2047pub struct PIO0 {
2048    _marker: PhantomData<*const ()>,
2049}
2050unsafe impl Send for PIO0 {}
2051impl PIO0 {
2052    #[doc = r"Pointer to the register block"]
2053    pub const PTR: *const pio0::RegisterBlock = 0x5020_0000 as *const _;
2054    #[doc = r"Return the pointer to the register block"]
2055    #[inline(always)]
2056    pub const fn ptr() -> *const pio0::RegisterBlock {
2057        Self::PTR
2058    }
2059    #[doc = r" Steal an instance of this peripheral"]
2060    #[doc = r""]
2061    #[doc = r" # Safety"]
2062    #[doc = r""]
2063    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2064    #[doc = r" that may race with any existing instances, for example by only"]
2065    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2066    #[doc = r" original peripheral and using critical sections to coordinate"]
2067    #[doc = r" access between multiple new instances."]
2068    #[doc = r""]
2069    #[doc = r" Additionally, other software such as HALs may rely on only one"]
2070    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2071    #[doc = r" no stolen instances are passed to such software."]
2072    pub unsafe fn steal() -> Self {
2073        Self {
2074            _marker: PhantomData,
2075        }
2076    }
2077}
2078impl Deref for PIO0 {
2079    type Target = pio0::RegisterBlock;
2080    #[inline(always)]
2081    fn deref(&self) -> &Self::Target {
2082        unsafe { &*Self::PTR }
2083    }
2084}
2085impl core::fmt::Debug for PIO0 {
2086    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2087        f.debug_struct("PIO0").finish()
2088    }
2089}
2090#[doc = "Programmable IO block"]
2091pub mod pio0;
2092#[doc = "Programmable IO block"]
2093pub struct PIO1 {
2094    _marker: PhantomData<*const ()>,
2095}
2096unsafe impl Send for PIO1 {}
2097impl PIO1 {
2098    #[doc = r"Pointer to the register block"]
2099    pub const PTR: *const pio0::RegisterBlock = 0x5030_0000 as *const _;
2100    #[doc = r"Return the pointer to the register block"]
2101    #[inline(always)]
2102    pub const fn ptr() -> *const pio0::RegisterBlock {
2103        Self::PTR
2104    }
2105    #[doc = r" Steal an instance of this peripheral"]
2106    #[doc = r""]
2107    #[doc = r" # Safety"]
2108    #[doc = r""]
2109    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2110    #[doc = r" that may race with any existing instances, for example by only"]
2111    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2112    #[doc = r" original peripheral and using critical sections to coordinate"]
2113    #[doc = r" access between multiple new instances."]
2114    #[doc = r""]
2115    #[doc = r" Additionally, other software such as HALs may rely on only one"]
2116    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2117    #[doc = r" no stolen instances are passed to such software."]
2118    pub unsafe fn steal() -> Self {
2119        Self {
2120            _marker: PhantomData,
2121        }
2122    }
2123}
2124impl Deref for PIO1 {
2125    type Target = pio0::RegisterBlock;
2126    #[inline(always)]
2127    fn deref(&self) -> &Self::Target {
2128        unsafe { &*Self::PTR }
2129    }
2130}
2131impl core::fmt::Debug for PIO1 {
2132    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2133        f.debug_struct("PIO1").finish()
2134    }
2135}
2136#[doc = "Programmable IO block"]
2137pub use self::pio0 as pio1;
2138#[doc = "Single-cycle IO block  
2139 Provides core-local and inter-core hardware for the two processors, with single-cycle access."]
2140pub struct SIO {
2141    _marker: PhantomData<*const ()>,
2142}
2143unsafe impl Send for SIO {}
2144impl SIO {
2145    #[doc = r"Pointer to the register block"]
2146    pub const PTR: *const sio::RegisterBlock = 0xd000_0000 as *const _;
2147    #[doc = r"Return the pointer to the register block"]
2148    #[inline(always)]
2149    pub const fn ptr() -> *const sio::RegisterBlock {
2150        Self::PTR
2151    }
2152    #[doc = r" Steal an instance of this peripheral"]
2153    #[doc = r""]
2154    #[doc = r" # Safety"]
2155    #[doc = r""]
2156    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2157    #[doc = r" that may race with any existing instances, for example by only"]
2158    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2159    #[doc = r" original peripheral and using critical sections to coordinate"]
2160    #[doc = r" access between multiple new instances."]
2161    #[doc = r""]
2162    #[doc = r" Additionally, other software such as HALs may rely on only one"]
2163    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2164    #[doc = r" no stolen instances are passed to such software."]
2165    pub unsafe fn steal() -> Self {
2166        Self {
2167            _marker: PhantomData,
2168        }
2169    }
2170}
2171impl Deref for SIO {
2172    type Target = sio::RegisterBlock;
2173    #[inline(always)]
2174    fn deref(&self) -> &Self::Target {
2175        unsafe { &*Self::PTR }
2176    }
2177}
2178impl core::fmt::Debug for SIO {
2179    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2180        f.debug_struct("SIO").finish()
2181    }
2182}
2183#[doc = "Single-cycle IO block  
2184 Provides core-local and inter-core hardware for the two processors, with single-cycle access."]
2185pub mod sio;
2186#[doc = "PPB"]
2187pub struct PPB {
2188    _marker: PhantomData<*const ()>,
2189}
2190unsafe impl Send for PPB {}
2191impl PPB {
2192    #[doc = r"Pointer to the register block"]
2193    pub const PTR: *const ppb::RegisterBlock = 0xe000_0000 as *const _;
2194    #[doc = r"Return the pointer to the register block"]
2195    #[inline(always)]
2196    pub const fn ptr() -> *const ppb::RegisterBlock {
2197        Self::PTR
2198    }
2199    #[doc = r" Steal an instance of this peripheral"]
2200    #[doc = r""]
2201    #[doc = r" # Safety"]
2202    #[doc = r""]
2203    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2204    #[doc = r" that may race with any existing instances, for example by only"]
2205    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2206    #[doc = r" original peripheral and using critical sections to coordinate"]
2207    #[doc = r" access between multiple new instances."]
2208    #[doc = r""]
2209    #[doc = r" Additionally, other software such as HALs may rely on only one"]
2210    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2211    #[doc = r" no stolen instances are passed to such software."]
2212    pub unsafe fn steal() -> Self {
2213        Self {
2214            _marker: PhantomData,
2215        }
2216    }
2217}
2218impl Deref for PPB {
2219    type Target = ppb::RegisterBlock;
2220    #[inline(always)]
2221    fn deref(&self) -> &Self::Target {
2222        unsafe { &*Self::PTR }
2223    }
2224}
2225impl core::fmt::Debug for PPB {
2226    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2227        f.debug_struct("PPB").finish()
2228    }
2229}
2230#[doc = "PPB"]
2231pub mod ppb;
2232#[no_mangle]
2233static mut DEVICE_PERIPHERALS: bool = false;
2234#[doc = r" All the peripherals."]
2235#[allow(non_snake_case)]
2236pub struct Peripherals {
2237    #[doc = "ADC"]
2238    pub ADC: ADC,
2239    #[doc = "BUSCTRL"]
2240    pub BUSCTRL: BUSCTRL,
2241    #[doc = "CLOCKS"]
2242    pub CLOCKS: CLOCKS,
2243    #[doc = "DMA"]
2244    pub DMA: DMA,
2245    #[doc = "I2C0"]
2246    pub I2C0: I2C0,
2247    #[doc = "I2C1"]
2248    pub I2C1: I2C1,
2249    #[doc = "IO_BANK0"]
2250    pub IO_BANK0: IO_BANK0,
2251    #[doc = "IO_QSPI"]
2252    pub IO_QSPI: IO_QSPI,
2253    #[doc = "PADS_BANK0"]
2254    pub PADS_BANK0: PADS_BANK0,
2255    #[doc = "PADS_QSPI"]
2256    pub PADS_QSPI: PADS_QSPI,
2257    #[doc = "PIO0"]
2258    pub PIO0: PIO0,
2259    #[doc = "PIO1"]
2260    pub PIO1: PIO1,
2261    #[doc = "PLL_SYS"]
2262    pub PLL_SYS: PLL_SYS,
2263    #[doc = "PLL_USB"]
2264    pub PLL_USB: PLL_USB,
2265    #[doc = "PPB"]
2266    pub PPB: PPB,
2267    #[doc = "PSM"]
2268    pub PSM: PSM,
2269    #[doc = "PWM"]
2270    pub PWM: PWM,
2271    #[doc = "RESETS"]
2272    pub RESETS: RESETS,
2273    #[doc = "ROSC"]
2274    pub ROSC: ROSC,
2275    #[doc = "RTC"]
2276    pub RTC: RTC,
2277    #[doc = "SIO"]
2278    pub SIO: SIO,
2279    #[doc = "SPI0"]
2280    pub SPI0: SPI0,
2281    #[doc = "SPI1"]
2282    pub SPI1: SPI1,
2283    #[doc = "SYSCFG"]
2284    pub SYSCFG: SYSCFG,
2285    #[doc = "SYSINFO"]
2286    pub SYSINFO: SYSINFO,
2287    #[doc = "TBMAN"]
2288    pub TBMAN: TBMAN,
2289    #[doc = "TIMER"]
2290    pub TIMER: TIMER,
2291    #[doc = "UART0"]
2292    pub UART0: UART0,
2293    #[doc = "UART1"]
2294    pub UART1: UART1,
2295    #[doc = "USBCTRL_DPRAM"]
2296    pub USBCTRL_DPRAM: USBCTRL_DPRAM,
2297    #[doc = "USBCTRL_REGS"]
2298    pub USBCTRL_REGS: USBCTRL_REGS,
2299    #[doc = "VREG_AND_CHIP_RESET"]
2300    pub VREG_AND_CHIP_RESET: VREG_AND_CHIP_RESET,
2301    #[doc = "WATCHDOG"]
2302    pub WATCHDOG: WATCHDOG,
2303    #[doc = "XIP_CTRL"]
2304    pub XIP_CTRL: XIP_CTRL,
2305    #[doc = "XIP_SSI"]
2306    pub XIP_SSI: XIP_SSI,
2307    #[doc = "XOSC"]
2308    pub XOSC: XOSC,
2309}
2310impl Peripherals {
2311    #[doc = r" Returns all the peripherals *once*."]
2312    #[cfg(feature = "critical-section")]
2313    #[inline]
2314    pub fn take() -> Option<Self> {
2315        critical_section::with(|_| {
2316            if unsafe { DEVICE_PERIPHERALS } {
2317                return None;
2318            }
2319            Some(unsafe { Peripherals::steal() })
2320        })
2321    }
2322    #[doc = r" Unchecked version of `Peripherals::take`."]
2323    #[doc = r""]
2324    #[doc = r" # Safety"]
2325    #[doc = r""]
2326    #[doc = r" Each of the returned peripherals must be used at most once."]
2327    #[inline]
2328    pub unsafe fn steal() -> Self {
2329        DEVICE_PERIPHERALS = true;
2330        Peripherals {
2331            XIP_CTRL: XIP_CTRL {
2332                _marker: PhantomData,
2333            },
2334            XIP_SSI: XIP_SSI {
2335                _marker: PhantomData,
2336            },
2337            SYSINFO: SYSINFO {
2338                _marker: PhantomData,
2339            },
2340            SYSCFG: SYSCFG {
2341                _marker: PhantomData,
2342            },
2343            CLOCKS: CLOCKS {
2344                _marker: PhantomData,
2345            },
2346            RESETS: RESETS {
2347                _marker: PhantomData,
2348            },
2349            PSM: PSM {
2350                _marker: PhantomData,
2351            },
2352            IO_BANK0: IO_BANK0 {
2353                _marker: PhantomData,
2354            },
2355            IO_QSPI: IO_QSPI {
2356                _marker: PhantomData,
2357            },
2358            PADS_BANK0: PADS_BANK0 {
2359                _marker: PhantomData,
2360            },
2361            PADS_QSPI: PADS_QSPI {
2362                _marker: PhantomData,
2363            },
2364            XOSC: XOSC {
2365                _marker: PhantomData,
2366            },
2367            PLL_SYS: PLL_SYS {
2368                _marker: PhantomData,
2369            },
2370            PLL_USB: PLL_USB {
2371                _marker: PhantomData,
2372            },
2373            BUSCTRL: BUSCTRL {
2374                _marker: PhantomData,
2375            },
2376            UART0: UART0 {
2377                _marker: PhantomData,
2378            },
2379            UART1: UART1 {
2380                _marker: PhantomData,
2381            },
2382            SPI0: SPI0 {
2383                _marker: PhantomData,
2384            },
2385            SPI1: SPI1 {
2386                _marker: PhantomData,
2387            },
2388            I2C0: I2C0 {
2389                _marker: PhantomData,
2390            },
2391            I2C1: I2C1 {
2392                _marker: PhantomData,
2393            },
2394            ADC: ADC {
2395                _marker: PhantomData,
2396            },
2397            PWM: PWM {
2398                _marker: PhantomData,
2399            },
2400            TIMER: TIMER {
2401                _marker: PhantomData,
2402            },
2403            WATCHDOG: WATCHDOG {
2404                _marker: PhantomData,
2405            },
2406            RTC: RTC {
2407                _marker: PhantomData,
2408            },
2409            ROSC: ROSC {
2410                _marker: PhantomData,
2411            },
2412            VREG_AND_CHIP_RESET: VREG_AND_CHIP_RESET {
2413                _marker: PhantomData,
2414            },
2415            TBMAN: TBMAN {
2416                _marker: PhantomData,
2417            },
2418            DMA: DMA {
2419                _marker: PhantomData,
2420            },
2421            USBCTRL_DPRAM: USBCTRL_DPRAM {
2422                _marker: PhantomData,
2423            },
2424            USBCTRL_REGS: USBCTRL_REGS {
2425                _marker: PhantomData,
2426            },
2427            PIO0: PIO0 {
2428                _marker: PhantomData,
2429            },
2430            PIO1: PIO1 {
2431                _marker: PhantomData,
2432            },
2433            SIO: SIO {
2434                _marker: PhantomData,
2435            },
2436            PPB: PPB {
2437                _marker: PhantomData,
2438            },
2439        }
2440    }
2441}