stm32l4x2_pac/
lib.rs

1#![doc = "Peripheral access API for STM32L4X2 microcontrollers (generated using svd2rust v0.14.0)\n\nYou can find an overview of the API [here].\n\n[here]: https://docs.rs/svd2rust/0.14.0/svd2rust/#peripheral-api"]
2#![deny(missing_docs)]
3#![deny(warnings)]
4#![allow(non_camel_case_types)]
5#![no_std]
6extern crate bare_metal;
7extern crate cortex_m;
8#[cfg(feature = "rt")]
9extern crate cortex_m_rt;
10extern crate vcell;
11use core::marker::PhantomData;
12use core::ops::Deref;
13#[doc = r" Number available in the NVIC for configuring priority"]
14pub const NVIC_PRIO_BITS: u8 = 4;
15#[cfg(feature = "rt")]
16extern "C" {
17    fn WWDG();
18    fn PVD_PVM();
19    fn RTC_TAMP_STAMP();
20    fn RTC_WKUP();
21    fn FLASH();
22    fn RCC();
23    fn EXTI0();
24    fn EXTI1();
25    fn EXTI2();
26    fn EXTI3();
27    fn EXTI4();
28    fn DMA1_CH1();
29    fn DMA1_CH2();
30    fn DMA1_CH3();
31    fn DMA1_CH4();
32    fn DMA1_CH5();
33    fn DMA1_CH6();
34    fn DMA1_CH7();
35    fn ADC1();
36    fn CAN1_TX();
37    fn CAN1_RX0();
38    fn CAN1_RX1();
39    fn CAN1_SCE();
40    fn EXTI9_5();
41    fn TIM1_BRK_TIM15();
42    fn TIM1_UP_TIM16();
43    fn TIM1_TRG_COM();
44    fn TIM1_CC();
45    fn TIM2();
46    fn TIM3();
47    fn I2C1_EV();
48    fn I2C1_ER();
49    fn I2C2_EV();
50    fn I2C2_ER();
51    fn SPI1();
52    fn SPI2();
53    fn USART1();
54    fn USART2();
55    fn USART3();
56    fn EXTI15_10();
57    fn RTC_ALARM();
58    fn DFSDM1_FLT3();
59    fn SDMMC1();
60    fn SPI3();
61    fn UART4();
62    fn TIM6_DACUNDER();
63    fn TIM7();
64    fn DMA2_CH1();
65    fn DMA2_CH2();
66    fn DMA2_CH3();
67    fn DMA2_CH4();
68    fn DMA2_CH5();
69    fn DFSDM1();
70    fn DFSDM2();
71    fn DFSDM1_FLT2();
72    fn COMP();
73    fn LPTIM1();
74    fn LPTIM2();
75    fn USB();
76    fn DMA2_CH6();
77    fn DMA2_CH7();
78    fn LPUART1();
79    fn QUADSPI();
80    fn I2C3_EV();
81    fn I2C3_ER();
82    fn SAI1();
83    fn SWPMI1();
84    fn TSC();
85    fn LCD();
86    fn AES();
87    fn RNG();
88    fn FPU();
89    fn CRS();
90    fn I2C4_EV();
91    fn I2C4_ER();
92}
93#[doc(hidden)]
94pub union Vector {
95    _handler: unsafe extern "C" fn(),
96    _reserved: u32,
97}
98#[cfg(feature = "rt")]
99#[doc(hidden)]
100#[link_section = ".vector_table.interrupts"]
101#[no_mangle]
102pub static __INTERRUPTS: [Vector; 85] = [
103    Vector { _handler: WWDG },
104    Vector { _handler: PVD_PVM },
105    Vector {
106        _handler: RTC_TAMP_STAMP,
107    },
108    Vector { _handler: RTC_WKUP },
109    Vector { _handler: FLASH },
110    Vector { _handler: RCC },
111    Vector { _handler: EXTI0 },
112    Vector { _handler: EXTI1 },
113    Vector { _handler: EXTI2 },
114    Vector { _handler: EXTI3 },
115    Vector { _handler: EXTI4 },
116    Vector { _handler: DMA1_CH1 },
117    Vector { _handler: DMA1_CH2 },
118    Vector { _handler: DMA1_CH3 },
119    Vector { _handler: DMA1_CH4 },
120    Vector { _handler: DMA1_CH5 },
121    Vector { _handler: DMA1_CH6 },
122    Vector { _handler: DMA1_CH7 },
123    Vector { _handler: ADC1 },
124    Vector { _handler: CAN1_TX },
125    Vector { _handler: CAN1_RX0 },
126    Vector { _handler: CAN1_RX1 },
127    Vector { _handler: CAN1_SCE },
128    Vector { _handler: EXTI9_5 },
129    Vector {
130        _handler: TIM1_BRK_TIM15,
131    },
132    Vector {
133        _handler: TIM1_UP_TIM16,
134    },
135    Vector {
136        _handler: TIM1_TRG_COM,
137    },
138    Vector { _handler: TIM1_CC },
139    Vector { _handler: TIM2 },
140    Vector { _handler: TIM3 },
141    Vector { _reserved: 0 },
142    Vector { _handler: I2C1_EV },
143    Vector { _handler: I2C1_ER },
144    Vector { _handler: I2C2_EV },
145    Vector { _handler: I2C2_ER },
146    Vector { _handler: SPI1 },
147    Vector { _handler: SPI2 },
148    Vector { _handler: USART1 },
149    Vector { _handler: USART2 },
150    Vector { _handler: USART3 },
151    Vector {
152        _handler: EXTI15_10,
153    },
154    Vector {
155        _handler: RTC_ALARM,
156    },
157    Vector {
158        _handler: DFSDM1_FLT3,
159    },
160    Vector { _reserved: 0 },
161    Vector { _reserved: 0 },
162    Vector { _reserved: 0 },
163    Vector { _reserved: 0 },
164    Vector { _reserved: 0 },
165    Vector { _reserved: 0 },
166    Vector { _handler: SDMMC1 },
167    Vector { _reserved: 0 },
168    Vector { _handler: SPI3 },
169    Vector { _handler: UART4 },
170    Vector { _reserved: 0 },
171    Vector {
172        _handler: TIM6_DACUNDER,
173    },
174    Vector { _handler: TIM7 },
175    Vector { _handler: DMA2_CH1 },
176    Vector { _handler: DMA2_CH2 },
177    Vector { _handler: DMA2_CH3 },
178    Vector { _handler: DMA2_CH4 },
179    Vector { _handler: DMA2_CH5 },
180    Vector { _handler: DFSDM1 },
181    Vector { _handler: DFSDM2 },
182    Vector {
183        _handler: DFSDM1_FLT2,
184    },
185    Vector { _handler: COMP },
186    Vector { _handler: LPTIM1 },
187    Vector { _handler: LPTIM2 },
188    Vector { _handler: USB },
189    Vector { _handler: DMA2_CH6 },
190    Vector { _handler: DMA2_CH7 },
191    Vector { _handler: LPUART1 },
192    Vector { _handler: QUADSPI },
193    Vector { _handler: I2C3_EV },
194    Vector { _handler: I2C3_ER },
195    Vector { _handler: SAI1 },
196    Vector { _reserved: 0 },
197    Vector { _handler: SWPMI1 },
198    Vector { _handler: TSC },
199    Vector { _handler: LCD },
200    Vector { _handler: AES },
201    Vector { _handler: RNG },
202    Vector { _handler: FPU },
203    Vector { _handler: CRS },
204    Vector { _handler: I2C4_EV },
205    Vector { _handler: I2C4_ER },
206];
207#[doc = r" Enumeration of all the interrupts"]
208pub enum Interrupt {
209    #[doc = "0 - Window Watchdog interrupt"]
210    WWDG,
211    #[doc = "1 - PVD through EXTI line detection"]
212    PVD_PVM,
213    #[doc = "2 - Tamper and TimeStamp interrupts"]
214    RTC_TAMP_STAMP,
215    #[doc = "3 - RTC Tamper or TimeStamp /CSS on LSE through EXTI line 19 interrupts"]
216    RTC_WKUP,
217    #[doc = "4 - Flash global interrupt"]
218    FLASH,
219    #[doc = "5 - RCC global interrupt"]
220    RCC,
221    #[doc = "6 - EXTI Line 0 interrupt"]
222    EXTI0,
223    #[doc = "7 - EXTI Line 1 interrupt"]
224    EXTI1,
225    #[doc = "8 - EXTI Line 2 interrupt"]
226    EXTI2,
227    #[doc = "9 - EXTI Line 3 interrupt"]
228    EXTI3,
229    #[doc = "10 - EXTI Line4 interrupt"]
230    EXTI4,
231    #[doc = "11 - DMA1 Channel1 global interrupt"]
232    DMA1_CH1,
233    #[doc = "12 - DMA1 Channel2 global interrupt"]
234    DMA1_CH2,
235    #[doc = "13 - DMA1 Channel3 interrupt"]
236    DMA1_CH3,
237    #[doc = "14 - DMA1 Channel4 interrupt"]
238    DMA1_CH4,
239    #[doc = "15 - DMA1 Channel5 interrupt"]
240    DMA1_CH5,
241    #[doc = "16 - DMA1 Channel6 interrupt"]
242    DMA1_CH6,
243    #[doc = "17 - DMA1 Channel 7 interrupt"]
244    DMA1_CH7,
245    #[doc = "18 - ADC1 and ADC2 global interrupt"]
246    ADC1,
247    #[doc = "19 - CAN1 TX interrupts"]
248    CAN1_TX,
249    #[doc = "20 - CAN1 RX0 interrupts"]
250    CAN1_RX0,
251    #[doc = "21 - CAN1 RX1 interrupts"]
252    CAN1_RX1,
253    #[doc = "22 - CAN1 SCE interrupt"]
254    CAN1_SCE,
255    #[doc = "23 - EXTI Line5 to Line9 interrupts"]
256    EXTI9_5,
257    #[doc = "24 - Timer 15 global interrupt"]
258    TIM1_BRK_TIM15,
259    #[doc = "25 - Timer 16 global interrupt"]
260    TIM1_UP_TIM16,
261    #[doc = "26 - TIM1 trigger and commutation interrupt"]
262    TIM1_TRG_COM,
263    #[doc = "27 - TIM1 Capture Compare interrupt"]
264    TIM1_CC,
265    #[doc = "28 - TIM2 global interrupt"]
266    TIM2,
267    #[doc = "29 - TIM3 global interrupt"]
268    TIM3,
269    #[doc = "31 - I2C1 event interrupt"]
270    I2C1_EV,
271    #[doc = "32 - I2C1 error interrupt"]
272    I2C1_ER,
273    #[doc = "33 - I2C2 event interrupt"]
274    I2C2_EV,
275    #[doc = "34 - I2C2 error interrupt"]
276    I2C2_ER,
277    #[doc = "35 - SPI1 global interrupt"]
278    SPI1,
279    #[doc = "36 - SPI2 global interrupt"]
280    SPI2,
281    #[doc = "37 - USART1 global interrupt"]
282    USART1,
283    #[doc = "38 - USART2 global interrupt"]
284    USART2,
285    #[doc = "39 - USART3 global interrupt"]
286    USART3,
287    #[doc = "40 - EXTI Lines 10 to 15 interrupts"]
288    EXTI15_10,
289    #[doc = "41 - RTC alarms through EXTI line 18 interrupts"]
290    RTC_ALARM,
291    #[doc = "42 - DFSDM1_FLT3 global interrupt"]
292    DFSDM1_FLT3,
293    #[doc = "49 - SDMMC global Interrupt"]
294    SDMMC1,
295    #[doc = "51 - SPI3 global Interrupt"]
296    SPI3,
297    #[doc = "52 - UART4 global Interrupt"]
298    UART4,
299    #[doc = "54 - TIM6 global and DAC1 and 2 underrun error interrupts"]
300    TIM6_DACUNDER,
301    #[doc = "55 - TIM7 global interrupt"]
302    TIM7,
303    #[doc = "56 - DMA2 Channel 1 global Interrupt"]
304    DMA2_CH1,
305    #[doc = "57 - DMA2 Channel 2 global Interrupt"]
306    DMA2_CH2,
307    #[doc = "58 - DMA2 Channel 3 global Interrupt"]
308    DMA2_CH3,
309    #[doc = "59 - DMA2 Channel 4 global Interrupt"]
310    DMA2_CH4,
311    #[doc = "60 - DMA2 Channel 5 global Interrupt"]
312    DMA2_CH5,
313    #[doc = "61 - DFSDM1_FLT0 global interrupt"]
314    DFSDM1,
315    #[doc = "62 - DFSDM1_FLT1 global interrupt"]
316    DFSDM2,
317    #[doc = "63 - DFSDM1_FLT2 global interrupt"]
318    DFSDM1_FLT2,
319    #[doc = "64 - COMP1 and COMP2 interrupts"]
320    COMP,
321    #[doc = "65 - LP TIM1 interrupt"]
322    LPTIM1,
323    #[doc = "66 - LP TIM2 interrupt"]
324    LPTIM2,
325    #[doc = "67 - USB event interrupt through EXTI"]
326    USB,
327    #[doc = "68 - DMA2 Channel 6 global Interrupt"]
328    DMA2_CH6,
329    #[doc = "69 - DMA2 Channel 7 global Interrupt"]
330    DMA2_CH7,
331    #[doc = "70 - LPUART1 global interrupt"]
332    LPUART1,
333    #[doc = "71 - Quad SPI global interrupt"]
334    QUADSPI,
335    #[doc = "72 - I2C3 event interrupt"]
336    I2C3_EV,
337    #[doc = "73 - I2C3 error interrupt"]
338    I2C3_ER,
339    #[doc = "74 - SAI1 global interrupt"]
340    SAI1,
341    #[doc = "76 - SWPMI1 global interrupt"]
342    SWPMI1,
343    #[doc = "77 - TSC global interrupt"]
344    TSC,
345    #[doc = "78 - LCD global interrupt"]
346    LCD,
347    #[doc = "79 - AES global interrupt"]
348    AES,
349    #[doc = "80 - RNG global interrupt"]
350    RNG,
351    #[doc = "81 - Floating point interrupt"]
352    FPU,
353    #[doc = "82 - CRS interrupt"]
354    CRS,
355    #[doc = "83 - I2C4 event interrupt, wakeup through EXTI"]
356    I2C4_EV,
357    #[doc = "84 - I2C4 error interrupt"]
358    I2C4_ER,
359}
360unsafe impl ::bare_metal::Nr for Interrupt {
361    #[inline]
362    fn nr(&self) -> u8 {
363        match *self {
364            Interrupt::WWDG => 0,
365            Interrupt::PVD_PVM => 1,
366            Interrupt::RTC_TAMP_STAMP => 2,
367            Interrupt::RTC_WKUP => 3,
368            Interrupt::FLASH => 4,
369            Interrupt::RCC => 5,
370            Interrupt::EXTI0 => 6,
371            Interrupt::EXTI1 => 7,
372            Interrupt::EXTI2 => 8,
373            Interrupt::EXTI3 => 9,
374            Interrupt::EXTI4 => 10,
375            Interrupt::DMA1_CH1 => 11,
376            Interrupt::DMA1_CH2 => 12,
377            Interrupt::DMA1_CH3 => 13,
378            Interrupt::DMA1_CH4 => 14,
379            Interrupt::DMA1_CH5 => 15,
380            Interrupt::DMA1_CH6 => 16,
381            Interrupt::DMA1_CH7 => 17,
382            Interrupt::ADC1 => 18,
383            Interrupt::CAN1_TX => 19,
384            Interrupt::CAN1_RX0 => 20,
385            Interrupt::CAN1_RX1 => 21,
386            Interrupt::CAN1_SCE => 22,
387            Interrupt::EXTI9_5 => 23,
388            Interrupt::TIM1_BRK_TIM15 => 24,
389            Interrupt::TIM1_UP_TIM16 => 25,
390            Interrupt::TIM1_TRG_COM => 26,
391            Interrupt::TIM1_CC => 27,
392            Interrupt::TIM2 => 28,
393            Interrupt::TIM3 => 29,
394            Interrupt::I2C1_EV => 31,
395            Interrupt::I2C1_ER => 32,
396            Interrupt::I2C2_EV => 33,
397            Interrupt::I2C2_ER => 34,
398            Interrupt::SPI1 => 35,
399            Interrupt::SPI2 => 36,
400            Interrupt::USART1 => 37,
401            Interrupt::USART2 => 38,
402            Interrupt::USART3 => 39,
403            Interrupt::EXTI15_10 => 40,
404            Interrupt::RTC_ALARM => 41,
405            Interrupt::DFSDM1_FLT3 => 42,
406            Interrupt::SDMMC1 => 49,
407            Interrupt::SPI3 => 51,
408            Interrupt::UART4 => 52,
409            Interrupt::TIM6_DACUNDER => 54,
410            Interrupt::TIM7 => 55,
411            Interrupt::DMA2_CH1 => 56,
412            Interrupt::DMA2_CH2 => 57,
413            Interrupt::DMA2_CH3 => 58,
414            Interrupt::DMA2_CH4 => 59,
415            Interrupt::DMA2_CH5 => 60,
416            Interrupt::DFSDM1 => 61,
417            Interrupt::DFSDM2 => 62,
418            Interrupt::DFSDM1_FLT2 => 63,
419            Interrupt::COMP => 64,
420            Interrupt::LPTIM1 => 65,
421            Interrupt::LPTIM2 => 66,
422            Interrupt::USB => 67,
423            Interrupt::DMA2_CH6 => 68,
424            Interrupt::DMA2_CH7 => 69,
425            Interrupt::LPUART1 => 70,
426            Interrupt::QUADSPI => 71,
427            Interrupt::I2C3_EV => 72,
428            Interrupt::I2C3_ER => 73,
429            Interrupt::SAI1 => 74,
430            Interrupt::SWPMI1 => 76,
431            Interrupt::TSC => 77,
432            Interrupt::LCD => 78,
433            Interrupt::AES => 79,
434            Interrupt::RNG => 80,
435            Interrupt::FPU => 81,
436            Interrupt::CRS => 82,
437            Interrupt::I2C4_EV => 83,
438            Interrupt::I2C4_ER => 84,
439        }
440    }
441}
442#[cfg(feature = "rt")]
443pub use self::Interrupt as interrupt;
444pub use cortex_m::peripheral::Peripherals as CorePeripherals;
445pub use cortex_m::peripheral::{CBP, CPUID, DCB, DWT, FPB, ITM, MPU, NVIC, SCB, SYST, TPIU};
446#[cfg(feature = "rt")]
447pub use cortex_m_rt::interrupt;
448#[doc = "Digital-to-analog converter"]
449pub struct DAC1 {
450    _marker: PhantomData<*const ()>,
451}
452unsafe impl Send for DAC1 {}
453impl DAC1 {
454    #[doc = r" Returns a pointer to the register block"]
455    pub fn ptr() -> *const dac1::RegisterBlock {
456        1073771520 as *const _
457    }
458}
459impl Deref for DAC1 {
460    type Target = dac1::RegisterBlock;
461    fn deref(&self) -> &dac1::RegisterBlock {
462        unsafe { &*DAC1::ptr() }
463    }
464}
465#[doc = "Digital-to-analog converter"]
466pub mod dac1;
467#[doc = "Direct memory access controller"]
468pub struct DMA1 {
469    _marker: PhantomData<*const ()>,
470}
471unsafe impl Send for DMA1 {}
472impl DMA1 {
473    #[doc = r" Returns a pointer to the register block"]
474    pub fn ptr() -> *const dma1::RegisterBlock {
475        1073872896 as *const _
476    }
477}
478impl Deref for DMA1 {
479    type Target = dma1::RegisterBlock;
480    fn deref(&self) -> &dma1::RegisterBlock {
481        unsafe { &*DMA1::ptr() }
482    }
483}
484#[doc = "Direct memory access controller"]
485pub mod dma1;
486#[doc = "DMA2"]
487pub struct DMA2 {
488    _marker: PhantomData<*const ()>,
489}
490unsafe impl Send for DMA2 {}
491impl DMA2 {
492    #[doc = r" Returns a pointer to the register block"]
493    pub fn ptr() -> *const dma1::RegisterBlock {
494        1073873920 as *const _
495    }
496}
497impl Deref for DMA2 {
498    type Target = dma1::RegisterBlock;
499    fn deref(&self) -> &dma1::RegisterBlock {
500        unsafe { &*DMA2::ptr() }
501    }
502}
503#[doc = "Cyclic redundancy check calculation unit"]
504pub struct CRC {
505    _marker: PhantomData<*const ()>,
506}
507unsafe impl Send for CRC {}
508impl CRC {
509    #[doc = r" Returns a pointer to the register block"]
510    pub fn ptr() -> *const crc::RegisterBlock {
511        1073885184 as *const _
512    }
513}
514impl Deref for CRC {
515    type Target = crc::RegisterBlock;
516    fn deref(&self) -> &crc::RegisterBlock {
517        unsafe { &*CRC::ptr() }
518    }
519}
520#[doc = "Cyclic redundancy check calculation unit"]
521pub mod crc;
522#[doc = "Liquid crystal display controller"]
523pub struct LCD {
524    _marker: PhantomData<*const ()>,
525}
526unsafe impl Send for LCD {}
527impl LCD {
528    #[doc = r" Returns a pointer to the register block"]
529    pub fn ptr() -> *const lcd::RegisterBlock {
530        1073751040 as *const _
531    }
532}
533impl Deref for LCD {
534    type Target = lcd::RegisterBlock;
535    fn deref(&self) -> &lcd::RegisterBlock {
536        unsafe { &*LCD::ptr() }
537    }
538}
539#[doc = "Liquid crystal display controller"]
540pub mod lcd;
541#[doc = "Touch sensing controller"]
542pub struct TSC {
543    _marker: PhantomData<*const ()>,
544}
545unsafe impl Send for TSC {}
546impl TSC {
547    #[doc = r" Returns a pointer to the register block"]
548    pub fn ptr() -> *const tsc::RegisterBlock {
549        1073889280 as *const _
550    }
551}
552impl Deref for TSC {
553    type Target = tsc::RegisterBlock;
554    fn deref(&self) -> &tsc::RegisterBlock {
555        unsafe { &*TSC::ptr() }
556    }
557}
558#[doc = "Touch sensing controller"]
559pub mod tsc;
560#[doc = "Independent watchdog"]
561pub struct IWDG {
562    _marker: PhantomData<*const ()>,
563}
564unsafe impl Send for IWDG {}
565impl IWDG {
566    #[doc = r" Returns a pointer to the register block"]
567    pub fn ptr() -> *const iwdg::RegisterBlock {
568        1073754112 as *const _
569    }
570}
571impl Deref for IWDG {
572    type Target = iwdg::RegisterBlock;
573    fn deref(&self) -> &iwdg::RegisterBlock {
574        unsafe { &*IWDG::ptr() }
575    }
576}
577#[doc = "Independent watchdog"]
578pub mod iwdg;
579#[doc = "System window watchdog"]
580pub struct WWDG {
581    _marker: PhantomData<*const ()>,
582}
583unsafe impl Send for WWDG {}
584impl WWDG {
585    #[doc = r" Returns a pointer to the register block"]
586    pub fn ptr() -> *const wwdg::RegisterBlock {
587        1073753088 as *const _
588    }
589}
590impl Deref for WWDG {
591    type Target = wwdg::RegisterBlock;
592    fn deref(&self) -> &wwdg::RegisterBlock {
593        unsafe { &*WWDG::ptr() }
594    }
595}
596#[doc = "System window watchdog"]
597pub mod wwdg;
598#[doc = "Comparator"]
599pub struct COMP {
600    _marker: PhantomData<*const ()>,
601}
602unsafe impl Send for COMP {}
603impl COMP {
604    #[doc = r" Returns a pointer to the register block"]
605    pub fn ptr() -> *const comp::RegisterBlock {
606        1073807872 as *const _
607    }
608}
609impl Deref for COMP {
610    type Target = comp::RegisterBlock;
611    fn deref(&self) -> &comp::RegisterBlock {
612        unsafe { &*COMP::ptr() }
613    }
614}
615#[doc = "Comparator"]
616pub mod comp;
617#[doc = "Firewall"]
618pub struct FIREWALL {
619    _marker: PhantomData<*const ()>,
620}
621unsafe impl Send for FIREWALL {}
622impl FIREWALL {
623    #[doc = r" Returns a pointer to the register block"]
624    pub fn ptr() -> *const firewall::RegisterBlock {
625        1073814528 as *const _
626    }
627}
628impl Deref for FIREWALL {
629    type Target = firewall::RegisterBlock;
630    fn deref(&self) -> &firewall::RegisterBlock {
631        unsafe { &*FIREWALL::ptr() }
632    }
633}
634#[doc = "Firewall"]
635pub mod firewall;
636#[doc = "Inter-integrated circuit"]
637pub struct I2C1 {
638    _marker: PhantomData<*const ()>,
639}
640unsafe impl Send for I2C1 {}
641impl I2C1 {
642    #[doc = r" Returns a pointer to the register block"]
643    pub fn ptr() -> *const i2c1::RegisterBlock {
644        1073763328 as *const _
645    }
646}
647impl Deref for I2C1 {
648    type Target = i2c1::RegisterBlock;
649    fn deref(&self) -> &i2c1::RegisterBlock {
650        unsafe { &*I2C1::ptr() }
651    }
652}
653#[doc = "Inter-integrated circuit"]
654pub mod i2c1;
655#[doc = "I2C3"]
656pub struct I2C3 {
657    _marker: PhantomData<*const ()>,
658}
659unsafe impl Send for I2C3 {}
660impl I2C3 {
661    #[doc = r" Returns a pointer to the register block"]
662    pub fn ptr() -> *const i2c1::RegisterBlock {
663        1073765376 as *const _
664    }
665}
666impl Deref for I2C3 {
667    type Target = i2c1::RegisterBlock;
668    fn deref(&self) -> &i2c1::RegisterBlock {
669        unsafe { &*I2C3::ptr() }
670    }
671}
672#[doc = "I2C2"]
673pub struct I2C2 {
674    _marker: PhantomData<*const ()>,
675}
676unsafe impl Send for I2C2 {}
677impl I2C2 {
678    #[doc = r" Returns a pointer to the register block"]
679    pub fn ptr() -> *const i2c1::RegisterBlock {
680        1073764352 as *const _
681    }
682}
683impl Deref for I2C2 {
684    type Target = i2c1::RegisterBlock;
685    fn deref(&self) -> &i2c1::RegisterBlock {
686        unsafe { &*I2C2::ptr() }
687    }
688}
689#[doc = "I2C4"]
690pub struct I2C4 {
691    _marker: PhantomData<*const ()>,
692}
693unsafe impl Send for I2C4 {}
694impl I2C4 {
695    #[doc = r" Returns a pointer to the register block"]
696    pub fn ptr() -> *const i2c1::RegisterBlock {
697        1073775616 as *const _
698    }
699}
700impl Deref for I2C4 {
701    type Target = i2c1::RegisterBlock;
702    fn deref(&self) -> &i2c1::RegisterBlock {
703        unsafe { &*I2C4::ptr() }
704    }
705}
706#[doc = "Flash"]
707pub struct FLASH {
708    _marker: PhantomData<*const ()>,
709}
710unsafe impl Send for FLASH {}
711impl FLASH {
712    #[doc = r" Returns a pointer to the register block"]
713    pub fn ptr() -> *const flash::RegisterBlock {
714        1073881088 as *const _
715    }
716}
717impl Deref for FLASH {
718    type Target = flash::RegisterBlock;
719    fn deref(&self) -> &flash::RegisterBlock {
720        unsafe { &*FLASH::ptr() }
721    }
722}
723#[doc = "Flash"]
724pub mod flash;
725#[doc = "Reset and clock control"]
726pub struct RCC {
727    _marker: PhantomData<*const ()>,
728}
729unsafe impl Send for RCC {}
730impl RCC {
731    #[doc = r" Returns a pointer to the register block"]
732    pub fn ptr() -> *const rcc::RegisterBlock {
733        1073876992 as *const _
734    }
735}
736impl Deref for RCC {
737    type Target = rcc::RegisterBlock;
738    fn deref(&self) -> &rcc::RegisterBlock {
739        unsafe { &*RCC::ptr() }
740    }
741}
742#[doc = "Reset and clock control"]
743pub mod rcc;
744#[doc = "Power control"]
745pub struct PWR {
746    _marker: PhantomData<*const ()>,
747}
748unsafe impl Send for PWR {}
749impl PWR {
750    #[doc = r" Returns a pointer to the register block"]
751    pub fn ptr() -> *const pwr::RegisterBlock {
752        1073770496 as *const _
753    }
754}
755impl Deref for PWR {
756    type Target = pwr::RegisterBlock;
757    fn deref(&self) -> &pwr::RegisterBlock {
758        unsafe { &*PWR::ptr() }
759    }
760}
761#[doc = "Power control"]
762pub mod pwr;
763#[doc = "System configuration controller"]
764pub struct SYSCFG {
765    _marker: PhantomData<*const ()>,
766}
767unsafe impl Send for SYSCFG {}
768impl SYSCFG {
769    #[doc = r" Returns a pointer to the register block"]
770    pub fn ptr() -> *const syscfg::RegisterBlock {
771        1073807360 as *const _
772    }
773}
774impl Deref for SYSCFG {
775    type Target = syscfg::RegisterBlock;
776    fn deref(&self) -> &syscfg::RegisterBlock {
777        unsafe { &*SYSCFG::ptr() }
778    }
779}
780#[doc = "System configuration controller"]
781pub mod syscfg;
782#[doc = "Random number generator"]
783pub struct RNG {
784    _marker: PhantomData<*const ()>,
785}
786unsafe impl Send for RNG {}
787impl RNG {
788    #[doc = r" Returns a pointer to the register block"]
789    pub fn ptr() -> *const rng::RegisterBlock {
790        1342572544 as *const _
791    }
792}
793impl Deref for RNG {
794    type Target = rng::RegisterBlock;
795    fn deref(&self) -> &rng::RegisterBlock {
796        unsafe { &*RNG::ptr() }
797    }
798}
799#[doc = "Random number generator"]
800pub mod rng;
801#[doc = "Advanced encryption standard hardware accelerator"]
802pub struct AES {
803    _marker: PhantomData<*const ()>,
804}
805unsafe impl Send for AES {}
806impl AES {
807    #[doc = r" Returns a pointer to the register block"]
808    pub fn ptr() -> *const aes::RegisterBlock {
809        1342570496 as *const _
810    }
811}
812impl Deref for AES {
813    type Target = aes::RegisterBlock;
814    fn deref(&self) -> &aes::RegisterBlock {
815        unsafe { &*AES::ptr() }
816    }
817}
818#[doc = "Advanced encryption standard hardware accelerator"]
819pub mod aes;
820#[doc = "Analog-to-Digital Converter"]
821pub struct ADC {
822    _marker: PhantomData<*const ()>,
823}
824unsafe impl Send for ADC {}
825impl ADC {
826    #[doc = r" Returns a pointer to the register block"]
827    pub fn ptr() -> *const adc::RegisterBlock {
828        1342439424 as *const _
829    }
830}
831impl Deref for ADC {
832    type Target = adc::RegisterBlock;
833    fn deref(&self) -> &adc::RegisterBlock {
834        unsafe { &*ADC::ptr() }
835    }
836}
837#[doc = "Analog-to-Digital Converter"]
838pub mod adc;
839#[doc = "General-purpose I/Os"]
840pub struct GPIOA {
841    _marker: PhantomData<*const ()>,
842}
843unsafe impl Send for GPIOA {}
844impl GPIOA {
845    #[doc = r" Returns a pointer to the register block"]
846    pub fn ptr() -> *const gpioa::RegisterBlock {
847        1207959552 as *const _
848    }
849}
850impl Deref for GPIOA {
851    type Target = gpioa::RegisterBlock;
852    fn deref(&self) -> &gpioa::RegisterBlock {
853        unsafe { &*GPIOA::ptr() }
854    }
855}
856#[doc = "General-purpose I/Os"]
857pub mod gpioa;
858#[doc = "General-purpose I/Os"]
859pub struct GPIOB {
860    _marker: PhantomData<*const ()>,
861}
862unsafe impl Send for GPIOB {}
863impl GPIOB {
864    #[doc = r" Returns a pointer to the register block"]
865    pub fn ptr() -> *const gpiob::RegisterBlock {
866        1207960576 as *const _
867    }
868}
869impl Deref for GPIOB {
870    type Target = gpiob::RegisterBlock;
871    fn deref(&self) -> &gpiob::RegisterBlock {
872        unsafe { &*GPIOB::ptr() }
873    }
874}
875#[doc = "General-purpose I/Os"]
876pub mod gpiob;
877#[doc = "General-purpose I/Os"]
878pub struct GPIOC {
879    _marker: PhantomData<*const ()>,
880}
881unsafe impl Send for GPIOC {}
882impl GPIOC {
883    #[doc = r" Returns a pointer to the register block"]
884    pub fn ptr() -> *const gpioc::RegisterBlock {
885        1207961600 as *const _
886    }
887}
888impl Deref for GPIOC {
889    type Target = gpioc::RegisterBlock;
890    fn deref(&self) -> &gpioc::RegisterBlock {
891        unsafe { &*GPIOC::ptr() }
892    }
893}
894#[doc = "General-purpose I/Os"]
895pub mod gpioc;
896#[doc = "GPIOD"]
897pub struct GPIOD {
898    _marker: PhantomData<*const ()>,
899}
900unsafe impl Send for GPIOD {}
901impl GPIOD {
902    #[doc = r" Returns a pointer to the register block"]
903    pub fn ptr() -> *const gpioc::RegisterBlock {
904        1207962624 as *const _
905    }
906}
907impl Deref for GPIOD {
908    type Target = gpioc::RegisterBlock;
909    fn deref(&self) -> &gpioc::RegisterBlock {
910        unsafe { &*GPIOD::ptr() }
911    }
912}
913#[doc = "GPIOE"]
914pub struct GPIOE {
915    _marker: PhantomData<*const ()>,
916}
917unsafe impl Send for GPIOE {}
918impl GPIOE {
919    #[doc = r" Returns a pointer to the register block"]
920    pub fn ptr() -> *const gpioc::RegisterBlock {
921        1207963648 as *const _
922    }
923}
924impl Deref for GPIOE {
925    type Target = gpioc::RegisterBlock;
926    fn deref(&self) -> &gpioc::RegisterBlock {
927        unsafe { &*GPIOE::ptr() }
928    }
929}
930#[doc = "GPIOH"]
931pub struct GPIOH {
932    _marker: PhantomData<*const ()>,
933}
934unsafe impl Send for GPIOH {}
935impl GPIOH {
936    #[doc = r" Returns a pointer to the register block"]
937    pub fn ptr() -> *const gpioc::RegisterBlock {
938        1207966720 as *const _
939    }
940}
941impl Deref for GPIOH {
942    type Target = gpioc::RegisterBlock;
943    fn deref(&self) -> &gpioc::RegisterBlock {
944        unsafe { &*GPIOH::ptr() }
945    }
946}
947#[doc = "Serial audio interface"]
948pub struct SAI1 {
949    _marker: PhantomData<*const ()>,
950}
951unsafe impl Send for SAI1 {}
952impl SAI1 {
953    #[doc = r" Returns a pointer to the register block"]
954    pub fn ptr() -> *const sai1::RegisterBlock {
955        1073828864 as *const _
956    }
957}
958impl Deref for SAI1 {
959    type Target = sai1::RegisterBlock;
960    fn deref(&self) -> &sai1::RegisterBlock {
961        unsafe { &*SAI1::ptr() }
962    }
963}
964#[doc = "Serial audio interface"]
965pub mod sai1;
966#[doc = "General-purpose-timers"]
967pub struct TIM2 {
968    _marker: PhantomData<*const ()>,
969}
970unsafe impl Send for TIM2 {}
971impl TIM2 {
972    #[doc = r" Returns a pointer to the register block"]
973    pub fn ptr() -> *const tim2::RegisterBlock {
974        1073741824 as *const _
975    }
976}
977impl Deref for TIM2 {
978    type Target = tim2::RegisterBlock;
979    fn deref(&self) -> &tim2::RegisterBlock {
980        unsafe { &*TIM2::ptr() }
981    }
982}
983#[doc = "General-purpose-timers"]
984pub mod tim2;
985#[doc = "TIM3"]
986pub struct TIM3 {
987    _marker: PhantomData<*const ()>,
988}
989unsafe impl Send for TIM3 {}
990impl TIM3 {
991    #[doc = r" Returns a pointer to the register block"]
992    pub fn ptr() -> *const tim2::RegisterBlock {
993        1073742848 as *const _
994    }
995}
996impl Deref for TIM3 {
997    type Target = tim2::RegisterBlock;
998    fn deref(&self) -> &tim2::RegisterBlock {
999        unsafe { &*TIM3::ptr() }
1000    }
1001}
1002#[doc = "General purpose timers"]
1003pub struct TIM15 {
1004    _marker: PhantomData<*const ()>,
1005}
1006unsafe impl Send for TIM15 {}
1007impl TIM15 {
1008    #[doc = r" Returns a pointer to the register block"]
1009    pub fn ptr() -> *const tim15::RegisterBlock {
1010        1073823744 as *const _
1011    }
1012}
1013impl Deref for TIM15 {
1014    type Target = tim15::RegisterBlock;
1015    fn deref(&self) -> &tim15::RegisterBlock {
1016        unsafe { &*TIM15::ptr() }
1017    }
1018}
1019#[doc = "General purpose timers"]
1020pub mod tim15;
1021#[doc = "General purpose timers"]
1022pub struct TIM16 {
1023    _marker: PhantomData<*const ()>,
1024}
1025unsafe impl Send for TIM16 {}
1026impl TIM16 {
1027    #[doc = r" Returns a pointer to the register block"]
1028    pub fn ptr() -> *const tim16::RegisterBlock {
1029        1073824768 as *const _
1030    }
1031}
1032impl Deref for TIM16 {
1033    type Target = tim16::RegisterBlock;
1034    fn deref(&self) -> &tim16::RegisterBlock {
1035        unsafe { &*TIM16::ptr() }
1036    }
1037}
1038#[doc = "General purpose timers"]
1039pub mod tim16;
1040#[doc = "Advanced-timers"]
1041pub struct TIM1 {
1042    _marker: PhantomData<*const ()>,
1043}
1044unsafe impl Send for TIM1 {}
1045impl TIM1 {
1046    #[doc = r" Returns a pointer to the register block"]
1047    pub fn ptr() -> *const tim1::RegisterBlock {
1048        1073818624 as *const _
1049    }
1050}
1051impl Deref for TIM1 {
1052    type Target = tim1::RegisterBlock;
1053    fn deref(&self) -> &tim1::RegisterBlock {
1054        unsafe { &*TIM1::ptr() }
1055    }
1056}
1057#[doc = "Advanced-timers"]
1058pub mod tim1;
1059#[doc = "Basic-timers"]
1060pub struct TIM6 {
1061    _marker: PhantomData<*const ()>,
1062}
1063unsafe impl Send for TIM6 {}
1064impl TIM6 {
1065    #[doc = r" Returns a pointer to the register block"]
1066    pub fn ptr() -> *const tim6::RegisterBlock {
1067        1073745920 as *const _
1068    }
1069}
1070impl Deref for TIM6 {
1071    type Target = tim6::RegisterBlock;
1072    fn deref(&self) -> &tim6::RegisterBlock {
1073        unsafe { &*TIM6::ptr() }
1074    }
1075}
1076#[doc = "Basic-timers"]
1077pub mod tim6;
1078#[doc = "TIM7"]
1079pub struct TIM7 {
1080    _marker: PhantomData<*const ()>,
1081}
1082unsafe impl Send for TIM7 {}
1083impl TIM7 {
1084    #[doc = r" Returns a pointer to the register block"]
1085    pub fn ptr() -> *const tim6::RegisterBlock {
1086        1073746944 as *const _
1087    }
1088}
1089impl Deref for TIM7 {
1090    type Target = tim6::RegisterBlock;
1091    fn deref(&self) -> &tim6::RegisterBlock {
1092        unsafe { &*TIM7::ptr() }
1093    }
1094}
1095#[doc = "Low power timer"]
1096pub struct LPTIM1 {
1097    _marker: PhantomData<*const ()>,
1098}
1099unsafe impl Send for LPTIM1 {}
1100impl LPTIM1 {
1101    #[doc = r" Returns a pointer to the register block"]
1102    pub fn ptr() -> *const lptim1::RegisterBlock {
1103        1073773568 as *const _
1104    }
1105}
1106impl Deref for LPTIM1 {
1107    type Target = lptim1::RegisterBlock;
1108    fn deref(&self) -> &lptim1::RegisterBlock {
1109        unsafe { &*LPTIM1::ptr() }
1110    }
1111}
1112#[doc = "Low power timer"]
1113pub mod lptim1;
1114#[doc = "LPTIM2"]
1115pub struct LPTIM2 {
1116    _marker: PhantomData<*const ()>,
1117}
1118unsafe impl Send for LPTIM2 {}
1119impl LPTIM2 {
1120    #[doc = r" Returns a pointer to the register block"]
1121    pub fn ptr() -> *const lptim1::RegisterBlock {
1122        1073779712 as *const _
1123    }
1124}
1125impl Deref for LPTIM2 {
1126    type Target = lptim1::RegisterBlock;
1127    fn deref(&self) -> &lptim1::RegisterBlock {
1128        unsafe { &*LPTIM2::ptr() }
1129    }
1130}
1131#[doc = "Universal synchronous asynchronous receiver transmitter"]
1132pub struct USART1 {
1133    _marker: PhantomData<*const ()>,
1134}
1135unsafe impl Send for USART1 {}
1136impl USART1 {
1137    #[doc = r" Returns a pointer to the register block"]
1138    pub fn ptr() -> *const usart1::RegisterBlock {
1139        1073821696 as *const _
1140    }
1141}
1142impl Deref for USART1 {
1143    type Target = usart1::RegisterBlock;
1144    fn deref(&self) -> &usart1::RegisterBlock {
1145        unsafe { &*USART1::ptr() }
1146    }
1147}
1148#[doc = "Universal synchronous asynchronous receiver transmitter"]
1149pub mod usart1;
1150#[doc = "USART2"]
1151pub struct USART2 {
1152    _marker: PhantomData<*const ()>,
1153}
1154unsafe impl Send for USART2 {}
1155impl USART2 {
1156    #[doc = r" Returns a pointer to the register block"]
1157    pub fn ptr() -> *const usart1::RegisterBlock {
1158        1073759232 as *const _
1159    }
1160}
1161impl Deref for USART2 {
1162    type Target = usart1::RegisterBlock;
1163    fn deref(&self) -> &usart1::RegisterBlock {
1164        unsafe { &*USART2::ptr() }
1165    }
1166}
1167#[doc = "UART4"]
1168pub struct UART4 {
1169    _marker: PhantomData<*const ()>,
1170}
1171unsafe impl Send for UART4 {}
1172impl UART4 {
1173    #[doc = r" Returns a pointer to the register block"]
1174    pub fn ptr() -> *const usart1::RegisterBlock {
1175        1073761280 as *const _
1176    }
1177}
1178impl Deref for UART4 {
1179    type Target = usart1::RegisterBlock;
1180    fn deref(&self) -> &usart1::RegisterBlock {
1181        unsafe { &*UART4::ptr() }
1182    }
1183}
1184#[doc = "Universal synchronous asynchronous receiver transmitter"]
1185pub struct USART3 {
1186    _marker: PhantomData<*const ()>,
1187}
1188unsafe impl Send for USART3 {}
1189impl USART3 {
1190    #[doc = r" Returns a pointer to the register block"]
1191    pub fn ptr() -> *const usart3::RegisterBlock {
1192        1073760256 as *const _
1193    }
1194}
1195impl Deref for USART3 {
1196    type Target = usart3::RegisterBlock;
1197    fn deref(&self) -> &usart3::RegisterBlock {
1198        unsafe { &*USART3::ptr() }
1199    }
1200}
1201#[doc = "Universal synchronous asynchronous receiver transmitter"]
1202pub mod usart3;
1203#[doc = "Universal synchronous asynchronous receiver transmitter"]
1204pub struct LPUART1 {
1205    _marker: PhantomData<*const ()>,
1206}
1207unsafe impl Send for LPUART1 {}
1208impl LPUART1 {
1209    #[doc = r" Returns a pointer to the register block"]
1210    pub fn ptr() -> *const lpuart1::RegisterBlock {
1211        1073774592 as *const _
1212    }
1213}
1214impl Deref for LPUART1 {
1215    type Target = lpuart1::RegisterBlock;
1216    fn deref(&self) -> &lpuart1::RegisterBlock {
1217        unsafe { &*LPUART1::ptr() }
1218    }
1219}
1220#[doc = "Universal synchronous asynchronous receiver transmitter"]
1221pub mod lpuart1;
1222#[doc = "Serial peripheral interface/Inter-IC sound"]
1223pub struct SPI1 {
1224    _marker: PhantomData<*const ()>,
1225}
1226unsafe impl Send for SPI1 {}
1227impl SPI1 {
1228    #[doc = r" Returns a pointer to the register block"]
1229    pub fn ptr() -> *const spi1::RegisterBlock {
1230        1073819648 as *const _
1231    }
1232}
1233impl Deref for SPI1 {
1234    type Target = spi1::RegisterBlock;
1235    fn deref(&self) -> &spi1::RegisterBlock {
1236        unsafe { &*SPI1::ptr() }
1237    }
1238}
1239#[doc = "Serial peripheral interface/Inter-IC sound"]
1240pub mod spi1;
1241#[doc = "SPI3"]
1242pub struct SPI3 {
1243    _marker: PhantomData<*const ()>,
1244}
1245unsafe impl Send for SPI3 {}
1246impl SPI3 {
1247    #[doc = r" Returns a pointer to the register block"]
1248    pub fn ptr() -> *const spi1::RegisterBlock {
1249        1073757184 as *const _
1250    }
1251}
1252impl Deref for SPI3 {
1253    type Target = spi1::RegisterBlock;
1254    fn deref(&self) -> &spi1::RegisterBlock {
1255        unsafe { &*SPI3::ptr() }
1256    }
1257}
1258#[doc = "SPI2"]
1259pub struct SPI2 {
1260    _marker: PhantomData<*const ()>,
1261}
1262unsafe impl Send for SPI2 {}
1263impl SPI2 {
1264    #[doc = r" Returns a pointer to the register block"]
1265    pub fn ptr() -> *const spi1::RegisterBlock {
1266        1073756160 as *const _
1267    }
1268}
1269impl Deref for SPI2 {
1270    type Target = spi1::RegisterBlock;
1271    fn deref(&self) -> &spi1::RegisterBlock {
1272        unsafe { &*SPI2::ptr() }
1273    }
1274}
1275#[doc = "Secure digital input/output interface"]
1276pub struct SDMMC {
1277    _marker: PhantomData<*const ()>,
1278}
1279unsafe impl Send for SDMMC {}
1280impl SDMMC {
1281    #[doc = r" Returns a pointer to the register block"]
1282    pub fn ptr() -> *const sdmmc::RegisterBlock {
1283        1073817600 as *const _
1284    }
1285}
1286impl Deref for SDMMC {
1287    type Target = sdmmc::RegisterBlock;
1288    fn deref(&self) -> &sdmmc::RegisterBlock {
1289        unsafe { &*SDMMC::ptr() }
1290    }
1291}
1292#[doc = "Secure digital input/output interface"]
1293pub mod sdmmc;
1294#[doc = "External interrupt/event controller"]
1295pub struct EXTI {
1296    _marker: PhantomData<*const ()>,
1297}
1298unsafe impl Send for EXTI {}
1299impl EXTI {
1300    #[doc = r" Returns a pointer to the register block"]
1301    pub fn ptr() -> *const exti::RegisterBlock {
1302        1073808384 as *const _
1303    }
1304}
1305impl Deref for EXTI {
1306    type Target = exti::RegisterBlock;
1307    fn deref(&self) -> &exti::RegisterBlock {
1308        unsafe { &*EXTI::ptr() }
1309    }
1310}
1311#[doc = "External interrupt/event controller"]
1312pub mod exti;
1313#[doc = "Voltage reference buffer"]
1314pub struct VREFBUF {
1315    _marker: PhantomData<*const ()>,
1316}
1317unsafe impl Send for VREFBUF {}
1318impl VREFBUF {
1319    #[doc = r" Returns a pointer to the register block"]
1320    pub fn ptr() -> *const vrefbuf::RegisterBlock {
1321        1073807408 as *const _
1322    }
1323}
1324impl Deref for VREFBUF {
1325    type Target = vrefbuf::RegisterBlock;
1326    fn deref(&self) -> &vrefbuf::RegisterBlock {
1327        unsafe { &*VREFBUF::ptr() }
1328    }
1329}
1330#[doc = "Voltage reference buffer"]
1331pub mod vrefbuf;
1332#[doc = "Controller area network"]
1333pub struct CAN1 {
1334    _marker: PhantomData<*const ()>,
1335}
1336unsafe impl Send for CAN1 {}
1337impl CAN1 {
1338    #[doc = r" Returns a pointer to the register block"]
1339    pub fn ptr() -> *const can1::RegisterBlock {
1340        1073767424 as *const _
1341    }
1342}
1343impl Deref for CAN1 {
1344    type Target = can1::RegisterBlock;
1345    fn deref(&self) -> &can1::RegisterBlock {
1346        unsafe { &*CAN1::ptr() }
1347    }
1348}
1349#[doc = "Controller area network"]
1350pub mod can1;
1351#[doc = "Real-time clock"]
1352pub struct RTC {
1353    _marker: PhantomData<*const ()>,
1354}
1355unsafe impl Send for RTC {}
1356impl RTC {
1357    #[doc = r" Returns a pointer to the register block"]
1358    pub fn ptr() -> *const rtc::RegisterBlock {
1359        1073752064 as *const _
1360    }
1361}
1362impl Deref for RTC {
1363    type Target = rtc::RegisterBlock;
1364    fn deref(&self) -> &rtc::RegisterBlock {
1365        unsafe { &*RTC::ptr() }
1366    }
1367}
1368#[doc = "Real-time clock"]
1369pub mod rtc;
1370#[doc = "Single Wire Protocol Master Interface"]
1371pub struct SWPMI1 {
1372    _marker: PhantomData<*const ()>,
1373}
1374unsafe impl Send for SWPMI1 {}
1375impl SWPMI1 {
1376    #[doc = r" Returns a pointer to the register block"]
1377    pub fn ptr() -> *const swpmi1::RegisterBlock {
1378        1073776640 as *const _
1379    }
1380}
1381impl Deref for SWPMI1 {
1382    type Target = swpmi1::RegisterBlock;
1383    fn deref(&self) -> &swpmi1::RegisterBlock {
1384        unsafe { &*SWPMI1::ptr() }
1385    }
1386}
1387#[doc = "Single Wire Protocol Master Interface"]
1388pub mod swpmi1;
1389#[doc = "Operational amplifiers"]
1390pub struct OPAMP {
1391    _marker: PhantomData<*const ()>,
1392}
1393unsafe impl Send for OPAMP {}
1394impl OPAMP {
1395    #[doc = r" Returns a pointer to the register block"]
1396    pub fn ptr() -> *const opamp::RegisterBlock {
1397        1073772544 as *const _
1398    }
1399}
1400impl Deref for OPAMP {
1401    type Target = opamp::RegisterBlock;
1402    fn deref(&self) -> &opamp::RegisterBlock {
1403        unsafe { &*OPAMP::ptr() }
1404    }
1405}
1406#[doc = "Operational amplifiers"]
1407pub mod opamp;
1408#[doc = "Clock recovery system"]
1409pub struct CRS {
1410    _marker: PhantomData<*const ()>,
1411}
1412unsafe impl Send for CRS {}
1413impl CRS {
1414    #[doc = r" Returns a pointer to the register block"]
1415    pub fn ptr() -> *const crs::RegisterBlock {
1416        1073766400 as *const _
1417    }
1418}
1419impl Deref for CRS {
1420    type Target = crs::RegisterBlock;
1421    fn deref(&self) -> &crs::RegisterBlock {
1422        unsafe { &*CRS::ptr() }
1423    }
1424}
1425#[doc = "Clock recovery system"]
1426pub mod crs;
1427#[doc = "Universal serial bus full-speed device interface"]
1428pub struct USB {
1429    _marker: PhantomData<*const ()>,
1430}
1431unsafe impl Send for USB {}
1432impl USB {
1433    #[doc = r" Returns a pointer to the register block"]
1434    pub fn ptr() -> *const usb::RegisterBlock {
1435        1073768448 as *const _
1436    }
1437}
1438impl Deref for USB {
1439    type Target = usb::RegisterBlock;
1440    fn deref(&self) -> &usb::RegisterBlock {
1441        unsafe { &*USB::ptr() }
1442    }
1443}
1444#[doc = "Universal serial bus full-speed device interface"]
1445pub mod usb;
1446#[doc = "Digital filter for sigma delta modulators"]
1447pub struct DFSDM {
1448    _marker: PhantomData<*const ()>,
1449}
1450unsafe impl Send for DFSDM {}
1451impl DFSDM {
1452    #[doc = r" Returns a pointer to the register block"]
1453    pub fn ptr() -> *const dfsdm::RegisterBlock {
1454        1073831936 as *const _
1455    }
1456}
1457impl Deref for DFSDM {
1458    type Target = dfsdm::RegisterBlock;
1459    fn deref(&self) -> &dfsdm::RegisterBlock {
1460        unsafe { &*DFSDM::ptr() }
1461    }
1462}
1463#[doc = "Digital filter for sigma delta modulators"]
1464pub mod dfsdm;
1465#[doc = "QuadSPI interface"]
1466pub struct QUADSPI {
1467    _marker: PhantomData<*const ()>,
1468}
1469unsafe impl Send for QUADSPI {}
1470impl QUADSPI {
1471    #[doc = r" Returns a pointer to the register block"]
1472    pub fn ptr() -> *const quadspi::RegisterBlock {
1473        2684358656 as *const _
1474    }
1475}
1476impl Deref for QUADSPI {
1477    type Target = quadspi::RegisterBlock;
1478    fn deref(&self) -> &quadspi::RegisterBlock {
1479        unsafe { &*QUADSPI::ptr() }
1480    }
1481}
1482#[doc = "QuadSPI interface"]
1483pub mod quadspi;
1484#[doc = "MCU debug component"]
1485pub struct DBGMCU {
1486    _marker: PhantomData<*const ()>,
1487}
1488unsafe impl Send for DBGMCU {}
1489impl DBGMCU {
1490    #[doc = r" Returns a pointer to the register block"]
1491    pub fn ptr() -> *const dbgmcu::RegisterBlock {
1492        3758366720 as *const _
1493    }
1494}
1495impl Deref for DBGMCU {
1496    type Target = dbgmcu::RegisterBlock;
1497    fn deref(&self) -> &dbgmcu::RegisterBlock {
1498        unsafe { &*DBGMCU::ptr() }
1499    }
1500}
1501#[doc = "MCU debug component"]
1502pub mod dbgmcu;
1503#[doc = "Floting point unit"]
1504pub struct FPU {
1505    _marker: PhantomData<*const ()>,
1506}
1507unsafe impl Send for FPU {}
1508impl FPU {
1509    #[doc = r" Returns a pointer to the register block"]
1510    pub fn ptr() -> *const fpu::RegisterBlock {
1511        3758157620 as *const _
1512    }
1513}
1514impl Deref for FPU {
1515    type Target = fpu::RegisterBlock;
1516    fn deref(&self) -> &fpu::RegisterBlock {
1517        unsafe { &*FPU::ptr() }
1518    }
1519}
1520#[doc = "Floting point unit"]
1521pub mod fpu;
1522#[doc = "SysTick timer"]
1523pub struct STK {
1524    _marker: PhantomData<*const ()>,
1525}
1526unsafe impl Send for STK {}
1527impl STK {
1528    #[doc = r" Returns a pointer to the register block"]
1529    pub fn ptr() -> *const stk::RegisterBlock {
1530        3758153744 as *const _
1531    }
1532}
1533impl Deref for STK {
1534    type Target = stk::RegisterBlock;
1535    fn deref(&self) -> &stk::RegisterBlock {
1536        unsafe { &*STK::ptr() }
1537    }
1538}
1539#[doc = "SysTick timer"]
1540pub mod stk;
1541#[doc = "Nested vectored interrupt controller"]
1542pub struct NVIC_STIR {
1543    _marker: PhantomData<*const ()>,
1544}
1545unsafe impl Send for NVIC_STIR {}
1546impl NVIC_STIR {
1547    #[doc = r" Returns a pointer to the register block"]
1548    pub fn ptr() -> *const nvic_stir::RegisterBlock {
1549        3758157568 as *const _
1550    }
1551}
1552impl Deref for NVIC_STIR {
1553    type Target = nvic_stir::RegisterBlock;
1554    fn deref(&self) -> &nvic_stir::RegisterBlock {
1555        unsafe { &*NVIC_STIR::ptr() }
1556    }
1557}
1558#[doc = "Nested vectored interrupt controller"]
1559pub mod nvic_stir;
1560#[doc = "Floating point unit CPACR"]
1561pub struct FPU_CPACR {
1562    _marker: PhantomData<*const ()>,
1563}
1564unsafe impl Send for FPU_CPACR {}
1565impl FPU_CPACR {
1566    #[doc = r" Returns a pointer to the register block"]
1567    pub fn ptr() -> *const fpu_cpacr::RegisterBlock {
1568        3758157192 as *const _
1569    }
1570}
1571impl Deref for FPU_CPACR {
1572    type Target = fpu_cpacr::RegisterBlock;
1573    fn deref(&self) -> &fpu_cpacr::RegisterBlock {
1574        unsafe { &*FPU_CPACR::ptr() }
1575    }
1576}
1577#[doc = "Floating point unit CPACR"]
1578pub mod fpu_cpacr;
1579#[doc = "System control block ACTLR"]
1580pub struct SCB_ACTRL {
1581    _marker: PhantomData<*const ()>,
1582}
1583unsafe impl Send for SCB_ACTRL {}
1584impl SCB_ACTRL {
1585    #[doc = r" Returns a pointer to the register block"]
1586    pub fn ptr() -> *const scb_actrl::RegisterBlock {
1587        3758153736 as *const _
1588    }
1589}
1590impl Deref for SCB_ACTRL {
1591    type Target = scb_actrl::RegisterBlock;
1592    fn deref(&self) -> &scb_actrl::RegisterBlock {
1593        unsafe { &*SCB_ACTRL::ptr() }
1594    }
1595}
1596#[doc = "System control block ACTLR"]
1597pub mod scb_actrl;
1598#[allow(renamed_and_removed_lints)]
1599#[allow(private_no_mangle_statics)]
1600#[no_mangle]
1601static mut DEVICE_PERIPHERALS: bool = false;
1602#[doc = r" All the peripherals"]
1603#[allow(non_snake_case)]
1604pub struct Peripherals {
1605    #[doc = "DAC1"]
1606    pub DAC1: DAC1,
1607    #[doc = "DMA1"]
1608    pub DMA1: DMA1,
1609    #[doc = "DMA2"]
1610    pub DMA2: DMA2,
1611    #[doc = "CRC"]
1612    pub CRC: CRC,
1613    #[doc = "LCD"]
1614    pub LCD: LCD,
1615    #[doc = "TSC"]
1616    pub TSC: TSC,
1617    #[doc = "IWDG"]
1618    pub IWDG: IWDG,
1619    #[doc = "WWDG"]
1620    pub WWDG: WWDG,
1621    #[doc = "COMP"]
1622    pub COMP: COMP,
1623    #[doc = "FIREWALL"]
1624    pub FIREWALL: FIREWALL,
1625    #[doc = "I2C1"]
1626    pub I2C1: I2C1,
1627    #[doc = "I2C3"]
1628    pub I2C3: I2C3,
1629    #[doc = "I2C2"]
1630    pub I2C2: I2C2,
1631    #[doc = "I2C4"]
1632    pub I2C4: I2C4,
1633    #[doc = "FLASH"]
1634    pub FLASH: FLASH,
1635    #[doc = "RCC"]
1636    pub RCC: RCC,
1637    #[doc = "PWR"]
1638    pub PWR: PWR,
1639    #[doc = "SYSCFG"]
1640    pub SYSCFG: SYSCFG,
1641    #[doc = "RNG"]
1642    pub RNG: RNG,
1643    #[doc = "AES"]
1644    pub AES: AES,
1645    #[doc = "ADC"]
1646    pub ADC: ADC,
1647    #[doc = "GPIOA"]
1648    pub GPIOA: GPIOA,
1649    #[doc = "GPIOB"]
1650    pub GPIOB: GPIOB,
1651    #[doc = "GPIOC"]
1652    pub GPIOC: GPIOC,
1653    #[doc = "GPIOD"]
1654    pub GPIOD: GPIOD,
1655    #[doc = "GPIOE"]
1656    pub GPIOE: GPIOE,
1657    #[doc = "GPIOH"]
1658    pub GPIOH: GPIOH,
1659    #[doc = "SAI1"]
1660    pub SAI1: SAI1,
1661    #[doc = "TIM2"]
1662    pub TIM2: TIM2,
1663    #[doc = "TIM3"]
1664    pub TIM3: TIM3,
1665    #[doc = "TIM15"]
1666    pub TIM15: TIM15,
1667    #[doc = "TIM16"]
1668    pub TIM16: TIM16,
1669    #[doc = "TIM1"]
1670    pub TIM1: TIM1,
1671    #[doc = "TIM6"]
1672    pub TIM6: TIM6,
1673    #[doc = "TIM7"]
1674    pub TIM7: TIM7,
1675    #[doc = "LPTIM1"]
1676    pub LPTIM1: LPTIM1,
1677    #[doc = "LPTIM2"]
1678    pub LPTIM2: LPTIM2,
1679    #[doc = "USART1"]
1680    pub USART1: USART1,
1681    #[doc = "USART2"]
1682    pub USART2: USART2,
1683    #[doc = "UART4"]
1684    pub UART4: UART4,
1685    #[doc = "USART3"]
1686    pub USART3: USART3,
1687    #[doc = "LPUART1"]
1688    pub LPUART1: LPUART1,
1689    #[doc = "SPI1"]
1690    pub SPI1: SPI1,
1691    #[doc = "SPI3"]
1692    pub SPI3: SPI3,
1693    #[doc = "SPI2"]
1694    pub SPI2: SPI2,
1695    #[doc = "SDMMC"]
1696    pub SDMMC: SDMMC,
1697    #[doc = "EXTI"]
1698    pub EXTI: EXTI,
1699    #[doc = "VREFBUF"]
1700    pub VREFBUF: VREFBUF,
1701    #[doc = "CAN1"]
1702    pub CAN1: CAN1,
1703    #[doc = "RTC"]
1704    pub RTC: RTC,
1705    #[doc = "SWPMI1"]
1706    pub SWPMI1: SWPMI1,
1707    #[doc = "OPAMP"]
1708    pub OPAMP: OPAMP,
1709    #[doc = "CRS"]
1710    pub CRS: CRS,
1711    #[doc = "USB"]
1712    pub USB: USB,
1713    #[doc = "DFSDM"]
1714    pub DFSDM: DFSDM,
1715    #[doc = "QUADSPI"]
1716    pub QUADSPI: QUADSPI,
1717    #[doc = "DBGMCU"]
1718    pub DBGMCU: DBGMCU,
1719    #[doc = "FPU"]
1720    pub FPU: FPU,
1721    #[doc = "STK"]
1722    pub STK: STK,
1723    #[doc = "NVIC_STIR"]
1724    pub NVIC_STIR: NVIC_STIR,
1725    #[doc = "FPU_CPACR"]
1726    pub FPU_CPACR: FPU_CPACR,
1727    #[doc = "SCB_ACTRL"]
1728    pub SCB_ACTRL: SCB_ACTRL,
1729}
1730impl Peripherals {
1731    #[doc = r" Returns all the peripherals *once*"]
1732    #[inline]
1733    pub fn take() -> Option<Self> {
1734        cortex_m::interrupt::free(|_| {
1735            if unsafe { DEVICE_PERIPHERALS } {
1736                None
1737            } else {
1738                Some(unsafe { Peripherals::steal() })
1739            }
1740        })
1741    }
1742    #[doc = r" Unchecked version of `Peripherals::take`"]
1743    pub unsafe fn steal() -> Self {
1744        debug_assert!(!DEVICE_PERIPHERALS);
1745        DEVICE_PERIPHERALS = true;
1746        Peripherals {
1747            DAC1: DAC1 {
1748                _marker: PhantomData,
1749            },
1750            DMA1: DMA1 {
1751                _marker: PhantomData,
1752            },
1753            DMA2: DMA2 {
1754                _marker: PhantomData,
1755            },
1756            CRC: CRC {
1757                _marker: PhantomData,
1758            },
1759            LCD: LCD {
1760                _marker: PhantomData,
1761            },
1762            TSC: TSC {
1763                _marker: PhantomData,
1764            },
1765            IWDG: IWDG {
1766                _marker: PhantomData,
1767            },
1768            WWDG: WWDG {
1769                _marker: PhantomData,
1770            },
1771            COMP: COMP {
1772                _marker: PhantomData,
1773            },
1774            FIREWALL: FIREWALL {
1775                _marker: PhantomData,
1776            },
1777            I2C1: I2C1 {
1778                _marker: PhantomData,
1779            },
1780            I2C3: I2C3 {
1781                _marker: PhantomData,
1782            },
1783            I2C2: I2C2 {
1784                _marker: PhantomData,
1785            },
1786            I2C4: I2C4 {
1787                _marker: PhantomData,
1788            },
1789            FLASH: FLASH {
1790                _marker: PhantomData,
1791            },
1792            RCC: RCC {
1793                _marker: PhantomData,
1794            },
1795            PWR: PWR {
1796                _marker: PhantomData,
1797            },
1798            SYSCFG: SYSCFG {
1799                _marker: PhantomData,
1800            },
1801            RNG: RNG {
1802                _marker: PhantomData,
1803            },
1804            AES: AES {
1805                _marker: PhantomData,
1806            },
1807            ADC: ADC {
1808                _marker: PhantomData,
1809            },
1810            GPIOA: GPIOA {
1811                _marker: PhantomData,
1812            },
1813            GPIOB: GPIOB {
1814                _marker: PhantomData,
1815            },
1816            GPIOC: GPIOC {
1817                _marker: PhantomData,
1818            },
1819            GPIOD: GPIOD {
1820                _marker: PhantomData,
1821            },
1822            GPIOE: GPIOE {
1823                _marker: PhantomData,
1824            },
1825            GPIOH: GPIOH {
1826                _marker: PhantomData,
1827            },
1828            SAI1: SAI1 {
1829                _marker: PhantomData,
1830            },
1831            TIM2: TIM2 {
1832                _marker: PhantomData,
1833            },
1834            TIM3: TIM3 {
1835                _marker: PhantomData,
1836            },
1837            TIM15: TIM15 {
1838                _marker: PhantomData,
1839            },
1840            TIM16: TIM16 {
1841                _marker: PhantomData,
1842            },
1843            TIM1: TIM1 {
1844                _marker: PhantomData,
1845            },
1846            TIM6: TIM6 {
1847                _marker: PhantomData,
1848            },
1849            TIM7: TIM7 {
1850                _marker: PhantomData,
1851            },
1852            LPTIM1: LPTIM1 {
1853                _marker: PhantomData,
1854            },
1855            LPTIM2: LPTIM2 {
1856                _marker: PhantomData,
1857            },
1858            USART1: USART1 {
1859                _marker: PhantomData,
1860            },
1861            USART2: USART2 {
1862                _marker: PhantomData,
1863            },
1864            UART4: UART4 {
1865                _marker: PhantomData,
1866            },
1867            USART3: USART3 {
1868                _marker: PhantomData,
1869            },
1870            LPUART1: LPUART1 {
1871                _marker: PhantomData,
1872            },
1873            SPI1: SPI1 {
1874                _marker: PhantomData,
1875            },
1876            SPI3: SPI3 {
1877                _marker: PhantomData,
1878            },
1879            SPI2: SPI2 {
1880                _marker: PhantomData,
1881            },
1882            SDMMC: SDMMC {
1883                _marker: PhantomData,
1884            },
1885            EXTI: EXTI {
1886                _marker: PhantomData,
1887            },
1888            VREFBUF: VREFBUF {
1889                _marker: PhantomData,
1890            },
1891            CAN1: CAN1 {
1892                _marker: PhantomData,
1893            },
1894            RTC: RTC {
1895                _marker: PhantomData,
1896            },
1897            SWPMI1: SWPMI1 {
1898                _marker: PhantomData,
1899            },
1900            OPAMP: OPAMP {
1901                _marker: PhantomData,
1902            },
1903            CRS: CRS {
1904                _marker: PhantomData,
1905            },
1906            USB: USB {
1907                _marker: PhantomData,
1908            },
1909            DFSDM: DFSDM {
1910                _marker: PhantomData,
1911            },
1912            QUADSPI: QUADSPI {
1913                _marker: PhantomData,
1914            },
1915            DBGMCU: DBGMCU {
1916                _marker: PhantomData,
1917            },
1918            FPU: FPU {
1919                _marker: PhantomData,
1920            },
1921            STK: STK {
1922                _marker: PhantomData,
1923            },
1924            NVIC_STIR: NVIC_STIR {
1925                _marker: PhantomData,
1926            },
1927            FPU_CPACR: FPU_CPACR {
1928                _marker: PhantomData,
1929            },
1930            SCB_ACTRL: SCB_ACTRL {
1931                _marker: PhantomData,
1932            },
1933        }
1934    }
1935}