mm32f3270_pac/
lib.rs

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