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