1#![doc = "Peripheral access API for STM32F30X microcontrollers (generated using svd2rust v0.14.0)\n\nYou can find an overview of the API [here].\n\n[here]: https://docs.rs/svd2rust/0.14.0/svd2rust/#peripheral-api"]
2#![deny(missing_docs)]
3#![deny(warnings)]
4#![allow(non_camel_case_types)]
5#![no_std]
6extern crate bare_metal;
7extern crate cortex_m;
8#[cfg(feature = "rt")]
9extern crate cortex_m_rt;
10extern crate vcell;
11use core::marker::PhantomData;
12use core::ops::Deref;
13#[doc = r" Number available in the NVIC for configuring priority"]
14pub const NVIC_PRIO_BITS: u8 = 4;
15#[cfg(feature = "rt")]
16extern "C" {
17 fn WWDG();
18 fn PVD();
19 fn TAMP_STAMP();
20 fn RTC_WKUP();
21 fn FLASH();
22 fn RCC();
23 fn EXTI0();
24 fn EXTI1();
25 fn EXTI2_TSC();
26 fn EXTI3();
27 fn EXTI4();
28 fn DMA1_CH1();
29 fn DMA1_CH2();
30 fn DMA1_CH3();
31 fn DMA1_CH4();
32 fn DMA1_CH5();
33 fn DMA1_CH6();
34 fn DMA1_CH7();
35 fn ADC1_2();
36 fn USB_HP_CAN_TX();
37 fn USB_LP_CAN_RX0();
38 fn CAN_RX1();
39 fn CAN_SCE();
40 fn EXTI9_5();
41 fn TIM1_BRK_TIM15();
42 fn TIM1_UP_TIM16();
43 fn TIM1_TRG_COM_TIM17();
44 fn TIM1_CC();
45 fn TIM2();
46 fn TIM3();
47 fn TIM4();
48 fn I2C1_EV_EXTI23();
49 fn I2C1_ER();
50 fn I2C2_EV_EXTI24();
51 fn I2C2_ER();
52 fn SPI1();
53 fn SPI2();
54 fn USART1_EXTI25();
55 fn USART2_EXTI26();
56 fn USART3_EXTI28();
57 fn EXTI15_10();
58 fn RTCALARM();
59 fn USB_WKUP();
60 fn TIM8_BRK();
61 fn TIM8_UP();
62 fn TIM8_TRG_COM();
63 fn TIM8_CC();
64 fn ADC3();
65 fn SPI3();
66 fn UART4_EXTI34();
67 fn UART5_EXTI35();
68 fn TIM6_DACUNDER();
69 fn TIM7();
70 fn DMA2_CH1();
71 fn DMA2_CH2();
72 fn DMA2_CH3();
73 fn DMA2_CH4();
74 fn DMA2_CH5();
75 fn ADC4();
76 fn COMP123();
77 fn COMP456();
78 fn COMP7();
79 fn USB_HP();
80 fn USB_LP();
81 fn USB_WKUP_EXTI();
82 fn FPU();
83}
84#[doc(hidden)]
85pub union Vector {
86 _handler: unsafe extern "C" fn(),
87 _reserved: u32,
88}
89#[cfg(feature = "rt")]
90#[doc(hidden)]
91#[link_section = ".vector_table.interrupts"]
92#[no_mangle]
93pub static __INTERRUPTS: [Vector; 82] = [
94 Vector { _handler: WWDG },
95 Vector { _handler: PVD },
96 Vector {
97 _handler: TAMP_STAMP,
98 },
99 Vector { _handler: RTC_WKUP },
100 Vector { _handler: FLASH },
101 Vector { _handler: RCC },
102 Vector { _handler: EXTI0 },
103 Vector { _handler: EXTI1 },
104 Vector {
105 _handler: EXTI2_TSC,
106 },
107 Vector { _handler: EXTI3 },
108 Vector { _handler: EXTI4 },
109 Vector { _handler: DMA1_CH1 },
110 Vector { _handler: DMA1_CH2 },
111 Vector { _handler: DMA1_CH3 },
112 Vector { _handler: DMA1_CH4 },
113 Vector { _handler: DMA1_CH5 },
114 Vector { _handler: DMA1_CH6 },
115 Vector { _handler: DMA1_CH7 },
116 Vector { _handler: ADC1_2 },
117 Vector {
118 _handler: USB_HP_CAN_TX,
119 },
120 Vector {
121 _handler: USB_LP_CAN_RX0,
122 },
123 Vector { _handler: CAN_RX1 },
124 Vector { _handler: CAN_SCE },
125 Vector { _handler: EXTI9_5 },
126 Vector {
127 _handler: TIM1_BRK_TIM15,
128 },
129 Vector {
130 _handler: TIM1_UP_TIM16,
131 },
132 Vector {
133 _handler: TIM1_TRG_COM_TIM17,
134 },
135 Vector { _handler: TIM1_CC },
136 Vector { _handler: TIM2 },
137 Vector { _handler: TIM3 },
138 Vector { _handler: TIM4 },
139 Vector {
140 _handler: I2C1_EV_EXTI23,
141 },
142 Vector { _handler: I2C1_ER },
143 Vector {
144 _handler: I2C2_EV_EXTI24,
145 },
146 Vector { _handler: I2C2_ER },
147 Vector { _handler: SPI1 },
148 Vector { _handler: SPI2 },
149 Vector {
150 _handler: USART1_EXTI25,
151 },
152 Vector {
153 _handler: USART2_EXTI26,
154 },
155 Vector {
156 _handler: USART3_EXTI28,
157 },
158 Vector {
159 _handler: EXTI15_10,
160 },
161 Vector { _handler: RTCALARM },
162 Vector { _handler: USB_WKUP },
163 Vector { _handler: TIM8_BRK },
164 Vector { _handler: TIM8_UP },
165 Vector {
166 _handler: TIM8_TRG_COM,
167 },
168 Vector { _handler: TIM8_CC },
169 Vector { _handler: ADC3 },
170 Vector { _reserved: 0 },
171 Vector { _reserved: 0 },
172 Vector { _reserved: 0 },
173 Vector { _handler: SPI3 },
174 Vector {
175 _handler: UART4_EXTI34,
176 },
177 Vector {
178 _handler: UART5_EXTI35,
179 },
180 Vector {
181 _handler: TIM6_DACUNDER,
182 },
183 Vector { _handler: TIM7 },
184 Vector { _handler: DMA2_CH1 },
185 Vector { _handler: DMA2_CH2 },
186 Vector { _handler: DMA2_CH3 },
187 Vector { _handler: DMA2_CH4 },
188 Vector { _handler: DMA2_CH5 },
189 Vector { _handler: ADC4 },
190 Vector { _reserved: 0 },
191 Vector { _reserved: 0 },
192 Vector { _handler: COMP123 },
193 Vector { _handler: COMP456 },
194 Vector { _handler: COMP7 },
195 Vector { _reserved: 0 },
196 Vector { _reserved: 0 },
197 Vector { _reserved: 0 },
198 Vector { _reserved: 0 },
199 Vector { _reserved: 0 },
200 Vector { _reserved: 0 },
201 Vector { _reserved: 0 },
202 Vector { _handler: USB_HP },
203 Vector { _handler: USB_LP },
204 Vector {
205 _handler: USB_WKUP_EXTI,
206 },
207 Vector { _reserved: 0 },
208 Vector { _reserved: 0 },
209 Vector { _reserved: 0 },
210 Vector { _reserved: 0 },
211 Vector { _handler: FPU },
212];
213#[doc = r" Enumeration of all the interrupts"]
214pub enum Interrupt {
215 #[doc = "0 - Window Watchdog interrupt"]
216 WWDG,
217 #[doc = "1 - PVD through EXTI line detection interrupt"]
218 PVD,
219 #[doc = "2 - Tamper and TimeStamp interrupts"]
220 TAMP_STAMP,
221 #[doc = "3 - RTC Wakeup interrupt through the EXTI line"]
222 RTC_WKUP,
223 #[doc = "4 - Flash global interrupt"]
224 FLASH,
225 #[doc = "5 - RCC global interrupt"]
226 RCC,
227 #[doc = "6 - EXTI Line0 interrupt"]
228 EXTI0,
229 #[doc = "7 - EXTI Line3 interrupt"]
230 EXTI1,
231 #[doc = "8 - EXTI Line2 and Touch sensing interrupts"]
232 EXTI2_TSC,
233 #[doc = "9 - EXTI Line3 interrupt"]
234 EXTI3,
235 #[doc = "10 - EXTI Line4 interrupt"]
236 EXTI4,
237 #[doc = "11 - DMA1 channel 1 interrupt"]
238 DMA1_CH1,
239 #[doc = "12 - DMA1 channel 2 interrupt"]
240 DMA1_CH2,
241 #[doc = "13 - DMA1 channel 3 interrupt"]
242 DMA1_CH3,
243 #[doc = "14 - DMA1 channel 4 interrupt"]
244 DMA1_CH4,
245 #[doc = "15 - DMA1 channel 5 interrupt"]
246 DMA1_CH5,
247 #[doc = "16 - DMA1 channel 6 interrupt"]
248 DMA1_CH6,
249 #[doc = "17 - DMA1 channel 7interrupt"]
250 DMA1_CH7,
251 #[doc = "18 - ADC1 and ADC2 global interrupt"]
252 ADC1_2,
253 #[doc = "19 - USB High Priority/CAN_TX interrupts"]
254 USB_HP_CAN_TX,
255 #[doc = "20 - USB Low Priority/CAN_RX0 interrupts"]
256 USB_LP_CAN_RX0,
257 #[doc = "21 - CAN_RX1 interrupt"]
258 CAN_RX1,
259 #[doc = "22 - CAN_SCE interrupt"]
260 CAN_SCE,
261 #[doc = "23 - EXTI Line5 to Line9 interrupts"]
262 EXTI9_5,
263 #[doc = "24 - TIM1 Break/TIM15 global interruts"]
264 TIM1_BRK_TIM15,
265 #[doc = "25 - TIM1 Update/TIM16 global interrupts"]
266 TIM1_UP_TIM16,
267 #[doc = "26 - TIM1 trigger and commutation/TIM17 interrupts"]
268 TIM1_TRG_COM_TIM17,
269 #[doc = "27 - TIM1 capture compare interrupt"]
270 TIM1_CC,
271 #[doc = "28 - TIM2 global interrupt"]
272 TIM2,
273 #[doc = "29 - TIM3 global interrupt"]
274 TIM3,
275 #[doc = "30 - TIM4 global interrupt"]
276 TIM4,
277 #[doc = "31 - I2C1 event interrupt and EXTI Line23 interrupt"]
278 I2C1_EV_EXTI23,
279 #[doc = "32 - I2C1 error interrupt"]
280 I2C1_ER,
281 #[doc = "33 - I2C2 event interrupt & EXTI Line24 interrupt"]
282 I2C2_EV_EXTI24,
283 #[doc = "34 - I2C2 error interrupt"]
284 I2C2_ER,
285 #[doc = "35 - SPI1 global interrupt"]
286 SPI1,
287 #[doc = "36 - SPI2 global interrupt"]
288 SPI2,
289 #[doc = "37 - USART1 global interrupt and EXTI Line 25 interrupt"]
290 USART1_EXTI25,
291 #[doc = "38 - USART2 global interrupt and EXTI Line 26 interrupt"]
292 USART2_EXTI26,
293 #[doc = "39 - USART3 global interrupt and EXTI Line 28 interrupt"]
294 USART3_EXTI28,
295 #[doc = "40 - EXTI Line15 to Line10 interrupts"]
296 EXTI15_10,
297 #[doc = "41 - RTC alarm interrupt"]
298 RTCALARM,
299 #[doc = "42 - USB wakeup from Suspend"]
300 USB_WKUP,
301 #[doc = "43 - TIM8 break interrupt"]
302 TIM8_BRK,
303 #[doc = "44 - TIM8 update interrupt"]
304 TIM8_UP,
305 #[doc = "45 - TIM8 Trigger and commutation interrupts"]
306 TIM8_TRG_COM,
307 #[doc = "46 - TIM8 capture compare interrupt"]
308 TIM8_CC,
309 #[doc = "47 - ADC3 global interrupt"]
310 ADC3,
311 #[doc = "51 - SPI3 global interrupt"]
312 SPI3,
313 #[doc = "52 - UART4 global and EXTI Line 34 interrupts"]
314 UART4_EXTI34,
315 #[doc = "53 - UART5 global and EXTI Line 35 interrupts"]
316 UART5_EXTI35,
317 #[doc = "54 - TIM6 global and DAC12 underrun interrupts"]
318 TIM6_DACUNDER,
319 #[doc = "55 - TIM7 global interrupt"]
320 TIM7,
321 #[doc = "56 - DMA2 channel1 global interrupt"]
322 DMA2_CH1,
323 #[doc = "57 - DMA2 channel2 global interrupt"]
324 DMA2_CH2,
325 #[doc = "58 - DMA2 channel3 global interrupt"]
326 DMA2_CH3,
327 #[doc = "59 - DMA2 channel4 global interrupt"]
328 DMA2_CH4,
329 #[doc = "60 - DMA2 channel5 global interrupt"]
330 DMA2_CH5,
331 #[doc = "61 - ADC4 global interrupt"]
332 ADC4,
333 #[doc = "64 - COMP1 & COMP2 & COMP3 interrupts combined with EXTI Lines 21, 22 and 29 interrupts"]
334 COMP123,
335 #[doc = "65 - COMP4 & COMP5 & COMP6 interrupts combined with EXTI Lines 30, 31 and 32 interrupts"]
336 COMP456,
337 #[doc = "66 - COMP7 interrupt combined with EXTI Line 33 interrupt"]
338 COMP7,
339 #[doc = "74 - USB High priority interrupt"]
340 USB_HP,
341 #[doc = "75 - USB Low priority interrupt"]
342 USB_LP,
343 #[doc = "76 - USB wakeup from Suspend and EXTI Line 18"]
344 USB_WKUP_EXTI,
345 #[doc = "81 - Floating point interrupt"]
346 FPU,
347}
348unsafe impl ::bare_metal::Nr for Interrupt {
349 #[inline]
350 fn nr(&self) -> u8 {
351 match *self {
352 Interrupt::WWDG => 0,
353 Interrupt::PVD => 1,
354 Interrupt::TAMP_STAMP => 2,
355 Interrupt::RTC_WKUP => 3,
356 Interrupt::FLASH => 4,
357 Interrupt::RCC => 5,
358 Interrupt::EXTI0 => 6,
359 Interrupt::EXTI1 => 7,
360 Interrupt::EXTI2_TSC => 8,
361 Interrupt::EXTI3 => 9,
362 Interrupt::EXTI4 => 10,
363 Interrupt::DMA1_CH1 => 11,
364 Interrupt::DMA1_CH2 => 12,
365 Interrupt::DMA1_CH3 => 13,
366 Interrupt::DMA1_CH4 => 14,
367 Interrupt::DMA1_CH5 => 15,
368 Interrupt::DMA1_CH6 => 16,
369 Interrupt::DMA1_CH7 => 17,
370 Interrupt::ADC1_2 => 18,
371 Interrupt::USB_HP_CAN_TX => 19,
372 Interrupt::USB_LP_CAN_RX0 => 20,
373 Interrupt::CAN_RX1 => 21,
374 Interrupt::CAN_SCE => 22,
375 Interrupt::EXTI9_5 => 23,
376 Interrupt::TIM1_BRK_TIM15 => 24,
377 Interrupt::TIM1_UP_TIM16 => 25,
378 Interrupt::TIM1_TRG_COM_TIM17 => 26,
379 Interrupt::TIM1_CC => 27,
380 Interrupt::TIM2 => 28,
381 Interrupt::TIM3 => 29,
382 Interrupt::TIM4 => 30,
383 Interrupt::I2C1_EV_EXTI23 => 31,
384 Interrupt::I2C1_ER => 32,
385 Interrupt::I2C2_EV_EXTI24 => 33,
386 Interrupt::I2C2_ER => 34,
387 Interrupt::SPI1 => 35,
388 Interrupt::SPI2 => 36,
389 Interrupt::USART1_EXTI25 => 37,
390 Interrupt::USART2_EXTI26 => 38,
391 Interrupt::USART3_EXTI28 => 39,
392 Interrupt::EXTI15_10 => 40,
393 Interrupt::RTCALARM => 41,
394 Interrupt::USB_WKUP => 42,
395 Interrupt::TIM8_BRK => 43,
396 Interrupt::TIM8_UP => 44,
397 Interrupt::TIM8_TRG_COM => 45,
398 Interrupt::TIM8_CC => 46,
399 Interrupt::ADC3 => 47,
400 Interrupt::SPI3 => 51,
401 Interrupt::UART4_EXTI34 => 52,
402 Interrupt::UART5_EXTI35 => 53,
403 Interrupt::TIM6_DACUNDER => 54,
404 Interrupt::TIM7 => 55,
405 Interrupt::DMA2_CH1 => 56,
406 Interrupt::DMA2_CH2 => 57,
407 Interrupt::DMA2_CH3 => 58,
408 Interrupt::DMA2_CH4 => 59,
409 Interrupt::DMA2_CH5 => 60,
410 Interrupt::ADC4 => 61,
411 Interrupt::COMP123 => 64,
412 Interrupt::COMP456 => 65,
413 Interrupt::COMP7 => 66,
414 Interrupt::USB_HP => 74,
415 Interrupt::USB_LP => 75,
416 Interrupt::USB_WKUP_EXTI => 76,
417 Interrupt::FPU => 81,
418 }
419 }
420}
421#[cfg(feature = "rt")]
422pub use self::Interrupt as interrupt;
423pub use cortex_m::peripheral::Peripherals as CorePeripherals;
424pub use cortex_m::peripheral::{CBP, CPUID, DCB, DWT, FPB, FPU, ITM, MPU, NVIC, SCB, SYST, TPIU};
425#[cfg(feature = "rt")]
426pub use cortex_m_rt::interrupt;
427#[doc = "General-purpose I/Os"]
428pub struct GPIOA {
429 _marker: PhantomData<*const ()>,
430}
431unsafe impl Send for GPIOA {}
432impl GPIOA {
433 #[doc = r" Returns a pointer to the register block"]
434 pub fn ptr() -> *const gpioa::RegisterBlock {
435 1207959552 as *const _
436 }
437}
438impl Deref for GPIOA {
439 type Target = gpioa::RegisterBlock;
440 fn deref(&self) -> &gpioa::RegisterBlock {
441 unsafe { &*GPIOA::ptr() }
442 }
443}
444#[doc = "General-purpose I/Os"]
445pub mod gpioa;
446#[doc = "General-purpose I/Os"]
447pub struct GPIOB {
448 _marker: PhantomData<*const ()>,
449}
450unsafe impl Send for GPIOB {}
451impl GPIOB {
452 #[doc = r" Returns a pointer to the register block"]
453 pub fn ptr() -> *const gpiob::RegisterBlock {
454 1207960576 as *const _
455 }
456}
457impl Deref for GPIOB {
458 type Target = gpiob::RegisterBlock;
459 fn deref(&self) -> &gpiob::RegisterBlock {
460 unsafe { &*GPIOB::ptr() }
461 }
462}
463#[doc = "General-purpose I/Os"]
464pub mod gpiob;
465#[doc = "General-purpose I/Os"]
466pub struct GPIOC {
467 _marker: PhantomData<*const ()>,
468}
469unsafe impl Send for GPIOC {}
470impl GPIOC {
471 #[doc = r" Returns a pointer to the register block"]
472 pub fn ptr() -> *const gpioc::RegisterBlock {
473 1207961600 as *const _
474 }
475}
476impl Deref for GPIOC {
477 type Target = gpioc::RegisterBlock;
478 fn deref(&self) -> &gpioc::RegisterBlock {
479 unsafe { &*GPIOC::ptr() }
480 }
481}
482#[doc = "General-purpose I/Os"]
483pub mod gpioc;
484#[doc = "GPIOD"]
485pub struct GPIOD {
486 _marker: PhantomData<*const ()>,
487}
488unsafe impl Send for GPIOD {}
489impl GPIOD {
490 #[doc = r" Returns a pointer to the register block"]
491 pub fn ptr() -> *const gpioc::RegisterBlock {
492 1207962624 as *const _
493 }
494}
495impl Deref for GPIOD {
496 type Target = gpioc::RegisterBlock;
497 fn deref(&self) -> &gpioc::RegisterBlock {
498 unsafe { &*GPIOD::ptr() }
499 }
500}
501#[doc = "GPIOE"]
502pub struct GPIOE {
503 _marker: PhantomData<*const ()>,
504}
505unsafe impl Send for GPIOE {}
506impl GPIOE {
507 #[doc = r" Returns a pointer to the register block"]
508 pub fn ptr() -> *const gpioc::RegisterBlock {
509 1207963648 as *const _
510 }
511}
512impl Deref for GPIOE {
513 type Target = gpioc::RegisterBlock;
514 fn deref(&self) -> &gpioc::RegisterBlock {
515 unsafe { &*GPIOE::ptr() }
516 }
517}
518#[doc = "GPIOF"]
519pub struct GPIOF {
520 _marker: PhantomData<*const ()>,
521}
522unsafe impl Send for GPIOF {}
523impl GPIOF {
524 #[doc = r" Returns a pointer to the register block"]
525 pub fn ptr() -> *const gpioc::RegisterBlock {
526 1207964672 as *const _
527 }
528}
529impl Deref for GPIOF {
530 type Target = gpioc::RegisterBlock;
531 fn deref(&self) -> &gpioc::RegisterBlock {
532 unsafe { &*GPIOF::ptr() }
533 }
534}
535#[doc = "Touch sensing controller"]
536pub struct TSC {
537 _marker: PhantomData<*const ()>,
538}
539unsafe impl Send for TSC {}
540impl TSC {
541 #[doc = r" Returns a pointer to the register block"]
542 pub fn ptr() -> *const tsc::RegisterBlock {
543 1073889280 as *const _
544 }
545}
546impl Deref for TSC {
547 type Target = tsc::RegisterBlock;
548 fn deref(&self) -> &tsc::RegisterBlock {
549 unsafe { &*TSC::ptr() }
550 }
551}
552#[doc = "Touch sensing controller"]
553pub mod tsc;
554#[doc = "cyclic redundancy check calculation unit"]
555pub struct CRC {
556 _marker: PhantomData<*const ()>,
557}
558unsafe impl Send for CRC {}
559impl CRC {
560 #[doc = r" Returns a pointer to the register block"]
561 pub fn ptr() -> *const crc::RegisterBlock {
562 1073885184 as *const _
563 }
564}
565impl Deref for CRC {
566 type Target = crc::RegisterBlock;
567 fn deref(&self) -> &crc::RegisterBlock {
568 unsafe { &*CRC::ptr() }
569 }
570}
571#[doc = "cyclic redundancy check calculation unit"]
572pub mod crc;
573#[doc = "Flash"]
574pub struct FLASH {
575 _marker: PhantomData<*const ()>,
576}
577unsafe impl Send for FLASH {}
578impl FLASH {
579 #[doc = r" Returns a pointer to the register block"]
580 pub fn ptr() -> *const flash::RegisterBlock {
581 1073881088 as *const _
582 }
583}
584impl Deref for FLASH {
585 type Target = flash::RegisterBlock;
586 fn deref(&self) -> &flash::RegisterBlock {
587 unsafe { &*FLASH::ptr() }
588 }
589}
590#[doc = "Flash"]
591pub mod flash;
592#[doc = "Reset and clock control"]
593pub struct RCC {
594 _marker: PhantomData<*const ()>,
595}
596unsafe impl Send for RCC {}
597impl RCC {
598 #[doc = r" Returns a pointer to the register block"]
599 pub fn ptr() -> *const rcc::RegisterBlock {
600 1073876992 as *const _
601 }
602}
603impl Deref for RCC {
604 type Target = rcc::RegisterBlock;
605 fn deref(&self) -> &rcc::RegisterBlock {
606 unsafe { &*RCC::ptr() }
607 }
608}
609#[doc = "Reset and clock control"]
610pub mod rcc;
611#[doc = "DMA controller 1"]
612pub struct DMA1 {
613 _marker: PhantomData<*const ()>,
614}
615unsafe impl Send for DMA1 {}
616impl DMA1 {
617 #[doc = r" Returns a pointer to the register block"]
618 pub fn ptr() -> *const dma1::RegisterBlock {
619 1073872896 as *const _
620 }
621}
622impl Deref for DMA1 {
623 type Target = dma1::RegisterBlock;
624 fn deref(&self) -> &dma1::RegisterBlock {
625 unsafe { &*DMA1::ptr() }
626 }
627}
628#[doc = "DMA controller 1"]
629pub mod dma1;
630#[doc = "DMA2"]
631pub struct DMA2 {
632 _marker: PhantomData<*const ()>,
633}
634unsafe impl Send for DMA2 {}
635impl DMA2 {
636 #[doc = r" Returns a pointer to the register block"]
637 pub fn ptr() -> *const dma1::RegisterBlock {
638 1073873920 as *const _
639 }
640}
641impl Deref for DMA2 {
642 type Target = dma1::RegisterBlock;
643 fn deref(&self) -> &dma1::RegisterBlock {
644 unsafe { &*DMA2::ptr() }
645 }
646}
647#[doc = "General purpose timer"]
648pub struct TIM2 {
649 _marker: PhantomData<*const ()>,
650}
651unsafe impl Send for TIM2 {}
652impl TIM2 {
653 #[doc = r" Returns a pointer to the register block"]
654 pub fn ptr() -> *const tim2::RegisterBlock {
655 1073741824 as *const _
656 }
657}
658impl Deref for TIM2 {
659 type Target = tim2::RegisterBlock;
660 fn deref(&self) -> &tim2::RegisterBlock {
661 unsafe { &*TIM2::ptr() }
662 }
663}
664#[doc = "General purpose timer"]
665pub mod tim2;
666#[doc = "TIM3"]
667pub struct TIM3 {
668 _marker: PhantomData<*const ()>,
669}
670unsafe impl Send for TIM3 {}
671impl TIM3 {
672 #[doc = r" Returns a pointer to the register block"]
673 pub fn ptr() -> *const tim2::RegisterBlock {
674 1073742848 as *const _
675 }
676}
677impl Deref for TIM3 {
678 type Target = tim2::RegisterBlock;
679 fn deref(&self) -> &tim2::RegisterBlock {
680 unsafe { &*TIM3::ptr() }
681 }
682}
683#[doc = "TIM4"]
684pub struct TIM4 {
685 _marker: PhantomData<*const ()>,
686}
687unsafe impl Send for TIM4 {}
688impl TIM4 {
689 #[doc = r" Returns a pointer to the register block"]
690 pub fn ptr() -> *const tim2::RegisterBlock {
691 1073743872 as *const _
692 }
693}
694impl Deref for TIM4 {
695 type Target = tim2::RegisterBlock;
696 fn deref(&self) -> &tim2::RegisterBlock {
697 unsafe { &*TIM4::ptr() }
698 }
699}
700#[doc = "General purpose timers"]
701pub struct TIM15 {
702 _marker: PhantomData<*const ()>,
703}
704unsafe impl Send for TIM15 {}
705impl TIM15 {
706 #[doc = r" Returns a pointer to the register block"]
707 pub fn ptr() -> *const tim15::RegisterBlock {
708 1073823744 as *const _
709 }
710}
711impl Deref for TIM15 {
712 type Target = tim15::RegisterBlock;
713 fn deref(&self) -> &tim15::RegisterBlock {
714 unsafe { &*TIM15::ptr() }
715 }
716}
717#[doc = "General purpose timers"]
718pub mod tim15;
719#[doc = "General-purpose-timers"]
720pub struct TIM16 {
721 _marker: PhantomData<*const ()>,
722}
723unsafe impl Send for TIM16 {}
724impl TIM16 {
725 #[doc = r" Returns a pointer to the register block"]
726 pub fn ptr() -> *const tim16::RegisterBlock {
727 1073824768 as *const _
728 }
729}
730impl Deref for TIM16 {
731 type Target = tim16::RegisterBlock;
732 fn deref(&self) -> &tim16::RegisterBlock {
733 unsafe { &*TIM16::ptr() }
734 }
735}
736#[doc = "General-purpose-timers"]
737pub mod tim16;
738#[doc = "General purpose timer"]
739pub struct TIM17 {
740 _marker: PhantomData<*const ()>,
741}
742unsafe impl Send for TIM17 {}
743impl TIM17 {
744 #[doc = r" Returns a pointer to the register block"]
745 pub fn ptr() -> *const tim17::RegisterBlock {
746 1073825792 as *const _
747 }
748}
749impl Deref for TIM17 {
750 type Target = tim17::RegisterBlock;
751 fn deref(&self) -> &tim17::RegisterBlock {
752 unsafe { &*TIM17::ptr() }
753 }
754}
755#[doc = "General purpose timer"]
756pub mod tim17;
757#[doc = "Universal synchronous asynchronous receiver transmitter"]
758pub struct USART1 {
759 _marker: PhantomData<*const ()>,
760}
761unsafe impl Send for USART1 {}
762impl USART1 {
763 #[doc = r" Returns a pointer to the register block"]
764 pub fn ptr() -> *const usart1::RegisterBlock {
765 1073821696 as *const _
766 }
767}
768impl Deref for USART1 {
769 type Target = usart1::RegisterBlock;
770 fn deref(&self) -> &usart1::RegisterBlock {
771 unsafe { &*USART1::ptr() }
772 }
773}
774#[doc = "Universal synchronous asynchronous receiver transmitter"]
775pub mod usart1;
776#[doc = "USART2"]
777pub struct USART2 {
778 _marker: PhantomData<*const ()>,
779}
780unsafe impl Send for USART2 {}
781impl USART2 {
782 #[doc = r" Returns a pointer to the register block"]
783 pub fn ptr() -> *const usart1::RegisterBlock {
784 1073759232 as *const _
785 }
786}
787impl Deref for USART2 {
788 type Target = usart1::RegisterBlock;
789 fn deref(&self) -> &usart1::RegisterBlock {
790 unsafe { &*USART2::ptr() }
791 }
792}
793#[doc = "USART3"]
794pub struct USART3 {
795 _marker: PhantomData<*const ()>,
796}
797unsafe impl Send for USART3 {}
798impl USART3 {
799 #[doc = r" Returns a pointer to the register block"]
800 pub fn ptr() -> *const usart1::RegisterBlock {
801 1073760256 as *const _
802 }
803}
804impl Deref for USART3 {
805 type Target = usart1::RegisterBlock;
806 fn deref(&self) -> &usart1::RegisterBlock {
807 unsafe { &*USART3::ptr() }
808 }
809}
810#[doc = "UART4"]
811pub struct UART4 {
812 _marker: PhantomData<*const ()>,
813}
814unsafe impl Send for UART4 {}
815impl UART4 {
816 #[doc = r" Returns a pointer to the register block"]
817 pub fn ptr() -> *const usart1::RegisterBlock {
818 1073761280 as *const _
819 }
820}
821impl Deref for UART4 {
822 type Target = usart1::RegisterBlock;
823 fn deref(&self) -> &usart1::RegisterBlock {
824 unsafe { &*UART4::ptr() }
825 }
826}
827#[doc = "UART5"]
828pub struct UART5 {
829 _marker: PhantomData<*const ()>,
830}
831unsafe impl Send for UART5 {}
832impl UART5 {
833 #[doc = r" Returns a pointer to the register block"]
834 pub fn ptr() -> *const usart1::RegisterBlock {
835 1073762304 as *const _
836 }
837}
838impl Deref for UART5 {
839 type Target = usart1::RegisterBlock;
840 fn deref(&self) -> &usart1::RegisterBlock {
841 unsafe { &*UART5::ptr() }
842 }
843}
844#[doc = "Serial peripheral interface/Inter-IC sound"]
845pub struct SPI1 {
846 _marker: PhantomData<*const ()>,
847}
848unsafe impl Send for SPI1 {}
849impl SPI1 {
850 #[doc = r" Returns a pointer to the register block"]
851 pub fn ptr() -> *const spi1::RegisterBlock {
852 1073819648 as *const _
853 }
854}
855impl Deref for SPI1 {
856 type Target = spi1::RegisterBlock;
857 fn deref(&self) -> &spi1::RegisterBlock {
858 unsafe { &*SPI1::ptr() }
859 }
860}
861#[doc = "Serial peripheral interface/Inter-IC sound"]
862pub mod spi1;
863#[doc = "SPI2"]
864pub struct SPI2 {
865 _marker: PhantomData<*const ()>,
866}
867unsafe impl Send for SPI2 {}
868impl SPI2 {
869 #[doc = r" Returns a pointer to the register block"]
870 pub fn ptr() -> *const spi1::RegisterBlock {
871 1073756160 as *const _
872 }
873}
874impl Deref for SPI2 {
875 type Target = spi1::RegisterBlock;
876 fn deref(&self) -> &spi1::RegisterBlock {
877 unsafe { &*SPI2::ptr() }
878 }
879}
880#[doc = "SPI3"]
881pub struct SPI3 {
882 _marker: PhantomData<*const ()>,
883}
884unsafe impl Send for SPI3 {}
885impl SPI3 {
886 #[doc = r" Returns a pointer to the register block"]
887 pub fn ptr() -> *const spi1::RegisterBlock {
888 1073757184 as *const _
889 }
890}
891impl Deref for SPI3 {
892 type Target = spi1::RegisterBlock;
893 fn deref(&self) -> &spi1::RegisterBlock {
894 unsafe { &*SPI3::ptr() }
895 }
896}
897#[doc = "I2S2ext"]
898pub struct I2S2EXT {
899 _marker: PhantomData<*const ()>,
900}
901unsafe impl Send for I2S2EXT {}
902impl I2S2EXT {
903 #[doc = r" Returns a pointer to the register block"]
904 pub fn ptr() -> *const spi1::RegisterBlock {
905 1073755136 as *const _
906 }
907}
908impl Deref for I2S2EXT {
909 type Target = spi1::RegisterBlock;
910 fn deref(&self) -> &spi1::RegisterBlock {
911 unsafe { &*I2S2EXT::ptr() }
912 }
913}
914#[doc = "I2S3ext"]
915pub struct I2S3EXT {
916 _marker: PhantomData<*const ()>,
917}
918unsafe impl Send for I2S3EXT {}
919impl I2S3EXT {
920 #[doc = r" Returns a pointer to the register block"]
921 pub fn ptr() -> *const spi1::RegisterBlock {
922 1073758208 as *const _
923 }
924}
925impl Deref for I2S3EXT {
926 type Target = spi1::RegisterBlock;
927 fn deref(&self) -> &spi1::RegisterBlock {
928 unsafe { &*I2S3EXT::ptr() }
929 }
930}
931#[doc = "External interrupt/event controller"]
932pub struct EXTI {
933 _marker: PhantomData<*const ()>,
934}
935unsafe impl Send for EXTI {}
936impl EXTI {
937 #[doc = r" Returns a pointer to the register block"]
938 pub fn ptr() -> *const exti::RegisterBlock {
939 1073808384 as *const _
940 }
941}
942impl Deref for EXTI {
943 type Target = exti::RegisterBlock;
944 fn deref(&self) -> &exti::RegisterBlock {
945 unsafe { &*EXTI::ptr() }
946 }
947}
948#[doc = "External interrupt/event controller"]
949pub mod exti;
950#[doc = "Comparator"]
951pub struct COMP {
952 _marker: PhantomData<*const ()>,
953}
954unsafe impl Send for COMP {}
955impl COMP {
956 #[doc = r" Returns a pointer to the register block"]
957 pub fn ptr() -> *const comp::RegisterBlock {
958 1073807388 as *const _
959 }
960}
961impl Deref for COMP {
962 type Target = comp::RegisterBlock;
963 fn deref(&self) -> &comp::RegisterBlock {
964 unsafe { &*COMP::ptr() }
965 }
966}
967#[doc = "Comparator"]
968pub mod comp;
969#[doc = "Power control"]
970pub struct PWR {
971 _marker: PhantomData<*const ()>,
972}
973unsafe impl Send for PWR {}
974impl PWR {
975 #[doc = r" Returns a pointer to the register block"]
976 pub fn ptr() -> *const pwr::RegisterBlock {
977 1073770496 as *const _
978 }
979}
980impl Deref for PWR {
981 type Target = pwr::RegisterBlock;
982 fn deref(&self) -> &pwr::RegisterBlock {
983 unsafe { &*PWR::ptr() }
984 }
985}
986#[doc = "Power control"]
987pub mod pwr;
988#[doc = "Controller area network"]
989pub struct CAN {
990 _marker: PhantomData<*const ()>,
991}
992unsafe impl Send for CAN {}
993impl CAN {
994 #[doc = r" Returns a pointer to the register block"]
995 pub fn ptr() -> *const can::RegisterBlock {
996 1073767424 as *const _
997 }
998}
999impl Deref for CAN {
1000 type Target = can::RegisterBlock;
1001 fn deref(&self) -> &can::RegisterBlock {
1002 unsafe { &*CAN::ptr() }
1003 }
1004}
1005#[doc = "Controller area network"]
1006pub mod can;
1007#[doc = "Universal serial bus full-speed device interface"]
1008pub struct USB_FS {
1009 _marker: PhantomData<*const ()>,
1010}
1011unsafe impl Send for USB_FS {}
1012impl USB_FS {
1013 #[doc = r" Returns a pointer to the register block"]
1014 pub fn ptr() -> *const usb_fs::RegisterBlock {
1015 1073765376 as *const _
1016 }
1017}
1018impl Deref for USB_FS {
1019 type Target = usb_fs::RegisterBlock;
1020 fn deref(&self) -> &usb_fs::RegisterBlock {
1021 unsafe { &*USB_FS::ptr() }
1022 }
1023}
1024#[doc = "Universal serial bus full-speed device interface"]
1025pub mod usb_fs;
1026#[doc = "Inter-integrated circuit"]
1027pub struct I2C1 {
1028 _marker: PhantomData<*const ()>,
1029}
1030unsafe impl Send for I2C1 {}
1031impl I2C1 {
1032 #[doc = r" Returns a pointer to the register block"]
1033 pub fn ptr() -> *const i2c1::RegisterBlock {
1034 1073763328 as *const _
1035 }
1036}
1037impl Deref for I2C1 {
1038 type Target = i2c1::RegisterBlock;
1039 fn deref(&self) -> &i2c1::RegisterBlock {
1040 unsafe { &*I2C1::ptr() }
1041 }
1042}
1043#[doc = "Inter-integrated circuit"]
1044pub mod i2c1;
1045#[doc = "I2C2"]
1046pub struct I2C2 {
1047 _marker: PhantomData<*const ()>,
1048}
1049unsafe impl Send for I2C2 {}
1050impl I2C2 {
1051 #[doc = r" Returns a pointer to the register block"]
1052 pub fn ptr() -> *const i2c1::RegisterBlock {
1053 1073764352 as *const _
1054 }
1055}
1056impl Deref for I2C2 {
1057 type Target = i2c1::RegisterBlock;
1058 fn deref(&self) -> &i2c1::RegisterBlock {
1059 unsafe { &*I2C2::ptr() }
1060 }
1061}
1062#[doc = "Independent watchdog"]
1063pub struct IWDG {
1064 _marker: PhantomData<*const ()>,
1065}
1066unsafe impl Send for IWDG {}
1067impl IWDG {
1068 #[doc = r" Returns a pointer to the register block"]
1069 pub fn ptr() -> *const iwdg::RegisterBlock {
1070 1073754112 as *const _
1071 }
1072}
1073impl Deref for IWDG {
1074 type Target = iwdg::RegisterBlock;
1075 fn deref(&self) -> &iwdg::RegisterBlock {
1076 unsafe { &*IWDG::ptr() }
1077 }
1078}
1079#[doc = "Independent watchdog"]
1080pub mod iwdg;
1081#[doc = "Window watchdog"]
1082pub struct WWDG {
1083 _marker: PhantomData<*const ()>,
1084}
1085unsafe impl Send for WWDG {}
1086impl WWDG {
1087 #[doc = r" Returns a pointer to the register block"]
1088 pub fn ptr() -> *const wwdg::RegisterBlock {
1089 1073753088 as *const _
1090 }
1091}
1092impl Deref for WWDG {
1093 type Target = wwdg::RegisterBlock;
1094 fn deref(&self) -> &wwdg::RegisterBlock {
1095 unsafe { &*WWDG::ptr() }
1096 }
1097}
1098#[doc = "Window watchdog"]
1099pub mod wwdg;
1100#[doc = "Real-time clock"]
1101pub struct RTC {
1102 _marker: PhantomData<*const ()>,
1103}
1104unsafe impl Send for RTC {}
1105impl RTC {
1106 #[doc = r" Returns a pointer to the register block"]
1107 pub fn ptr() -> *const rtc::RegisterBlock {
1108 1073752064 as *const _
1109 }
1110}
1111impl Deref for RTC {
1112 type Target = rtc::RegisterBlock;
1113 fn deref(&self) -> &rtc::RegisterBlock {
1114 unsafe { &*RTC::ptr() }
1115 }
1116}
1117#[doc = "Real-time clock"]
1118pub mod rtc;
1119#[doc = "Basic timers"]
1120pub struct TIM6 {
1121 _marker: PhantomData<*const ()>,
1122}
1123unsafe impl Send for TIM6 {}
1124impl TIM6 {
1125 #[doc = r" Returns a pointer to the register block"]
1126 pub fn ptr() -> *const tim6::RegisterBlock {
1127 1073745920 as *const _
1128 }
1129}
1130impl Deref for TIM6 {
1131 type Target = tim6::RegisterBlock;
1132 fn deref(&self) -> &tim6::RegisterBlock {
1133 unsafe { &*TIM6::ptr() }
1134 }
1135}
1136#[doc = "Basic timers"]
1137pub mod tim6;
1138#[doc = "TIM7"]
1139pub struct TIM7 {
1140 _marker: PhantomData<*const ()>,
1141}
1142unsafe impl Send for TIM7 {}
1143impl TIM7 {
1144 #[doc = r" Returns a pointer to the register block"]
1145 pub fn ptr() -> *const tim6::RegisterBlock {
1146 1073746944 as *const _
1147 }
1148}
1149impl Deref for TIM7 {
1150 type Target = tim6::RegisterBlock;
1151 fn deref(&self) -> &tim6::RegisterBlock {
1152 unsafe { &*TIM7::ptr() }
1153 }
1154}
1155#[doc = "Digital-to-analog converter"]
1156pub struct DAC {
1157 _marker: PhantomData<*const ()>,
1158}
1159unsafe impl Send for DAC {}
1160impl DAC {
1161 #[doc = r" Returns a pointer to the register block"]
1162 pub fn ptr() -> *const dac::RegisterBlock {
1163 1073771520 as *const _
1164 }
1165}
1166impl Deref for DAC {
1167 type Target = dac::RegisterBlock;
1168 fn deref(&self) -> &dac::RegisterBlock {
1169 unsafe { &*DAC::ptr() }
1170 }
1171}
1172#[doc = "Digital-to-analog converter"]
1173pub mod dac;
1174#[doc = "Debug support"]
1175pub struct DBGMCU {
1176 _marker: PhantomData<*const ()>,
1177}
1178unsafe impl Send for DBGMCU {}
1179impl DBGMCU {
1180 #[doc = r" Returns a pointer to the register block"]
1181 pub fn ptr() -> *const dbgmcu::RegisterBlock {
1182 3758366720 as *const _
1183 }
1184}
1185impl Deref for DBGMCU {
1186 type Target = dbgmcu::RegisterBlock;
1187 fn deref(&self) -> &dbgmcu::RegisterBlock {
1188 unsafe { &*DBGMCU::ptr() }
1189 }
1190}
1191#[doc = "Debug support"]
1192pub mod dbgmcu;
1193#[doc = "Advanced timer"]
1194pub struct TIM1 {
1195 _marker: PhantomData<*const ()>,
1196}
1197unsafe impl Send for TIM1 {}
1198impl TIM1 {
1199 #[doc = r" Returns a pointer to the register block"]
1200 pub fn ptr() -> *const tim1::RegisterBlock {
1201 1073818624 as *const _
1202 }
1203}
1204impl Deref for TIM1 {
1205 type Target = tim1::RegisterBlock;
1206 fn deref(&self) -> &tim1::RegisterBlock {
1207 unsafe { &*TIM1::ptr() }
1208 }
1209}
1210#[doc = "Advanced timer"]
1211pub mod tim1;
1212#[doc = "Advanced-timers"]
1213pub struct TIM8 {
1214 _marker: PhantomData<*const ()>,
1215}
1216unsafe impl Send for TIM8 {}
1217impl TIM8 {
1218 #[doc = r" Returns a pointer to the register block"]
1219 pub fn ptr() -> *const tim8::RegisterBlock {
1220 1073820672 as *const _
1221 }
1222}
1223impl Deref for TIM8 {
1224 type Target = tim8::RegisterBlock;
1225 fn deref(&self) -> &tim8::RegisterBlock {
1226 unsafe { &*TIM8::ptr() }
1227 }
1228}
1229#[doc = "Advanced-timers"]
1230pub mod tim8;
1231#[doc = "Analog-to-Digital Converter"]
1232pub struct ADC1 {
1233 _marker: PhantomData<*const ()>,
1234}
1235unsafe impl Send for ADC1 {}
1236impl ADC1 {
1237 #[doc = r" Returns a pointer to the register block"]
1238 pub fn ptr() -> *const adc1::RegisterBlock {
1239 1342177280 as *const _
1240 }
1241}
1242impl Deref for ADC1 {
1243 type Target = adc1::RegisterBlock;
1244 fn deref(&self) -> &adc1::RegisterBlock {
1245 unsafe { &*ADC1::ptr() }
1246 }
1247}
1248#[doc = "Analog-to-Digital Converter"]
1249pub mod adc1;
1250#[doc = "ADC2"]
1251pub struct ADC2 {
1252 _marker: PhantomData<*const ()>,
1253}
1254unsafe impl Send for ADC2 {}
1255impl ADC2 {
1256 #[doc = r" Returns a pointer to the register block"]
1257 pub fn ptr() -> *const adc1::RegisterBlock {
1258 1342177536 as *const _
1259 }
1260}
1261impl Deref for ADC2 {
1262 type Target = adc1::RegisterBlock;
1263 fn deref(&self) -> &adc1::RegisterBlock {
1264 unsafe { &*ADC2::ptr() }
1265 }
1266}
1267#[doc = "ADC3"]
1268pub struct ADC3 {
1269 _marker: PhantomData<*const ()>,
1270}
1271unsafe impl Send for ADC3 {}
1272impl ADC3 {
1273 #[doc = r" Returns a pointer to the register block"]
1274 pub fn ptr() -> *const adc1::RegisterBlock {
1275 1342178304 as *const _
1276 }
1277}
1278impl Deref for ADC3 {
1279 type Target = adc1::RegisterBlock;
1280 fn deref(&self) -> &adc1::RegisterBlock {
1281 unsafe { &*ADC3::ptr() }
1282 }
1283}
1284#[doc = "ADC4"]
1285pub struct ADC4 {
1286 _marker: PhantomData<*const ()>,
1287}
1288unsafe impl Send for ADC4 {}
1289impl ADC4 {
1290 #[doc = r" Returns a pointer to the register block"]
1291 pub fn ptr() -> *const adc1::RegisterBlock {
1292 1342178560 as *const _
1293 }
1294}
1295impl Deref for ADC4 {
1296 type Target = adc1::RegisterBlock;
1297 fn deref(&self) -> &adc1::RegisterBlock {
1298 unsafe { &*ADC4::ptr() }
1299 }
1300}
1301#[doc = "Analog-to-Digital Converter"]
1302pub struct ADC1_2 {
1303 _marker: PhantomData<*const ()>,
1304}
1305unsafe impl Send for ADC1_2 {}
1306impl ADC1_2 {
1307 #[doc = r" Returns a pointer to the register block"]
1308 pub fn ptr() -> *const adc1_2::RegisterBlock {
1309 1342178048 as *const _
1310 }
1311}
1312impl Deref for ADC1_2 {
1313 type Target = adc1_2::RegisterBlock;
1314 fn deref(&self) -> &adc1_2::RegisterBlock {
1315 unsafe { &*ADC1_2::ptr() }
1316 }
1317}
1318#[doc = "Analog-to-Digital Converter"]
1319pub mod adc1_2;
1320#[doc = "ADC3_4"]
1321pub struct ADC3_4 {
1322 _marker: PhantomData<*const ()>,
1323}
1324unsafe impl Send for ADC3_4 {}
1325impl ADC3_4 {
1326 #[doc = r" Returns a pointer to the register block"]
1327 pub fn ptr() -> *const adc1_2::RegisterBlock {
1328 1342179072 as *const _
1329 }
1330}
1331impl Deref for ADC3_4 {
1332 type Target = adc1_2::RegisterBlock;
1333 fn deref(&self) -> &adc1_2::RegisterBlock {
1334 unsafe { &*ADC3_4::ptr() }
1335 }
1336}
1337#[doc = "System configuration controller"]
1338pub struct SYSCFG {
1339 _marker: PhantomData<*const ()>,
1340}
1341unsafe impl Send for SYSCFG {}
1342impl SYSCFG {
1343 #[doc = r" Returns a pointer to the register block"]
1344 pub fn ptr() -> *const syscfg::RegisterBlock {
1345 1073807360 as *const _
1346 }
1347}
1348impl Deref for SYSCFG {
1349 type Target = syscfg::RegisterBlock;
1350 fn deref(&self) -> &syscfg::RegisterBlock {
1351 unsafe { &*SYSCFG::ptr() }
1352 }
1353}
1354#[doc = "System configuration controller"]
1355pub mod syscfg;
1356#[doc = "Operational amplifier"]
1357pub struct OPAMP {
1358 _marker: PhantomData<*const ()>,
1359}
1360unsafe impl Send for OPAMP {}
1361impl OPAMP {
1362 #[doc = r" Returns a pointer to the register block"]
1363 pub fn ptr() -> *const opamp::RegisterBlock {
1364 1073807416 as *const _
1365 }
1366}
1367impl Deref for OPAMP {
1368 type Target = opamp::RegisterBlock;
1369 fn deref(&self) -> &opamp::RegisterBlock {
1370 unsafe { &*OPAMP::ptr() }
1371 }
1372}
1373#[doc = "Operational amplifier"]
1374pub mod opamp;
1375#[allow(renamed_and_removed_lints)]
1376#[allow(private_no_mangle_statics)]
1377#[no_mangle]
1378static mut DEVICE_PERIPHERALS: bool = false;
1379#[doc = r" All the peripherals"]
1380#[allow(non_snake_case)]
1381pub struct Peripherals {
1382 #[doc = "GPIOA"]
1383 pub GPIOA: GPIOA,
1384 #[doc = "GPIOB"]
1385 pub GPIOB: GPIOB,
1386 #[doc = "GPIOC"]
1387 pub GPIOC: GPIOC,
1388 #[doc = "GPIOD"]
1389 pub GPIOD: GPIOD,
1390 #[doc = "GPIOE"]
1391 pub GPIOE: GPIOE,
1392 #[doc = "GPIOF"]
1393 pub GPIOF: GPIOF,
1394 #[doc = "TSC"]
1395 pub TSC: TSC,
1396 #[doc = "CRC"]
1397 pub CRC: CRC,
1398 #[doc = "FLASH"]
1399 pub FLASH: FLASH,
1400 #[doc = "RCC"]
1401 pub RCC: RCC,
1402 #[doc = "DMA1"]
1403 pub DMA1: DMA1,
1404 #[doc = "DMA2"]
1405 pub DMA2: DMA2,
1406 #[doc = "TIM2"]
1407 pub TIM2: TIM2,
1408 #[doc = "TIM3"]
1409 pub TIM3: TIM3,
1410 #[doc = "TIM4"]
1411 pub TIM4: TIM4,
1412 #[doc = "TIM15"]
1413 pub TIM15: TIM15,
1414 #[doc = "TIM16"]
1415 pub TIM16: TIM16,
1416 #[doc = "TIM17"]
1417 pub TIM17: TIM17,
1418 #[doc = "USART1"]
1419 pub USART1: USART1,
1420 #[doc = "USART2"]
1421 pub USART2: USART2,
1422 #[doc = "USART3"]
1423 pub USART3: USART3,
1424 #[doc = "UART4"]
1425 pub UART4: UART4,
1426 #[doc = "UART5"]
1427 pub UART5: UART5,
1428 #[doc = "SPI1"]
1429 pub SPI1: SPI1,
1430 #[doc = "SPI2"]
1431 pub SPI2: SPI2,
1432 #[doc = "SPI3"]
1433 pub SPI3: SPI3,
1434 #[doc = "I2S2EXT"]
1435 pub I2S2EXT: I2S2EXT,
1436 #[doc = "I2S3EXT"]
1437 pub I2S3EXT: I2S3EXT,
1438 #[doc = "EXTI"]
1439 pub EXTI: EXTI,
1440 #[doc = "COMP"]
1441 pub COMP: COMP,
1442 #[doc = "PWR"]
1443 pub PWR: PWR,
1444 #[doc = "CAN"]
1445 pub CAN: CAN,
1446 #[doc = "USB_FS"]
1447 pub USB_FS: USB_FS,
1448 #[doc = "I2C1"]
1449 pub I2C1: I2C1,
1450 #[doc = "I2C2"]
1451 pub I2C2: I2C2,
1452 #[doc = "IWDG"]
1453 pub IWDG: IWDG,
1454 #[doc = "WWDG"]
1455 pub WWDG: WWDG,
1456 #[doc = "RTC"]
1457 pub RTC: RTC,
1458 #[doc = "TIM6"]
1459 pub TIM6: TIM6,
1460 #[doc = "TIM7"]
1461 pub TIM7: TIM7,
1462 #[doc = "DAC"]
1463 pub DAC: DAC,
1464 #[doc = "DBGMCU"]
1465 pub DBGMCU: DBGMCU,
1466 #[doc = "TIM1"]
1467 pub TIM1: TIM1,
1468 #[doc = "TIM8"]
1469 pub TIM8: TIM8,
1470 #[doc = "ADC1"]
1471 pub ADC1: ADC1,
1472 #[doc = "ADC2"]
1473 pub ADC2: ADC2,
1474 #[doc = "ADC3"]
1475 pub ADC3: ADC3,
1476 #[doc = "ADC4"]
1477 pub ADC4: ADC4,
1478 #[doc = "ADC1_2"]
1479 pub ADC1_2: ADC1_2,
1480 #[doc = "ADC3_4"]
1481 pub ADC3_4: ADC3_4,
1482 #[doc = "SYSCFG"]
1483 pub SYSCFG: SYSCFG,
1484 #[doc = "OPAMP"]
1485 pub OPAMP: OPAMP,
1486}
1487impl Peripherals {
1488 #[doc = r" Returns all the peripherals *once*"]
1489 #[inline]
1490 pub fn take() -> Option<Self> {
1491 cortex_m::interrupt::free(|_| {
1492 if unsafe { DEVICE_PERIPHERALS } {
1493 None
1494 } else {
1495 Some(unsafe { Peripherals::steal() })
1496 }
1497 })
1498 }
1499 #[doc = r" Unchecked version of `Peripherals::take`"]
1500 pub unsafe fn steal() -> Self {
1501 debug_assert!(!DEVICE_PERIPHERALS);
1502 DEVICE_PERIPHERALS = true;
1503 Peripherals {
1504 GPIOA: GPIOA {
1505 _marker: PhantomData,
1506 },
1507 GPIOB: GPIOB {
1508 _marker: PhantomData,
1509 },
1510 GPIOC: GPIOC {
1511 _marker: PhantomData,
1512 },
1513 GPIOD: GPIOD {
1514 _marker: PhantomData,
1515 },
1516 GPIOE: GPIOE {
1517 _marker: PhantomData,
1518 },
1519 GPIOF: GPIOF {
1520 _marker: PhantomData,
1521 },
1522 TSC: TSC {
1523 _marker: PhantomData,
1524 },
1525 CRC: CRC {
1526 _marker: PhantomData,
1527 },
1528 FLASH: FLASH {
1529 _marker: PhantomData,
1530 },
1531 RCC: RCC {
1532 _marker: PhantomData,
1533 },
1534 DMA1: DMA1 {
1535 _marker: PhantomData,
1536 },
1537 DMA2: DMA2 {
1538 _marker: PhantomData,
1539 },
1540 TIM2: TIM2 {
1541 _marker: PhantomData,
1542 },
1543 TIM3: TIM3 {
1544 _marker: PhantomData,
1545 },
1546 TIM4: TIM4 {
1547 _marker: PhantomData,
1548 },
1549 TIM15: TIM15 {
1550 _marker: PhantomData,
1551 },
1552 TIM16: TIM16 {
1553 _marker: PhantomData,
1554 },
1555 TIM17: TIM17 {
1556 _marker: PhantomData,
1557 },
1558 USART1: USART1 {
1559 _marker: PhantomData,
1560 },
1561 USART2: USART2 {
1562 _marker: PhantomData,
1563 },
1564 USART3: USART3 {
1565 _marker: PhantomData,
1566 },
1567 UART4: UART4 {
1568 _marker: PhantomData,
1569 },
1570 UART5: UART5 {
1571 _marker: PhantomData,
1572 },
1573 SPI1: SPI1 {
1574 _marker: PhantomData,
1575 },
1576 SPI2: SPI2 {
1577 _marker: PhantomData,
1578 },
1579 SPI3: SPI3 {
1580 _marker: PhantomData,
1581 },
1582 I2S2EXT: I2S2EXT {
1583 _marker: PhantomData,
1584 },
1585 I2S3EXT: I2S3EXT {
1586 _marker: PhantomData,
1587 },
1588 EXTI: EXTI {
1589 _marker: PhantomData,
1590 },
1591 COMP: COMP {
1592 _marker: PhantomData,
1593 },
1594 PWR: PWR {
1595 _marker: PhantomData,
1596 },
1597 CAN: CAN {
1598 _marker: PhantomData,
1599 },
1600 USB_FS: USB_FS {
1601 _marker: PhantomData,
1602 },
1603 I2C1: I2C1 {
1604 _marker: PhantomData,
1605 },
1606 I2C2: I2C2 {
1607 _marker: PhantomData,
1608 },
1609 IWDG: IWDG {
1610 _marker: PhantomData,
1611 },
1612 WWDG: WWDG {
1613 _marker: PhantomData,
1614 },
1615 RTC: RTC {
1616 _marker: PhantomData,
1617 },
1618 TIM6: TIM6 {
1619 _marker: PhantomData,
1620 },
1621 TIM7: TIM7 {
1622 _marker: PhantomData,
1623 },
1624 DAC: DAC {
1625 _marker: PhantomData,
1626 },
1627 DBGMCU: DBGMCU {
1628 _marker: PhantomData,
1629 },
1630 TIM1: TIM1 {
1631 _marker: PhantomData,
1632 },
1633 TIM8: TIM8 {
1634 _marker: PhantomData,
1635 },
1636 ADC1: ADC1 {
1637 _marker: PhantomData,
1638 },
1639 ADC2: ADC2 {
1640 _marker: PhantomData,
1641 },
1642 ADC3: ADC3 {
1643 _marker: PhantomData,
1644 },
1645 ADC4: ADC4 {
1646 _marker: PhantomData,
1647 },
1648 ADC1_2: ADC1_2 {
1649 _marker: PhantomData,
1650 },
1651 ADC3_4: ADC3_4 {
1652 _marker: PhantomData,
1653 },
1654 SYSCFG: SYSCFG {
1655 _marker: PhantomData,
1656 },
1657 OPAMP: OPAMP {
1658 _marker: PhantomData,
1659 },
1660 }
1661 }
1662}