stm32f3_staging/stm32f373/
mod.rs

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