cw32f030_hal/svd/
mod.rs

1#![doc = "Peripheral access API for TEMPLATE microcontrollers (generated using svd2rust v0.30.2 ( ))\n\nYou can find an overview of the generated API [here].\n\nAPI features to be included in the [next]
2svd2rust release can be generated by cloning the svd2rust [repository], checking out the above commit, and running `cargo doc --open`.\n\n[here]: https://docs.rs/svd2rust/0.30.2/svd2rust/#peripheral-api\n[next]: https://github.com/rust-embedded/svd2rust/blob/master/CHANGELOG.md#unreleased\n[repository]: https://github.com/rust-embedded/svd2rust"]
3#![deny(dead_code)]
4#![deny(improper_ctypes)]
5#![deny(missing_docs)]
6#![deny(no_mangle_generic_items)]
7#![deny(non_shorthand_field_patterns)]
8#![deny(overflowing_literals)]
9#![deny(path_statements)]
10#![deny(patterns_in_fns_without_body)]
11#![deny(unconditional_recursion)]
12#![deny(unused_allocation)]
13#![deny(unused_comparisons)]
14#![deny(unused_parens)]
15#![deny(while_true)]
16#![allow(non_camel_case_types)]
17#![allow(non_snake_case)]
18use core::marker::PhantomData;
19use core::ops::Deref;
20#[doc = r"Number available in the NVIC for configuring priority"]
21pub const NVIC_PRIO_BITS: u8 = 3;
22#[cfg(feature = "rt")]
23pub use self::Interrupt as interrupt;
24pub use cortex_m::peripheral::Peripherals as CorePeripherals;
25pub use cortex_m::peripheral::{CBP, CPUID, DCB, DWT, FPB, ITM, MPU, NVIC, SCB, SYST, TPIU};
26#[cfg(feature = "rt")]
27pub use cortex_m_rt::interrupt;
28#[allow(unused_imports)]
29use generic::*;
30#[doc = r"Common register and bit access and modify traits"]
31pub mod generic;
32#[cfg(feature = "rt")]
33extern "C" {
34    fn WDT();
35    fn LVD();
36    fn RTC();
37    fn FLASHRAM();
38    fn RCC();
39    fn GPIOA();
40    fn GPIOB();
41    fn GPIOC();
42    fn GPIOF();
43    fn DMACH1();
44    fn DMACH23();
45    fn DMACH45();
46    fn ADC();
47    fn ATIM();
48    fn VC1();
49    fn VC2();
50    fn GTIM1();
51    fn GTIM2();
52    fn GTIM3();
53    fn GTIM4();
54    fn BTIM1();
55    fn BTIM2();
56    fn BTIM3();
57    fn I2C1();
58    fn I2C2();
59    fn SPI1();
60    fn SPI2();
61    fn UART1();
62    fn UART2();
63    fn UART3();
64    fn AWT();
65    fn FAULT();
66}
67#[doc(hidden)]
68pub union Vector {
69    _handler: unsafe extern "C" fn(),
70    _reserved: u32,
71}
72#[cfg(feature = "rt")]
73#[doc(hidden)]
74#[link_section = ".vector_table.interrupts"]
75#[no_mangle]
76pub static __INTERRUPTS: [Vector; 32] = [
77    Vector { _handler: WDT },
78    Vector { _handler: LVD },
79    Vector { _handler: RTC },
80    Vector { _handler: FLASHRAM },
81    Vector { _handler: RCC },
82    Vector { _handler: GPIOA },
83    Vector { _handler: GPIOB },
84    Vector { _handler: GPIOC },
85    Vector { _handler: GPIOF },
86    Vector { _handler: DMACH1 },
87    Vector { _handler: DMACH23 },
88    Vector { _handler: DMACH45 },
89    Vector { _handler: ADC },
90    Vector { _handler: ATIM },
91    Vector { _handler: VC1 },
92    Vector { _handler: VC2 },
93    Vector { _handler: GTIM1 },
94    Vector { _handler: GTIM2 },
95    Vector { _handler: GTIM3 },
96    Vector { _handler: GTIM4 },
97    Vector { _handler: BTIM1 },
98    Vector { _handler: BTIM2 },
99    Vector { _handler: BTIM3 },
100    Vector { _handler: I2C1 },
101    Vector { _handler: I2C2 },
102    Vector { _handler: SPI1 },
103    Vector { _handler: SPI2 },
104    Vector { _handler: UART1 },
105    Vector { _handler: UART2 },
106    Vector { _handler: UART3 },
107    Vector { _handler: AWT },
108    Vector { _handler: FAULT },
109];
110#[doc = r"Enumeration of all the interrupts."]
111#[derive(Copy, Clone, Debug, PartialEq, Eq)]
112#[repr(u16)]
113pub enum Interrupt {
114    #[doc = "0 - Watch Dog Timer Interrupt"]
115    WDT = 0,
116    #[doc = "1 - Low Voltage Detect Interrupt"]
117    LVD = 1,
118    #[doc = "2 - Real Time Clock Interrupt"]
119    RTC = 2,
120    #[doc = "3 - Flash/RAM Interrupt"]
121    FLASHRAM = 3,
122    #[doc = "4 - RCC Interupt"]
123    RCC = 4,
124    #[doc = "5 - GPIOA Interrupt"]
125    GPIOA = 5,
126    #[doc = "6 - GPIOB Interrupt"]
127    GPIOB = 6,
128    #[doc = "7 - GPIOC Interrupt"]
129    GPIOC = 7,
130    #[doc = "8 - GPIOF Interrupt"]
131    GPIOF = 8,
132    #[doc = "9 - DMA Channel 1 Interrupt"]
133    DMACH1 = 9,
134    #[doc = "10 - DMA Channel 2/3 Interrupt"]
135    DMACH23 = 10,
136    #[doc = "11 - DMA Channel 2/3 Interrupt"]
137    DMACH45 = 11,
138    #[doc = "12 - ADC Interrupt"]
139    ADC = 12,
140    #[doc = "13 - Advanced Timer Interrupt"]
141    ATIM = 13,
142    #[doc = "14 - Voltage Comparator 1 Interrupt"]
143    VC1 = 14,
144    #[doc = "15 - Voltage Comparator 2 Interrupt"]
145    VC2 = 15,
146    #[doc = "16 - General Timer1 Interrupt"]
147    GTIM1 = 16,
148    #[doc = "17 - General Timer2 Interrupt"]
149    GTIM2 = 17,
150    #[doc = "18 - General Timer3 Interrupt"]
151    GTIM3 = 18,
152    #[doc = "19 - General Timer4 Interrupt"]
153    GTIM4 = 19,
154    #[doc = "20 - Base Timer1 Interrupt"]
155    BTIM1 = 20,
156    #[doc = "21 - Base Timer2 Interrupt"]
157    BTIM2 = 21,
158    #[doc = "22 - Base Timer3 Interrupt"]
159    BTIM3 = 22,
160    #[doc = "23 - I2C1 Interrupt"]
161    I2C1 = 23,
162    #[doc = "24 - I2C2 Interrput"]
163    I2C2 = 24,
164    #[doc = "25 - SPI1 Interrupt"]
165    SPI1 = 25,
166    #[doc = "26 - SPI2 Interrupt"]
167    SPI2 = 26,
168    #[doc = "27 - UART1 Interrupt"]
169    UART1 = 27,
170    #[doc = "28 - UART2 Interrupt"]
171    UART2 = 28,
172    #[doc = "29 - UART3 Interrupt"]
173    UART3 = 29,
174    #[doc = "30 - Auto Wakeup Timer Interrupt"]
175    AWT = 30,
176    #[doc = "31 - FAULT Interrupt"]
177    FAULT = 31,
178}
179unsafe impl cortex_m::interrupt::InterruptNumber for Interrupt {
180    #[inline(always)]
181    fn number(self) -> u16 {
182        self as u16
183    }
184}
185#[doc = "desc ADC"]
186pub struct ADC {
187    _marker: PhantomData<*const ()>,
188}
189unsafe impl Send for ADC {}
190impl ADC {
191    #[doc = r"Pointer to the register block"]
192    pub const PTR: *const adc::RegisterBlock = 0x4001_2400 as *const _;
193    #[doc = r"Return the pointer to the register block"]
194    #[inline(always)]
195    pub const fn ptr() -> *const adc::RegisterBlock {
196        Self::PTR
197    }
198    #[doc = r" Steal an instance of this peripheral"]
199    #[doc = r""]
200    #[doc = r" # Safety"]
201    #[doc = r""]
202    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
203    #[doc = r" that may race with any existing instances, for example by only"]
204    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
205    #[doc = r" original peripheral and using critical sections to coordinate"]
206    #[doc = r" access between multiple new instances."]
207    #[doc = r""]
208    #[doc = r" Additionally, other software such as HALs may rely on only one"]
209    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
210    #[doc = r" no stolen instances are passed to such software."]
211    pub unsafe fn steal() -> Self {
212        Self {
213            _marker: PhantomData,
214        }
215    }
216}
217impl Deref for ADC {
218    type Target = adc::RegisterBlock;
219    #[inline(always)]
220    fn deref(&self) -> &Self::Target {
221        unsafe { &*Self::PTR }
222    }
223}
224impl core::fmt::Debug for ADC {
225    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
226        f.debug_struct("ADC").finish()
227    }
228}
229#[doc = "desc ADC"]
230pub mod adc;
231#[doc = "desc ATIM"]
232pub struct ATIM {
233    _marker: PhantomData<*const ()>,
234}
235unsafe impl Send for ATIM {}
236impl ATIM {
237    #[doc = r"Pointer to the register block"]
238    pub const PTR: *const atim::RegisterBlock = 0x4001_2c00 as *const _;
239    #[doc = r"Return the pointer to the register block"]
240    #[inline(always)]
241    pub const fn ptr() -> *const atim::RegisterBlock {
242        Self::PTR
243    }
244    #[doc = r" Steal an instance of this peripheral"]
245    #[doc = r""]
246    #[doc = r" # Safety"]
247    #[doc = r""]
248    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
249    #[doc = r" that may race with any existing instances, for example by only"]
250    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
251    #[doc = r" original peripheral and using critical sections to coordinate"]
252    #[doc = r" access between multiple new instances."]
253    #[doc = r""]
254    #[doc = r" Additionally, other software such as HALs may rely on only one"]
255    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
256    #[doc = r" no stolen instances are passed to such software."]
257    pub unsafe fn steal() -> Self {
258        Self {
259            _marker: PhantomData,
260        }
261    }
262}
263impl Deref for ATIM {
264    type Target = atim::RegisterBlock;
265    #[inline(always)]
266    fn deref(&self) -> &Self::Target {
267        unsafe { &*Self::PTR }
268    }
269}
270impl core::fmt::Debug for ATIM {
271    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
272        f.debug_struct("ATIM").finish()
273    }
274}
275#[doc = "desc ATIM"]
276pub mod atim;
277#[doc = "desc AWT"]
278pub struct AWT {
279    _marker: PhantomData<*const ()>,
280}
281unsafe impl Send for AWT {}
282impl AWT {
283    #[doc = r"Pointer to the register block"]
284    pub const PTR: *const awt::RegisterBlock = 0x4001_4c00 as *const _;
285    #[doc = r"Return the pointer to the register block"]
286    #[inline(always)]
287    pub const fn ptr() -> *const awt::RegisterBlock {
288        Self::PTR
289    }
290    #[doc = r" Steal an instance of this peripheral"]
291    #[doc = r""]
292    #[doc = r" # Safety"]
293    #[doc = r""]
294    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
295    #[doc = r" that may race with any existing instances, for example by only"]
296    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
297    #[doc = r" original peripheral and using critical sections to coordinate"]
298    #[doc = r" access between multiple new instances."]
299    #[doc = r""]
300    #[doc = r" Additionally, other software such as HALs may rely on only one"]
301    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
302    #[doc = r" no stolen instances are passed to such software."]
303    pub unsafe fn steal() -> Self {
304        Self {
305            _marker: PhantomData,
306        }
307    }
308}
309impl Deref for AWT {
310    type Target = awt::RegisterBlock;
311    #[inline(always)]
312    fn deref(&self) -> &Self::Target {
313        unsafe { &*Self::PTR }
314    }
315}
316impl core::fmt::Debug for AWT {
317    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
318        f.debug_struct("AWT").finish()
319    }
320}
321#[doc = "desc AWT"]
322pub mod awt;
323#[doc = "Base Timer 1"]
324pub struct BTIM1 {
325    _marker: PhantomData<*const ()>,
326}
327unsafe impl Send for BTIM1 {}
328impl BTIM1 {
329    #[doc = r"Pointer to the register block"]
330    pub const PTR: *const btim1::RegisterBlock = 0x4001_4800 as *const _;
331    #[doc = r"Return the pointer to the register block"]
332    #[inline(always)]
333    pub const fn ptr() -> *const btim1::RegisterBlock {
334        Self::PTR
335    }
336    #[doc = r" Steal an instance of this peripheral"]
337    #[doc = r""]
338    #[doc = r" # Safety"]
339    #[doc = r""]
340    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
341    #[doc = r" that may race with any existing instances, for example by only"]
342    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
343    #[doc = r" original peripheral and using critical sections to coordinate"]
344    #[doc = r" access between multiple new instances."]
345    #[doc = r""]
346    #[doc = r" Additionally, other software such as HALs may rely on only one"]
347    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
348    #[doc = r" no stolen instances are passed to such software."]
349    pub unsafe fn steal() -> Self {
350        Self {
351            _marker: PhantomData,
352        }
353    }
354}
355impl Deref for BTIM1 {
356    type Target = btim1::RegisterBlock;
357    #[inline(always)]
358    fn deref(&self) -> &Self::Target {
359        unsafe { &*Self::PTR }
360    }
361}
362impl core::fmt::Debug for BTIM1 {
363    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
364        f.debug_struct("BTIM1").finish()
365    }
366}
367#[doc = "Base Timer 1"]
368pub mod btim1;
369#[doc = "Base Timer 2"]
370pub struct BTIM2 {
371    _marker: PhantomData<*const ()>,
372}
373unsafe impl Send for BTIM2 {}
374impl BTIM2 {
375    #[doc = r"Pointer to the register block"]
376    pub const PTR: *const btim1::RegisterBlock = 0x4001_4900 as *const _;
377    #[doc = r"Return the pointer to the register block"]
378    #[inline(always)]
379    pub const fn ptr() -> *const btim1::RegisterBlock {
380        Self::PTR
381    }
382    #[doc = r" Steal an instance of this peripheral"]
383    #[doc = r""]
384    #[doc = r" # Safety"]
385    #[doc = r""]
386    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
387    #[doc = r" that may race with any existing instances, for example by only"]
388    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
389    #[doc = r" original peripheral and using critical sections to coordinate"]
390    #[doc = r" access between multiple new instances."]
391    #[doc = r""]
392    #[doc = r" Additionally, other software such as HALs may rely on only one"]
393    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
394    #[doc = r" no stolen instances are passed to such software."]
395    pub unsafe fn steal() -> Self {
396        Self {
397            _marker: PhantomData,
398        }
399    }
400}
401impl Deref for BTIM2 {
402    type Target = btim1::RegisterBlock;
403    #[inline(always)]
404    fn deref(&self) -> &Self::Target {
405        unsafe { &*Self::PTR }
406    }
407}
408impl core::fmt::Debug for BTIM2 {
409    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
410        f.debug_struct("BTIM2").finish()
411    }
412}
413#[doc = "Base Timer 2"]
414pub use self::btim1 as btim2;
415#[doc = "Base Timer 3"]
416pub struct BTIM3 {
417    _marker: PhantomData<*const ()>,
418}
419unsafe impl Send for BTIM3 {}
420impl BTIM3 {
421    #[doc = r"Pointer to the register block"]
422    pub const PTR: *const btim1::RegisterBlock = 0x4001_4a00 as *const _;
423    #[doc = r"Return the pointer to the register block"]
424    #[inline(always)]
425    pub const fn ptr() -> *const btim1::RegisterBlock {
426        Self::PTR
427    }
428    #[doc = r" Steal an instance of this peripheral"]
429    #[doc = r""]
430    #[doc = r" # Safety"]
431    #[doc = r""]
432    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
433    #[doc = r" that may race with any existing instances, for example by only"]
434    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
435    #[doc = r" original peripheral and using critical sections to coordinate"]
436    #[doc = r" access between multiple new instances."]
437    #[doc = r""]
438    #[doc = r" Additionally, other software such as HALs may rely on only one"]
439    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
440    #[doc = r" no stolen instances are passed to such software."]
441    pub unsafe fn steal() -> Self {
442        Self {
443            _marker: PhantomData,
444        }
445    }
446}
447impl Deref for BTIM3 {
448    type Target = btim1::RegisterBlock;
449    #[inline(always)]
450    fn deref(&self) -> &Self::Target {
451        unsafe { &*Self::PTR }
452    }
453}
454impl core::fmt::Debug for BTIM3 {
455    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
456        f.debug_struct("BTIM3").finish()
457    }
458}
459#[doc = "Base Timer 3"]
460pub use self::btim1 as btim3;
461#[doc = "desc CRC"]
462pub struct CRC {
463    _marker: PhantomData<*const ()>,
464}
465unsafe impl Send for CRC {}
466impl CRC {
467    #[doc = r"Pointer to the register block"]
468    pub const PTR: *const crc::RegisterBlock = 0x4002_3000 as *const _;
469    #[doc = r"Return the pointer to the register block"]
470    #[inline(always)]
471    pub const fn ptr() -> *const crc::RegisterBlock {
472        Self::PTR
473    }
474    #[doc = r" Steal an instance of this peripheral"]
475    #[doc = r""]
476    #[doc = r" # Safety"]
477    #[doc = r""]
478    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
479    #[doc = r" that may race with any existing instances, for example by only"]
480    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
481    #[doc = r" original peripheral and using critical sections to coordinate"]
482    #[doc = r" access between multiple new instances."]
483    #[doc = r""]
484    #[doc = r" Additionally, other software such as HALs may rely on only one"]
485    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
486    #[doc = r" no stolen instances are passed to such software."]
487    pub unsafe fn steal() -> Self {
488        Self {
489            _marker: PhantomData,
490        }
491    }
492}
493impl Deref for CRC {
494    type Target = crc::RegisterBlock;
495    #[inline(always)]
496    fn deref(&self) -> &Self::Target {
497        unsafe { &*Self::PTR }
498    }
499}
500impl core::fmt::Debug for CRC {
501    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
502        f.debug_struct("CRC").finish()
503    }
504}
505#[doc = "desc CRC"]
506pub mod crc;
507#[doc = "desc DMA"]
508pub struct DMA {
509    _marker: PhantomData<*const ()>,
510}
511unsafe impl Send for DMA {}
512impl DMA {
513    #[doc = r"Pointer to the register block"]
514    pub const PTR: *const dma::RegisterBlock = 0x4002_0000 as *const _;
515    #[doc = r"Return the pointer to the register block"]
516    #[inline(always)]
517    pub const fn ptr() -> *const dma::RegisterBlock {
518        Self::PTR
519    }
520    #[doc = r" Steal an instance of this peripheral"]
521    #[doc = r""]
522    #[doc = r" # Safety"]
523    #[doc = r""]
524    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
525    #[doc = r" that may race with any existing instances, for example by only"]
526    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
527    #[doc = r" original peripheral and using critical sections to coordinate"]
528    #[doc = r" access between multiple new instances."]
529    #[doc = r""]
530    #[doc = r" Additionally, other software such as HALs may rely on only one"]
531    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
532    #[doc = r" no stolen instances are passed to such software."]
533    pub unsafe fn steal() -> Self {
534        Self {
535            _marker: PhantomData,
536        }
537    }
538}
539impl Deref for DMA {
540    type Target = dma::RegisterBlock;
541    #[inline(always)]
542    fn deref(&self) -> &Self::Target {
543        unsafe { &*Self::PTR }
544    }
545}
546impl core::fmt::Debug for DMA {
547    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
548        f.debug_struct("DMA").finish()
549    }
550}
551#[doc = "desc DMA"]
552pub mod dma;
553#[doc = "DMA Channel 1"]
554pub struct DMACHANNEL1 {
555    _marker: PhantomData<*const ()>,
556}
557unsafe impl Send for DMACHANNEL1 {}
558impl DMACHANNEL1 {
559    #[doc = r"Pointer to the register block"]
560    pub const PTR: *const dmachannel1::RegisterBlock = 0x4002_0020 as *const _;
561    #[doc = r"Return the pointer to the register block"]
562    #[inline(always)]
563    pub const fn ptr() -> *const dmachannel1::RegisterBlock {
564        Self::PTR
565    }
566    #[doc = r" Steal an instance of this peripheral"]
567    #[doc = r""]
568    #[doc = r" # Safety"]
569    #[doc = r""]
570    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
571    #[doc = r" that may race with any existing instances, for example by only"]
572    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
573    #[doc = r" original peripheral and using critical sections to coordinate"]
574    #[doc = r" access between multiple new instances."]
575    #[doc = r""]
576    #[doc = r" Additionally, other software such as HALs may rely on only one"]
577    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
578    #[doc = r" no stolen instances are passed to such software."]
579    pub unsafe fn steal() -> Self {
580        Self {
581            _marker: PhantomData,
582        }
583    }
584}
585impl Deref for DMACHANNEL1 {
586    type Target = dmachannel1::RegisterBlock;
587    #[inline(always)]
588    fn deref(&self) -> &Self::Target {
589        unsafe { &*Self::PTR }
590    }
591}
592impl core::fmt::Debug for DMACHANNEL1 {
593    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
594        f.debug_struct("DMACHANNEL1").finish()
595    }
596}
597#[doc = "DMA Channel 1"]
598pub mod dmachannel1;
599#[doc = "DMA Channel 2"]
600pub struct DMACHANNEL2 {
601    _marker: PhantomData<*const ()>,
602}
603unsafe impl Send for DMACHANNEL2 {}
604impl DMACHANNEL2 {
605    #[doc = r"Pointer to the register block"]
606    pub const PTR: *const dmachannel1::RegisterBlock = 0x4002_0040 as *const _;
607    #[doc = r"Return the pointer to the register block"]
608    #[inline(always)]
609    pub const fn ptr() -> *const dmachannel1::RegisterBlock {
610        Self::PTR
611    }
612    #[doc = r" Steal an instance of this peripheral"]
613    #[doc = r""]
614    #[doc = r" # Safety"]
615    #[doc = r""]
616    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
617    #[doc = r" that may race with any existing instances, for example by only"]
618    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
619    #[doc = r" original peripheral and using critical sections to coordinate"]
620    #[doc = r" access between multiple new instances."]
621    #[doc = r""]
622    #[doc = r" Additionally, other software such as HALs may rely on only one"]
623    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
624    #[doc = r" no stolen instances are passed to such software."]
625    pub unsafe fn steal() -> Self {
626        Self {
627            _marker: PhantomData,
628        }
629    }
630}
631impl Deref for DMACHANNEL2 {
632    type Target = dmachannel1::RegisterBlock;
633    #[inline(always)]
634    fn deref(&self) -> &Self::Target {
635        unsafe { &*Self::PTR }
636    }
637}
638impl core::fmt::Debug for DMACHANNEL2 {
639    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
640        f.debug_struct("DMACHANNEL2").finish()
641    }
642}
643#[doc = "DMA Channel 2"]
644pub use self::dmachannel1 as dmachannel2;
645#[doc = "DMA Channel 3"]
646pub struct DMACHANNEL3 {
647    _marker: PhantomData<*const ()>,
648}
649unsafe impl Send for DMACHANNEL3 {}
650impl DMACHANNEL3 {
651    #[doc = r"Pointer to the register block"]
652    pub const PTR: *const dmachannel1::RegisterBlock = 0x4002_0060 as *const _;
653    #[doc = r"Return the pointer to the register block"]
654    #[inline(always)]
655    pub const fn ptr() -> *const dmachannel1::RegisterBlock {
656        Self::PTR
657    }
658    #[doc = r" Steal an instance of this peripheral"]
659    #[doc = r""]
660    #[doc = r" # Safety"]
661    #[doc = r""]
662    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
663    #[doc = r" that may race with any existing instances, for example by only"]
664    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
665    #[doc = r" original peripheral and using critical sections to coordinate"]
666    #[doc = r" access between multiple new instances."]
667    #[doc = r""]
668    #[doc = r" Additionally, other software such as HALs may rely on only one"]
669    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
670    #[doc = r" no stolen instances are passed to such software."]
671    pub unsafe fn steal() -> Self {
672        Self {
673            _marker: PhantomData,
674        }
675    }
676}
677impl Deref for DMACHANNEL3 {
678    type Target = dmachannel1::RegisterBlock;
679    #[inline(always)]
680    fn deref(&self) -> &Self::Target {
681        unsafe { &*Self::PTR }
682    }
683}
684impl core::fmt::Debug for DMACHANNEL3 {
685    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
686        f.debug_struct("DMACHANNEL3").finish()
687    }
688}
689#[doc = "DMA Channel 3"]
690pub use self::dmachannel1 as dmachannel3;
691#[doc = "DMA Channel 4"]
692pub struct DMACHANNEL4 {
693    _marker: PhantomData<*const ()>,
694}
695unsafe impl Send for DMACHANNEL4 {}
696impl DMACHANNEL4 {
697    #[doc = r"Pointer to the register block"]
698    pub const PTR: *const dmachannel1::RegisterBlock = 0x4002_0080 as *const _;
699    #[doc = r"Return the pointer to the register block"]
700    #[inline(always)]
701    pub const fn ptr() -> *const dmachannel1::RegisterBlock {
702        Self::PTR
703    }
704    #[doc = r" Steal an instance of this peripheral"]
705    #[doc = r""]
706    #[doc = r" # Safety"]
707    #[doc = r""]
708    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
709    #[doc = r" that may race with any existing instances, for example by only"]
710    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
711    #[doc = r" original peripheral and using critical sections to coordinate"]
712    #[doc = r" access between multiple new instances."]
713    #[doc = r""]
714    #[doc = r" Additionally, other software such as HALs may rely on only one"]
715    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
716    #[doc = r" no stolen instances are passed to such software."]
717    pub unsafe fn steal() -> Self {
718        Self {
719            _marker: PhantomData,
720        }
721    }
722}
723impl Deref for DMACHANNEL4 {
724    type Target = dmachannel1::RegisterBlock;
725    #[inline(always)]
726    fn deref(&self) -> &Self::Target {
727        unsafe { &*Self::PTR }
728    }
729}
730impl core::fmt::Debug for DMACHANNEL4 {
731    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
732        f.debug_struct("DMACHANNEL4").finish()
733    }
734}
735#[doc = "DMA Channel 4"]
736pub use self::dmachannel1 as dmachannel4;
737#[doc = "DMA Channel 5"]
738pub struct DMACHANNEL5 {
739    _marker: PhantomData<*const ()>,
740}
741unsafe impl Send for DMACHANNEL5 {}
742impl DMACHANNEL5 {
743    #[doc = r"Pointer to the register block"]
744    pub const PTR: *const dmachannel1::RegisterBlock = 0x4002_00a0 as *const _;
745    #[doc = r"Return the pointer to the register block"]
746    #[inline(always)]
747    pub const fn ptr() -> *const dmachannel1::RegisterBlock {
748        Self::PTR
749    }
750    #[doc = r" Steal an instance of this peripheral"]
751    #[doc = r""]
752    #[doc = r" # Safety"]
753    #[doc = r""]
754    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
755    #[doc = r" that may race with any existing instances, for example by only"]
756    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
757    #[doc = r" original peripheral and using critical sections to coordinate"]
758    #[doc = r" access between multiple new instances."]
759    #[doc = r""]
760    #[doc = r" Additionally, other software such as HALs may rely on only one"]
761    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
762    #[doc = r" no stolen instances are passed to such software."]
763    pub unsafe fn steal() -> Self {
764        Self {
765            _marker: PhantomData,
766        }
767    }
768}
769impl Deref for DMACHANNEL5 {
770    type Target = dmachannel1::RegisterBlock;
771    #[inline(always)]
772    fn deref(&self) -> &Self::Target {
773        unsafe { &*Self::PTR }
774    }
775}
776impl core::fmt::Debug for DMACHANNEL5 {
777    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
778        f.debug_struct("DMACHANNEL5").finish()
779    }
780}
781#[doc = "DMA Channel 5"]
782pub use self::dmachannel1 as dmachannel5;
783#[doc = "desc FLASH"]
784pub struct FLASH {
785    _marker: PhantomData<*const ()>,
786}
787unsafe impl Send for FLASH {}
788impl FLASH {
789    #[doc = r"Pointer to the register block"]
790    pub const PTR: *const flash::RegisterBlock = 0x4002_2000 as *const _;
791    #[doc = r"Return the pointer to the register block"]
792    #[inline(always)]
793    pub const fn ptr() -> *const flash::RegisterBlock {
794        Self::PTR
795    }
796    #[doc = r" Steal an instance of this peripheral"]
797    #[doc = r""]
798    #[doc = r" # Safety"]
799    #[doc = r""]
800    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
801    #[doc = r" that may race with any existing instances, for example by only"]
802    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
803    #[doc = r" original peripheral and using critical sections to coordinate"]
804    #[doc = r" access between multiple new instances."]
805    #[doc = r""]
806    #[doc = r" Additionally, other software such as HALs may rely on only one"]
807    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
808    #[doc = r" no stolen instances are passed to such software."]
809    pub unsafe fn steal() -> Self {
810        Self {
811            _marker: PhantomData,
812        }
813    }
814}
815impl Deref for FLASH {
816    type Target = flash::RegisterBlock;
817    #[inline(always)]
818    fn deref(&self) -> &Self::Target {
819        unsafe { &*Self::PTR }
820    }
821}
822impl core::fmt::Debug for FLASH {
823    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
824        f.debug_struct("FLASH").finish()
825    }
826}
827#[doc = "desc FLASH"]
828pub mod flash;
829#[doc = "desc GPIOA"]
830pub struct GPIOA {
831    _marker: PhantomData<*const ()>,
832}
833unsafe impl Send for GPIOA {}
834impl GPIOA {
835    #[doc = r"Pointer to the register block"]
836    pub const PTR: *const gpioa::RegisterBlock = 0x4800_0000 as *const _;
837    #[doc = r"Return the pointer to the register block"]
838    #[inline(always)]
839    pub const fn ptr() -> *const gpioa::RegisterBlock {
840        Self::PTR
841    }
842    #[doc = r" Steal an instance of this peripheral"]
843    #[doc = r""]
844    #[doc = r" # Safety"]
845    #[doc = r""]
846    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
847    #[doc = r" that may race with any existing instances, for example by only"]
848    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
849    #[doc = r" original peripheral and using critical sections to coordinate"]
850    #[doc = r" access between multiple new instances."]
851    #[doc = r""]
852    #[doc = r" Additionally, other software such as HALs may rely on only one"]
853    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
854    #[doc = r" no stolen instances are passed to such software."]
855    pub unsafe fn steal() -> Self {
856        Self {
857            _marker: PhantomData,
858        }
859    }
860}
861impl Deref for GPIOA {
862    type Target = gpioa::RegisterBlock;
863    #[inline(always)]
864    fn deref(&self) -> &Self::Target {
865        unsafe { &*Self::PTR }
866    }
867}
868impl core::fmt::Debug for GPIOA {
869    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
870        f.debug_struct("GPIOA").finish()
871    }
872}
873#[doc = "desc GPIOA"]
874pub mod gpioa;
875#[doc = "desc GPIOB"]
876pub struct GPIOB {
877    _marker: PhantomData<*const ()>,
878}
879unsafe impl Send for GPIOB {}
880impl GPIOB {
881    #[doc = r"Pointer to the register block"]
882    pub const PTR: *const gpioa::RegisterBlock = 0x4800_0400 as *const _;
883    #[doc = r"Return the pointer to the register block"]
884    #[inline(always)]
885    pub const fn ptr() -> *const gpioa::RegisterBlock {
886        Self::PTR
887    }
888    #[doc = r" Steal an instance of this peripheral"]
889    #[doc = r""]
890    #[doc = r" # Safety"]
891    #[doc = r""]
892    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
893    #[doc = r" that may race with any existing instances, for example by only"]
894    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
895    #[doc = r" original peripheral and using critical sections to coordinate"]
896    #[doc = r" access between multiple new instances."]
897    #[doc = r""]
898    #[doc = r" Additionally, other software such as HALs may rely on only one"]
899    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
900    #[doc = r" no stolen instances are passed to such software."]
901    pub unsafe fn steal() -> Self {
902        Self {
903            _marker: PhantomData,
904        }
905    }
906}
907impl Deref for GPIOB {
908    type Target = gpioa::RegisterBlock;
909    #[inline(always)]
910    fn deref(&self) -> &Self::Target {
911        unsafe { &*Self::PTR }
912    }
913}
914impl core::fmt::Debug for GPIOB {
915    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
916        f.debug_struct("GPIOB").finish()
917    }
918}
919#[doc = "desc GPIOB"]
920pub use self::gpioa as gpiob;
921#[doc = "desc GPIOC"]
922pub struct GPIOC {
923    _marker: PhantomData<*const ()>,
924}
925unsafe impl Send for GPIOC {}
926impl GPIOC {
927    #[doc = r"Pointer to the register block"]
928    pub const PTR: *const gpioc::RegisterBlock = 0x4800_0800 as *const _;
929    #[doc = r"Return the pointer to the register block"]
930    #[inline(always)]
931    pub const fn ptr() -> *const gpioc::RegisterBlock {
932        Self::PTR
933    }
934    #[doc = r" Steal an instance of this peripheral"]
935    #[doc = r""]
936    #[doc = r" # Safety"]
937    #[doc = r""]
938    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
939    #[doc = r" that may race with any existing instances, for example by only"]
940    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
941    #[doc = r" original peripheral and using critical sections to coordinate"]
942    #[doc = r" access between multiple new instances."]
943    #[doc = r""]
944    #[doc = r" Additionally, other software such as HALs may rely on only one"]
945    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
946    #[doc = r" no stolen instances are passed to such software."]
947    pub unsafe fn steal() -> Self {
948        Self {
949            _marker: PhantomData,
950        }
951    }
952}
953impl Deref for GPIOC {
954    type Target = gpioc::RegisterBlock;
955    #[inline(always)]
956    fn deref(&self) -> &Self::Target {
957        unsafe { &*Self::PTR }
958    }
959}
960impl core::fmt::Debug for GPIOC {
961    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
962        f.debug_struct("GPIOC").finish()
963    }
964}
965#[doc = "desc GPIOC"]
966pub mod gpioc;
967#[doc = "desc GPIOF"]
968pub struct GPIOF {
969    _marker: PhantomData<*const ()>,
970}
971unsafe impl Send for GPIOF {}
972impl GPIOF {
973    #[doc = r"Pointer to the register block"]
974    pub const PTR: *const gpiof::RegisterBlock = 0x4800_1400 as *const _;
975    #[doc = r"Return the pointer to the register block"]
976    #[inline(always)]
977    pub const fn ptr() -> *const gpiof::RegisterBlock {
978        Self::PTR
979    }
980    #[doc = r" Steal an instance of this peripheral"]
981    #[doc = r""]
982    #[doc = r" # Safety"]
983    #[doc = r""]
984    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
985    #[doc = r" that may race with any existing instances, for example by only"]
986    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
987    #[doc = r" original peripheral and using critical sections to coordinate"]
988    #[doc = r" access between multiple new instances."]
989    #[doc = r""]
990    #[doc = r" Additionally, other software such as HALs may rely on only one"]
991    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
992    #[doc = r" no stolen instances are passed to such software."]
993    pub unsafe fn steal() -> Self {
994        Self {
995            _marker: PhantomData,
996        }
997    }
998}
999impl Deref for GPIOF {
1000    type Target = gpiof::RegisterBlock;
1001    #[inline(always)]
1002    fn deref(&self) -> &Self::Target {
1003        unsafe { &*Self::PTR }
1004    }
1005}
1006impl core::fmt::Debug for GPIOF {
1007    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1008        f.debug_struct("GPIOF").finish()
1009    }
1010}
1011#[doc = "desc GPIOF"]
1012pub mod gpiof;
1013#[doc = "General Timer 1"]
1014pub struct GTIM1 {
1015    _marker: PhantomData<*const ()>,
1016}
1017unsafe impl Send for GTIM1 {}
1018impl GTIM1 {
1019    #[doc = r"Pointer to the register block"]
1020    pub const PTR: *const gtim1::RegisterBlock = 0x4000_0400 as *const _;
1021    #[doc = r"Return the pointer to the register block"]
1022    #[inline(always)]
1023    pub const fn ptr() -> *const gtim1::RegisterBlock {
1024        Self::PTR
1025    }
1026    #[doc = r" Steal an instance of this peripheral"]
1027    #[doc = r""]
1028    #[doc = r" # Safety"]
1029    #[doc = r""]
1030    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1031    #[doc = r" that may race with any existing instances, for example by only"]
1032    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1033    #[doc = r" original peripheral and using critical sections to coordinate"]
1034    #[doc = r" access between multiple new instances."]
1035    #[doc = r""]
1036    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1037    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1038    #[doc = r" no stolen instances are passed to such software."]
1039    pub unsafe fn steal() -> Self {
1040        Self {
1041            _marker: PhantomData,
1042        }
1043    }
1044}
1045impl Deref for GTIM1 {
1046    type Target = gtim1::RegisterBlock;
1047    #[inline(always)]
1048    fn deref(&self) -> &Self::Target {
1049        unsafe { &*Self::PTR }
1050    }
1051}
1052impl core::fmt::Debug for GTIM1 {
1053    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1054        f.debug_struct("GTIM1").finish()
1055    }
1056}
1057#[doc = "General Timer 1"]
1058pub mod gtim1;
1059#[doc = "General Timer 2"]
1060pub struct GTIM2 {
1061    _marker: PhantomData<*const ()>,
1062}
1063unsafe impl Send for GTIM2 {}
1064impl GTIM2 {
1065    #[doc = r"Pointer to the register block"]
1066    pub const PTR: *const gtim1::RegisterBlock = 0x4000_1000 as *const _;
1067    #[doc = r"Return the pointer to the register block"]
1068    #[inline(always)]
1069    pub const fn ptr() -> *const gtim1::RegisterBlock {
1070        Self::PTR
1071    }
1072    #[doc = r" Steal an instance of this peripheral"]
1073    #[doc = r""]
1074    #[doc = r" # Safety"]
1075    #[doc = r""]
1076    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1077    #[doc = r" that may race with any existing instances, for example by only"]
1078    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1079    #[doc = r" original peripheral and using critical sections to coordinate"]
1080    #[doc = r" access between multiple new instances."]
1081    #[doc = r""]
1082    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1083    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1084    #[doc = r" no stolen instances are passed to such software."]
1085    pub unsafe fn steal() -> Self {
1086        Self {
1087            _marker: PhantomData,
1088        }
1089    }
1090}
1091impl Deref for GTIM2 {
1092    type Target = gtim1::RegisterBlock;
1093    #[inline(always)]
1094    fn deref(&self) -> &Self::Target {
1095        unsafe { &*Self::PTR }
1096    }
1097}
1098impl core::fmt::Debug for GTIM2 {
1099    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1100        f.debug_struct("GTIM2").finish()
1101    }
1102}
1103#[doc = "General Timer 2"]
1104pub use self::gtim1 as gtim2;
1105#[doc = "General Timer 3"]
1106pub struct GTIM3 {
1107    _marker: PhantomData<*const ()>,
1108}
1109unsafe impl Send for GTIM3 {}
1110impl GTIM3 {
1111    #[doc = r"Pointer to the register block"]
1112    pub const PTR: *const gtim1::RegisterBlock = 0x4001_4000 as *const _;
1113    #[doc = r"Return the pointer to the register block"]
1114    #[inline(always)]
1115    pub const fn ptr() -> *const gtim1::RegisterBlock {
1116        Self::PTR
1117    }
1118    #[doc = r" Steal an instance of this peripheral"]
1119    #[doc = r""]
1120    #[doc = r" # Safety"]
1121    #[doc = r""]
1122    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1123    #[doc = r" that may race with any existing instances, for example by only"]
1124    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1125    #[doc = r" original peripheral and using critical sections to coordinate"]
1126    #[doc = r" access between multiple new instances."]
1127    #[doc = r""]
1128    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1129    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1130    #[doc = r" no stolen instances are passed to such software."]
1131    pub unsafe fn steal() -> Self {
1132        Self {
1133            _marker: PhantomData,
1134        }
1135    }
1136}
1137impl Deref for GTIM3 {
1138    type Target = gtim1::RegisterBlock;
1139    #[inline(always)]
1140    fn deref(&self) -> &Self::Target {
1141        unsafe { &*Self::PTR }
1142    }
1143}
1144impl core::fmt::Debug for GTIM3 {
1145    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1146        f.debug_struct("GTIM3").finish()
1147    }
1148}
1149#[doc = "General Timer 3"]
1150pub use self::gtim1 as gtim3;
1151#[doc = "General Timer 4"]
1152pub struct GTIM4 {
1153    _marker: PhantomData<*const ()>,
1154}
1155unsafe impl Send for GTIM4 {}
1156impl GTIM4 {
1157    #[doc = r"Pointer to the register block"]
1158    pub const PTR: *const gtim1::RegisterBlock = 0x4001_4400 as *const _;
1159    #[doc = r"Return the pointer to the register block"]
1160    #[inline(always)]
1161    pub const fn ptr() -> *const gtim1::RegisterBlock {
1162        Self::PTR
1163    }
1164    #[doc = r" Steal an instance of this peripheral"]
1165    #[doc = r""]
1166    #[doc = r" # Safety"]
1167    #[doc = r""]
1168    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1169    #[doc = r" that may race with any existing instances, for example by only"]
1170    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1171    #[doc = r" original peripheral and using critical sections to coordinate"]
1172    #[doc = r" access between multiple new instances."]
1173    #[doc = r""]
1174    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1175    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1176    #[doc = r" no stolen instances are passed to such software."]
1177    pub unsafe fn steal() -> Self {
1178        Self {
1179            _marker: PhantomData,
1180        }
1181    }
1182}
1183impl Deref for GTIM4 {
1184    type Target = gtim1::RegisterBlock;
1185    #[inline(always)]
1186    fn deref(&self) -> &Self::Target {
1187        unsafe { &*Self::PTR }
1188    }
1189}
1190impl core::fmt::Debug for GTIM4 {
1191    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1192        f.debug_struct("GTIM4").finish()
1193    }
1194}
1195#[doc = "General Timer 4"]
1196pub use self::gtim1 as gtim4;
1197#[doc = "desc I2C1"]
1198pub struct I2C1 {
1199    _marker: PhantomData<*const ()>,
1200}
1201unsafe impl Send for I2C1 {}
1202impl I2C1 {
1203    #[doc = r"Pointer to the register block"]
1204    pub const PTR: *const i2c1::RegisterBlock = 0x4000_5400 as *const _;
1205    #[doc = r"Return the pointer to the register block"]
1206    #[inline(always)]
1207    pub const fn ptr() -> *const i2c1::RegisterBlock {
1208        Self::PTR
1209    }
1210    #[doc = r" Steal an instance of this peripheral"]
1211    #[doc = r""]
1212    #[doc = r" # Safety"]
1213    #[doc = r""]
1214    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1215    #[doc = r" that may race with any existing instances, for example by only"]
1216    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1217    #[doc = r" original peripheral and using critical sections to coordinate"]
1218    #[doc = r" access between multiple new instances."]
1219    #[doc = r""]
1220    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1221    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1222    #[doc = r" no stolen instances are passed to such software."]
1223    pub unsafe fn steal() -> Self {
1224        Self {
1225            _marker: PhantomData,
1226        }
1227    }
1228}
1229impl Deref for I2C1 {
1230    type Target = i2c1::RegisterBlock;
1231    #[inline(always)]
1232    fn deref(&self) -> &Self::Target {
1233        unsafe { &*Self::PTR }
1234    }
1235}
1236impl core::fmt::Debug for I2C1 {
1237    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1238        f.debug_struct("I2C1").finish()
1239    }
1240}
1241#[doc = "desc I2C1"]
1242pub mod i2c1;
1243#[doc = "desc I2C2"]
1244pub struct I2C2 {
1245    _marker: PhantomData<*const ()>,
1246}
1247unsafe impl Send for I2C2 {}
1248impl I2C2 {
1249    #[doc = r"Pointer to the register block"]
1250    pub const PTR: *const i2c1::RegisterBlock = 0x4000_5800 as *const _;
1251    #[doc = r"Return the pointer to the register block"]
1252    #[inline(always)]
1253    pub const fn ptr() -> *const i2c1::RegisterBlock {
1254        Self::PTR
1255    }
1256    #[doc = r" Steal an instance of this peripheral"]
1257    #[doc = r""]
1258    #[doc = r" # Safety"]
1259    #[doc = r""]
1260    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1261    #[doc = r" that may race with any existing instances, for example by only"]
1262    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1263    #[doc = r" original peripheral and using critical sections to coordinate"]
1264    #[doc = r" access between multiple new instances."]
1265    #[doc = r""]
1266    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1267    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1268    #[doc = r" no stolen instances are passed to such software."]
1269    pub unsafe fn steal() -> Self {
1270        Self {
1271            _marker: PhantomData,
1272        }
1273    }
1274}
1275impl Deref for I2C2 {
1276    type Target = i2c1::RegisterBlock;
1277    #[inline(always)]
1278    fn deref(&self) -> &Self::Target {
1279        unsafe { &*Self::PTR }
1280    }
1281}
1282impl core::fmt::Debug for I2C2 {
1283    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1284        f.debug_struct("I2C2").finish()
1285    }
1286}
1287#[doc = "desc I2C2"]
1288pub use self::i2c1 as i2c2;
1289#[doc = "desc IWDT"]
1290pub struct IWDT {
1291    _marker: PhantomData<*const ()>,
1292}
1293unsafe impl Send for IWDT {}
1294impl IWDT {
1295    #[doc = r"Pointer to the register block"]
1296    pub const PTR: *const iwdt::RegisterBlock = 0x4000_3000 as *const _;
1297    #[doc = r"Return the pointer to the register block"]
1298    #[inline(always)]
1299    pub const fn ptr() -> *const iwdt::RegisterBlock {
1300        Self::PTR
1301    }
1302    #[doc = r" Steal an instance of this peripheral"]
1303    #[doc = r""]
1304    #[doc = r" # Safety"]
1305    #[doc = r""]
1306    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1307    #[doc = r" that may race with any existing instances, for example by only"]
1308    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1309    #[doc = r" original peripheral and using critical sections to coordinate"]
1310    #[doc = r" access between multiple new instances."]
1311    #[doc = r""]
1312    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1313    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1314    #[doc = r" no stolen instances are passed to such software."]
1315    pub unsafe fn steal() -> Self {
1316        Self {
1317            _marker: PhantomData,
1318        }
1319    }
1320}
1321impl Deref for IWDT {
1322    type Target = iwdt::RegisterBlock;
1323    #[inline(always)]
1324    fn deref(&self) -> &Self::Target {
1325        unsafe { &*Self::PTR }
1326    }
1327}
1328impl core::fmt::Debug for IWDT {
1329    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1330        f.debug_struct("IWDT").finish()
1331    }
1332}
1333#[doc = "desc IWDT"]
1334pub mod iwdt;
1335#[doc = "desc LVD"]
1336pub struct LVD {
1337    _marker: PhantomData<*const ()>,
1338}
1339unsafe impl Send for LVD {}
1340impl LVD {
1341    #[doc = r"Pointer to the register block"]
1342    pub const PTR: *const lvd::RegisterBlock = 0x4001_2a80 as *const _;
1343    #[doc = r"Return the pointer to the register block"]
1344    #[inline(always)]
1345    pub const fn ptr() -> *const lvd::RegisterBlock {
1346        Self::PTR
1347    }
1348    #[doc = r" Steal an instance of this peripheral"]
1349    #[doc = r""]
1350    #[doc = r" # Safety"]
1351    #[doc = r""]
1352    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1353    #[doc = r" that may race with any existing instances, for example by only"]
1354    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1355    #[doc = r" original peripheral and using critical sections to coordinate"]
1356    #[doc = r" access between multiple new instances."]
1357    #[doc = r""]
1358    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1359    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1360    #[doc = r" no stolen instances are passed to such software."]
1361    pub unsafe fn steal() -> Self {
1362        Self {
1363            _marker: PhantomData,
1364        }
1365    }
1366}
1367impl Deref for LVD {
1368    type Target = lvd::RegisterBlock;
1369    #[inline(always)]
1370    fn deref(&self) -> &Self::Target {
1371        unsafe { &*Self::PTR }
1372    }
1373}
1374impl core::fmt::Debug for LVD {
1375    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1376        f.debug_struct("LVD").finish()
1377    }
1378}
1379#[doc = "desc LVD"]
1380pub mod lvd;
1381#[doc = "desc RAM"]
1382pub struct RAM {
1383    _marker: PhantomData<*const ()>,
1384}
1385unsafe impl Send for RAM {}
1386impl RAM {
1387    #[doc = r"Pointer to the register block"]
1388    pub const PTR: *const ram::RegisterBlock = 0x4002_2400 as *const _;
1389    #[doc = r"Return the pointer to the register block"]
1390    #[inline(always)]
1391    pub const fn ptr() -> *const ram::RegisterBlock {
1392        Self::PTR
1393    }
1394    #[doc = r" Steal an instance of this peripheral"]
1395    #[doc = r""]
1396    #[doc = r" # Safety"]
1397    #[doc = r""]
1398    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1399    #[doc = r" that may race with any existing instances, for example by only"]
1400    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1401    #[doc = r" original peripheral and using critical sections to coordinate"]
1402    #[doc = r" access between multiple new instances."]
1403    #[doc = r""]
1404    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1405    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1406    #[doc = r" no stolen instances are passed to such software."]
1407    pub unsafe fn steal() -> Self {
1408        Self {
1409            _marker: PhantomData,
1410        }
1411    }
1412}
1413impl Deref for RAM {
1414    type Target = ram::RegisterBlock;
1415    #[inline(always)]
1416    fn deref(&self) -> &Self::Target {
1417        unsafe { &*Self::PTR }
1418    }
1419}
1420impl core::fmt::Debug for RAM {
1421    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1422        f.debug_struct("RAM").finish()
1423    }
1424}
1425#[doc = "desc RAM"]
1426pub mod ram;
1427#[doc = "desc RTC"]
1428pub struct RTC {
1429    _marker: PhantomData<*const ()>,
1430}
1431unsafe impl Send for RTC {}
1432impl RTC {
1433    #[doc = r"Pointer to the register block"]
1434    pub const PTR: *const rtc::RegisterBlock = 0x4000_2800 as *const _;
1435    #[doc = r"Return the pointer to the register block"]
1436    #[inline(always)]
1437    pub const fn ptr() -> *const rtc::RegisterBlock {
1438        Self::PTR
1439    }
1440    #[doc = r" Steal an instance of this peripheral"]
1441    #[doc = r""]
1442    #[doc = r" # Safety"]
1443    #[doc = r""]
1444    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1445    #[doc = r" that may race with any existing instances, for example by only"]
1446    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1447    #[doc = r" original peripheral and using critical sections to coordinate"]
1448    #[doc = r" access between multiple new instances."]
1449    #[doc = r""]
1450    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1451    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1452    #[doc = r" no stolen instances are passed to such software."]
1453    pub unsafe fn steal() -> Self {
1454        Self {
1455            _marker: PhantomData,
1456        }
1457    }
1458}
1459impl Deref for RTC {
1460    type Target = rtc::RegisterBlock;
1461    #[inline(always)]
1462    fn deref(&self) -> &Self::Target {
1463        unsafe { &*Self::PTR }
1464    }
1465}
1466impl core::fmt::Debug for RTC {
1467    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1468        f.debug_struct("RTC").finish()
1469    }
1470}
1471#[doc = "desc RTC"]
1472pub mod rtc;
1473#[doc = "desc SPI1"]
1474pub struct SPI1 {
1475    _marker: PhantomData<*const ()>,
1476}
1477unsafe impl Send for SPI1 {}
1478impl SPI1 {
1479    #[doc = r"Pointer to the register block"]
1480    pub const PTR: *const spi1::RegisterBlock = 0x4001_3000 as *const _;
1481    #[doc = r"Return the pointer to the register block"]
1482    #[inline(always)]
1483    pub const fn ptr() -> *const spi1::RegisterBlock {
1484        Self::PTR
1485    }
1486    #[doc = r" Steal an instance of this peripheral"]
1487    #[doc = r""]
1488    #[doc = r" # Safety"]
1489    #[doc = r""]
1490    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1491    #[doc = r" that may race with any existing instances, for example by only"]
1492    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1493    #[doc = r" original peripheral and using critical sections to coordinate"]
1494    #[doc = r" access between multiple new instances."]
1495    #[doc = r""]
1496    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1497    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1498    #[doc = r" no stolen instances are passed to such software."]
1499    pub unsafe fn steal() -> Self {
1500        Self {
1501            _marker: PhantomData,
1502        }
1503    }
1504}
1505impl Deref for SPI1 {
1506    type Target = spi1::RegisterBlock;
1507    #[inline(always)]
1508    fn deref(&self) -> &Self::Target {
1509        unsafe { &*Self::PTR }
1510    }
1511}
1512impl core::fmt::Debug for SPI1 {
1513    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1514        f.debug_struct("SPI1").finish()
1515    }
1516}
1517#[doc = "desc SPI1"]
1518pub mod spi1;
1519#[doc = "desc SPI2"]
1520pub struct SPI2 {
1521    _marker: PhantomData<*const ()>,
1522}
1523unsafe impl Send for SPI2 {}
1524impl SPI2 {
1525    #[doc = r"Pointer to the register block"]
1526    pub const PTR: *const spi1::RegisterBlock = 0x4000_3800 as *const _;
1527    #[doc = r"Return the pointer to the register block"]
1528    #[inline(always)]
1529    pub const fn ptr() -> *const spi1::RegisterBlock {
1530        Self::PTR
1531    }
1532    #[doc = r" Steal an instance of this peripheral"]
1533    #[doc = r""]
1534    #[doc = r" # Safety"]
1535    #[doc = r""]
1536    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1537    #[doc = r" that may race with any existing instances, for example by only"]
1538    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1539    #[doc = r" original peripheral and using critical sections to coordinate"]
1540    #[doc = r" access between multiple new instances."]
1541    #[doc = r""]
1542    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1543    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1544    #[doc = r" no stolen instances are passed to such software."]
1545    pub unsafe fn steal() -> Self {
1546        Self {
1547            _marker: PhantomData,
1548        }
1549    }
1550}
1551impl Deref for SPI2 {
1552    type Target = spi1::RegisterBlock;
1553    #[inline(always)]
1554    fn deref(&self) -> &Self::Target {
1555        unsafe { &*Self::PTR }
1556    }
1557}
1558impl core::fmt::Debug for SPI2 {
1559    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1560        f.debug_struct("SPI2").finish()
1561    }
1562}
1563#[doc = "desc SPI2"]
1564pub use self::spi1 as spi2;
1565#[doc = "System Ctrl"]
1566pub struct SYSCTRL {
1567    _marker: PhantomData<*const ()>,
1568}
1569unsafe impl Send for SYSCTRL {}
1570impl SYSCTRL {
1571    #[doc = r"Pointer to the register block"]
1572    pub const PTR: *const sysctrl::RegisterBlock = 0x4001_0000 as *const _;
1573    #[doc = r"Return the pointer to the register block"]
1574    #[inline(always)]
1575    pub const fn ptr() -> *const sysctrl::RegisterBlock {
1576        Self::PTR
1577    }
1578    #[doc = r" Steal an instance of this peripheral"]
1579    #[doc = r""]
1580    #[doc = r" # Safety"]
1581    #[doc = r""]
1582    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1583    #[doc = r" that may race with any existing instances, for example by only"]
1584    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1585    #[doc = r" original peripheral and using critical sections to coordinate"]
1586    #[doc = r" access between multiple new instances."]
1587    #[doc = r""]
1588    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1589    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1590    #[doc = r" no stolen instances are passed to such software."]
1591    pub unsafe fn steal() -> Self {
1592        Self {
1593            _marker: PhantomData,
1594        }
1595    }
1596}
1597impl Deref for SYSCTRL {
1598    type Target = sysctrl::RegisterBlock;
1599    #[inline(always)]
1600    fn deref(&self) -> &Self::Target {
1601        unsafe { &*Self::PTR }
1602    }
1603}
1604impl core::fmt::Debug for SYSCTRL {
1605    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1606        f.debug_struct("SYSCTRL").finish()
1607    }
1608}
1609#[doc = "System Ctrl"]
1610pub mod sysctrl;
1611#[doc = "desc UART1"]
1612pub struct UART1 {
1613    _marker: PhantomData<*const ()>,
1614}
1615unsafe impl Send for UART1 {}
1616impl UART1 {
1617    #[doc = r"Pointer to the register block"]
1618    pub const PTR: *const uart1::RegisterBlock = 0x4001_3800 as *const _;
1619    #[doc = r"Return the pointer to the register block"]
1620    #[inline(always)]
1621    pub const fn ptr() -> *const uart1::RegisterBlock {
1622        Self::PTR
1623    }
1624    #[doc = r" Steal an instance of this peripheral"]
1625    #[doc = r""]
1626    #[doc = r" # Safety"]
1627    #[doc = r""]
1628    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1629    #[doc = r" that may race with any existing instances, for example by only"]
1630    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1631    #[doc = r" original peripheral and using critical sections to coordinate"]
1632    #[doc = r" access between multiple new instances."]
1633    #[doc = r""]
1634    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1635    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1636    #[doc = r" no stolen instances are passed to such software."]
1637    pub unsafe fn steal() -> Self {
1638        Self {
1639            _marker: PhantomData,
1640        }
1641    }
1642}
1643impl Deref for UART1 {
1644    type Target = uart1::RegisterBlock;
1645    #[inline(always)]
1646    fn deref(&self) -> &Self::Target {
1647        unsafe { &*Self::PTR }
1648    }
1649}
1650impl core::fmt::Debug for UART1 {
1651    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1652        f.debug_struct("UART1").finish()
1653    }
1654}
1655#[doc = "desc UART1"]
1656pub mod uart1;
1657#[doc = "desc UART2"]
1658pub struct UART2 {
1659    _marker: PhantomData<*const ()>,
1660}
1661unsafe impl Send for UART2 {}
1662impl UART2 {
1663    #[doc = r"Pointer to the register block"]
1664    pub const PTR: *const uart1::RegisterBlock = 0x4000_4400 as *const _;
1665    #[doc = r"Return the pointer to the register block"]
1666    #[inline(always)]
1667    pub const fn ptr() -> *const uart1::RegisterBlock {
1668        Self::PTR
1669    }
1670    #[doc = r" Steal an instance of this peripheral"]
1671    #[doc = r""]
1672    #[doc = r" # Safety"]
1673    #[doc = r""]
1674    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1675    #[doc = r" that may race with any existing instances, for example by only"]
1676    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1677    #[doc = r" original peripheral and using critical sections to coordinate"]
1678    #[doc = r" access between multiple new instances."]
1679    #[doc = r""]
1680    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1681    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1682    #[doc = r" no stolen instances are passed to such software."]
1683    pub unsafe fn steal() -> Self {
1684        Self {
1685            _marker: PhantomData,
1686        }
1687    }
1688}
1689impl Deref for UART2 {
1690    type Target = uart1::RegisterBlock;
1691    #[inline(always)]
1692    fn deref(&self) -> &Self::Target {
1693        unsafe { &*Self::PTR }
1694    }
1695}
1696impl core::fmt::Debug for UART2 {
1697    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1698        f.debug_struct("UART2").finish()
1699    }
1700}
1701#[doc = "desc UART2"]
1702pub use self::uart1 as uart2;
1703#[doc = "desc UART3"]
1704pub struct UART3 {
1705    _marker: PhantomData<*const ()>,
1706}
1707unsafe impl Send for UART3 {}
1708impl UART3 {
1709    #[doc = r"Pointer to the register block"]
1710    pub const PTR: *const uart1::RegisterBlock = 0x4000_4800 as *const _;
1711    #[doc = r"Return the pointer to the register block"]
1712    #[inline(always)]
1713    pub const fn ptr() -> *const uart1::RegisterBlock {
1714        Self::PTR
1715    }
1716    #[doc = r" Steal an instance of this peripheral"]
1717    #[doc = r""]
1718    #[doc = r" # Safety"]
1719    #[doc = r""]
1720    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1721    #[doc = r" that may race with any existing instances, for example by only"]
1722    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1723    #[doc = r" original peripheral and using critical sections to coordinate"]
1724    #[doc = r" access between multiple new instances."]
1725    #[doc = r""]
1726    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1727    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1728    #[doc = r" no stolen instances are passed to such software."]
1729    pub unsafe fn steal() -> Self {
1730        Self {
1731            _marker: PhantomData,
1732        }
1733    }
1734}
1735impl Deref for UART3 {
1736    type Target = uart1::RegisterBlock;
1737    #[inline(always)]
1738    fn deref(&self) -> &Self::Target {
1739        unsafe { &*Self::PTR }
1740    }
1741}
1742impl core::fmt::Debug for UART3 {
1743    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1744        f.debug_struct("UART3").finish()
1745    }
1746}
1747#[doc = "desc UART3"]
1748pub use self::uart1 as uart3;
1749#[doc = "desc VC1"]
1750pub struct VC1 {
1751    _marker: PhantomData<*const ()>,
1752}
1753unsafe impl Send for VC1 {}
1754impl VC1 {
1755    #[doc = r"Pointer to the register block"]
1756    pub const PTR: *const vc1::RegisterBlock = 0x4001_2a00 as *const _;
1757    #[doc = r"Return the pointer to the register block"]
1758    #[inline(always)]
1759    pub const fn ptr() -> *const vc1::RegisterBlock {
1760        Self::PTR
1761    }
1762    #[doc = r" Steal an instance of this peripheral"]
1763    #[doc = r""]
1764    #[doc = r" # Safety"]
1765    #[doc = r""]
1766    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1767    #[doc = r" that may race with any existing instances, for example by only"]
1768    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1769    #[doc = r" original peripheral and using critical sections to coordinate"]
1770    #[doc = r" access between multiple new instances."]
1771    #[doc = r""]
1772    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1773    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1774    #[doc = r" no stolen instances are passed to such software."]
1775    pub unsafe fn steal() -> Self {
1776        Self {
1777            _marker: PhantomData,
1778        }
1779    }
1780}
1781impl Deref for VC1 {
1782    type Target = vc1::RegisterBlock;
1783    #[inline(always)]
1784    fn deref(&self) -> &Self::Target {
1785        unsafe { &*Self::PTR }
1786    }
1787}
1788impl core::fmt::Debug for VC1 {
1789    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1790        f.debug_struct("VC1").finish()
1791    }
1792}
1793#[doc = "desc VC1"]
1794pub mod vc1;
1795#[doc = "desc VC2"]
1796pub struct VC2 {
1797    _marker: PhantomData<*const ()>,
1798}
1799unsafe impl Send for VC2 {}
1800impl VC2 {
1801    #[doc = r"Pointer to the register block"]
1802    pub const PTR: *const vc1::RegisterBlock = 0x4001_2a10 as *const _;
1803    #[doc = r"Return the pointer to the register block"]
1804    #[inline(always)]
1805    pub const fn ptr() -> *const vc1::RegisterBlock {
1806        Self::PTR
1807    }
1808    #[doc = r" Steal an instance of this peripheral"]
1809    #[doc = r""]
1810    #[doc = r" # Safety"]
1811    #[doc = r""]
1812    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1813    #[doc = r" that may race with any existing instances, for example by only"]
1814    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1815    #[doc = r" original peripheral and using critical sections to coordinate"]
1816    #[doc = r" access between multiple new instances."]
1817    #[doc = r""]
1818    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1819    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1820    #[doc = r" no stolen instances are passed to such software."]
1821    pub unsafe fn steal() -> Self {
1822        Self {
1823            _marker: PhantomData,
1824        }
1825    }
1826}
1827impl Deref for VC2 {
1828    type Target = vc1::RegisterBlock;
1829    #[inline(always)]
1830    fn deref(&self) -> &Self::Target {
1831        unsafe { &*Self::PTR }
1832    }
1833}
1834impl core::fmt::Debug for VC2 {
1835    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1836        f.debug_struct("VC2").finish()
1837    }
1838}
1839#[doc = "desc VC2"]
1840pub use self::vc1 as vc2;
1841#[doc = "desc WWDT"]
1842pub struct WWDT {
1843    _marker: PhantomData<*const ()>,
1844}
1845unsafe impl Send for WWDT {}
1846impl WWDT {
1847    #[doc = r"Pointer to the register block"]
1848    pub const PTR: *const wwdt::RegisterBlock = 0x4000_2c00 as *const _;
1849    #[doc = r"Return the pointer to the register block"]
1850    #[inline(always)]
1851    pub const fn ptr() -> *const wwdt::RegisterBlock {
1852        Self::PTR
1853    }
1854    #[doc = r" Steal an instance of this peripheral"]
1855    #[doc = r""]
1856    #[doc = r" # Safety"]
1857    #[doc = r""]
1858    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1859    #[doc = r" that may race with any existing instances, for example by only"]
1860    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1861    #[doc = r" original peripheral and using critical sections to coordinate"]
1862    #[doc = r" access between multiple new instances."]
1863    #[doc = r""]
1864    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1865    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1866    #[doc = r" no stolen instances are passed to such software."]
1867    pub unsafe fn steal() -> Self {
1868        Self {
1869            _marker: PhantomData,
1870        }
1871    }
1872}
1873impl Deref for WWDT {
1874    type Target = wwdt::RegisterBlock;
1875    #[inline(always)]
1876    fn deref(&self) -> &Self::Target {
1877        unsafe { &*Self::PTR }
1878    }
1879}
1880impl core::fmt::Debug for WWDT {
1881    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1882        f.debug_struct("WWDT").finish()
1883    }
1884}
1885#[doc = "desc WWDT"]
1886pub mod wwdt;
1887#[no_mangle]
1888static mut DEVICE_PERIPHERALS: bool = false;
1889#[doc = r" All the peripherals."]
1890#[allow(non_snake_case)]
1891pub struct Peripherals {
1892    #[doc = "ADC"]
1893    pub ADC: ADC,
1894    #[doc = "ATIM"]
1895    pub ATIM: ATIM,
1896    #[doc = "AWT"]
1897    pub AWT: AWT,
1898    #[doc = "BTIM1"]
1899    pub BTIM1: BTIM1,
1900    #[doc = "BTIM2"]
1901    pub BTIM2: BTIM2,
1902    #[doc = "BTIM3"]
1903    pub BTIM3: BTIM3,
1904    #[doc = "CRC"]
1905    pub CRC: CRC,
1906    #[doc = "DMA"]
1907    pub DMA: DMA,
1908    #[doc = "DMACHANNEL1"]
1909    pub DMACHANNEL1: DMACHANNEL1,
1910    #[doc = "DMACHANNEL2"]
1911    pub DMACHANNEL2: DMACHANNEL2,
1912    #[doc = "DMACHANNEL3"]
1913    pub DMACHANNEL3: DMACHANNEL3,
1914    #[doc = "DMACHANNEL4"]
1915    pub DMACHANNEL4: DMACHANNEL4,
1916    #[doc = "DMACHANNEL5"]
1917    pub DMACHANNEL5: DMACHANNEL5,
1918    #[doc = "FLASH"]
1919    pub FLASH: FLASH,
1920    #[doc = "GPIOA"]
1921    pub GPIOA: GPIOA,
1922    #[doc = "GPIOB"]
1923    pub GPIOB: GPIOB,
1924    #[doc = "GPIOC"]
1925    pub GPIOC: GPIOC,
1926    #[doc = "GPIOF"]
1927    pub GPIOF: GPIOF,
1928    #[doc = "GTIM1"]
1929    pub GTIM1: GTIM1,
1930    #[doc = "GTIM2"]
1931    pub GTIM2: GTIM2,
1932    #[doc = "GTIM3"]
1933    pub GTIM3: GTIM3,
1934    #[doc = "GTIM4"]
1935    pub GTIM4: GTIM4,
1936    #[doc = "I2C1"]
1937    pub I2C1: I2C1,
1938    #[doc = "I2C2"]
1939    pub I2C2: I2C2,
1940    #[doc = "IWDT"]
1941    pub IWDT: IWDT,
1942    #[doc = "LVD"]
1943    pub LVD: LVD,
1944    #[doc = "RAM"]
1945    pub RAM: RAM,
1946    #[doc = "RTC"]
1947    pub RTC: RTC,
1948    #[doc = "SPI1"]
1949    pub SPI1: SPI1,
1950    #[doc = "SPI2"]
1951    pub SPI2: SPI2,
1952    #[doc = "SYSCTRL"]
1953    pub SYSCTRL: SYSCTRL,
1954    #[doc = "UART1"]
1955    pub UART1: UART1,
1956    #[doc = "UART2"]
1957    pub UART2: UART2,
1958    #[doc = "UART3"]
1959    pub UART3: UART3,
1960    #[doc = "VC1"]
1961    pub VC1: VC1,
1962    #[doc = "VC2"]
1963    pub VC2: VC2,
1964    #[doc = "WWDT"]
1965    pub WWDT: WWDT,
1966}
1967impl Peripherals {
1968    #[doc = r" Unchecked version of `Peripherals::take`."]
1969    #[doc = r""]
1970    #[doc = r" # Safety"]
1971    #[doc = r""]
1972    #[doc = r" Each of the returned peripherals must be used at most once."]
1973    #[inline]
1974    pub unsafe fn steal() -> Self {
1975        DEVICE_PERIPHERALS = true;
1976        Peripherals {
1977            ADC: ADC {
1978                _marker: PhantomData,
1979            },
1980            ATIM: ATIM {
1981                _marker: PhantomData,
1982            },
1983            AWT: AWT {
1984                _marker: PhantomData,
1985            },
1986            BTIM1: BTIM1 {
1987                _marker: PhantomData,
1988            },
1989            BTIM2: BTIM2 {
1990                _marker: PhantomData,
1991            },
1992            BTIM3: BTIM3 {
1993                _marker: PhantomData,
1994            },
1995            CRC: CRC {
1996                _marker: PhantomData,
1997            },
1998            DMA: DMA {
1999                _marker: PhantomData,
2000            },
2001            DMACHANNEL1: DMACHANNEL1 {
2002                _marker: PhantomData,
2003            },
2004            DMACHANNEL2: DMACHANNEL2 {
2005                _marker: PhantomData,
2006            },
2007            DMACHANNEL3: DMACHANNEL3 {
2008                _marker: PhantomData,
2009            },
2010            DMACHANNEL4: DMACHANNEL4 {
2011                _marker: PhantomData,
2012            },
2013            DMACHANNEL5: DMACHANNEL5 {
2014                _marker: PhantomData,
2015            },
2016            FLASH: FLASH {
2017                _marker: PhantomData,
2018            },
2019            GPIOA: GPIOA {
2020                _marker: PhantomData,
2021            },
2022            GPIOB: GPIOB {
2023                _marker: PhantomData,
2024            },
2025            GPIOC: GPIOC {
2026                _marker: PhantomData,
2027            },
2028            GPIOF: GPIOF {
2029                _marker: PhantomData,
2030            },
2031            GTIM1: GTIM1 {
2032                _marker: PhantomData,
2033            },
2034            GTIM2: GTIM2 {
2035                _marker: PhantomData,
2036            },
2037            GTIM3: GTIM3 {
2038                _marker: PhantomData,
2039            },
2040            GTIM4: GTIM4 {
2041                _marker: PhantomData,
2042            },
2043            I2C1: I2C1 {
2044                _marker: PhantomData,
2045            },
2046            I2C2: I2C2 {
2047                _marker: PhantomData,
2048            },
2049            IWDT: IWDT {
2050                _marker: PhantomData,
2051            },
2052            LVD: LVD {
2053                _marker: PhantomData,
2054            },
2055            RAM: RAM {
2056                _marker: PhantomData,
2057            },
2058            RTC: RTC {
2059                _marker: PhantomData,
2060            },
2061            SPI1: SPI1 {
2062                _marker: PhantomData,
2063            },
2064            SPI2: SPI2 {
2065                _marker: PhantomData,
2066            },
2067            SYSCTRL: SYSCTRL {
2068                _marker: PhantomData,
2069            },
2070            UART1: UART1 {
2071                _marker: PhantomData,
2072            },
2073            UART2: UART2 {
2074                _marker: PhantomData,
2075            },
2076            UART3: UART3 {
2077                _marker: PhantomData,
2078            },
2079            VC1: VC1 {
2080                _marker: PhantomData,
2081            },
2082            VC2: VC2 {
2083                _marker: PhantomData,
2084            },
2085            WWDT: WWDT {
2086                _marker: PhantomData,
2087            },
2088        }
2089    }
2090}