[INFO] cloning repository https://github.com/EK47/burnboard
[INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/EK47/burnboard" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FEK47%2Fburnboard", kill_on_drop: false }`
[INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FEK47%2Fburnboard'...
[INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }`
[INFO] [stdout] b3157c1080bb3da03d6231e32ed5a0b612d21690
[INFO] checking EK47/burnboard against try#2b39fe756f52bc2825bf5b2bfc385cab922dae10 for pr-143011
[INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FEK47%2Fburnboard" "/workspace/builds/worker-1-tc2/source", kill_on_drop: false }`
[INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc2/source'...
[INFO] [stderr] done.
[INFO] removed /workspace/builds/worker-1-tc2/source/.cargo/config.toml
[INFO] removed /workspace/builds/worker-1-tc2/source/rust-toolchain.toml
[INFO] started tweaking git repo https://github.com/EK47/burnboard
[INFO] finished tweaking git repo https://github.com/EK47/burnboard
[INFO] tweaked toml for git repo https://github.com/EK47/burnboard written to /workspace/builds/worker-1-tc2/source/Cargo.toml
[INFO] validating manifest of git repo https://github.com/EK47/burnboard on toolchain 2b39fe756f52bc2825bf5b2bfc385cab922dae10
[INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+2b39fe756f52bc2825bf5b2bfc385cab922dae10" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }`
[INFO] crate git repo https://github.com/EK47/burnboard already has a lockfile, it will not be regenerated
[INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+2b39fe756f52bc2825bf5b2bfc385cab922dae10" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:90999bfc7ae267e83380e433d8e61a7c072ca6729e92edbae886d3423b3a6f4c" "/opt/rustwide/cargo-home/bin/cargo" "+2b39fe756f52bc2825bf5b2bfc385cab922dae10" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }`
[INFO] [stdout] 7539efb644fd26f33c6dd4cccdac5a4d832c4cc0a792c4959b3b52d81487639e
[INFO] running `Command { std: "docker" "start" "-a" "7539efb644fd26f33c6dd4cccdac5a4d832c4cc0a792c4959b3b52d81487639e", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "inspect" "7539efb644fd26f33c6dd4cccdac5a4d832c4cc0a792c4959b3b52d81487639e", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "7539efb644fd26f33c6dd4cccdac5a4d832c4cc0a792c4959b3b52d81487639e", kill_on_drop: false }`
[INFO] [stdout] 7539efb644fd26f33c6dd4cccdac5a4d832c4cc0a792c4959b3b52d81487639e
[INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:90999bfc7ae267e83380e433d8e61a7c072ca6729e92edbae886d3423b3a6f4c" "/opt/rustwide/cargo-home/bin/cargo" "+2b39fe756f52bc2825bf5b2bfc385cab922dae10" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }`
[INFO] [stdout] e91ac083d2a37b877944c95ed130da3b37751458c408618b8904530045781416
[INFO] running `Command { std: "docker" "start" "-a" "e91ac083d2a37b877944c95ed130da3b37751458c408618b8904530045781416", kill_on_drop: false }`
[INFO] [stderr]    Compiling unicode-ident v1.0.13
[INFO] [stderr]     Checking critical-section v1.1.3
[INFO] [stderr]    Compiling riscv v0.11.1
[INFO] [stderr]    Compiling syn v1.0.109
[INFO] [stderr]    Compiling heapless v0.8.0
[INFO] [stderr]     Checking byteorder v1.5.0
[INFO] [stderr]     Checking stable_deref_trait v1.2.0
[INFO] [stderr]     Checking futures-core v0.3.30
[INFO] [stderr]     Checking embedded-hal v1.0.0
[INFO] [stderr]     Checking futures-sink v0.3.30
[INFO] [stderr]     Checking futures-task v0.3.30
[INFO] [stderr]    Compiling serde v1.0.210
[INFO] [stderr]    Compiling embassy-time-driver v0.1.0
[INFO] [stderr]    Compiling ahash v0.8.11
[INFO] [stderr]    Compiling embedded-io-async v0.6.1
[INFO] [stderr]    Compiling embassy-time-queue-driver v0.1.0
[INFO] [stderr]    Compiling thiserror v2.0.8
[INFO] [stderr]    Compiling zerocopy v0.7.35
[INFO] [stderr]    Compiling embassy-sync v0.6.0
[INFO] [stderr]    Compiling proc-macro2 v1.0.86
[INFO] [stderr]    Compiling once_cell v1.20.2
[INFO] [stderr]    Compiling defmt v0.3.10
[INFO] [stderr]    Compiling strsim v0.11.1
[INFO] [stderr]    Compiling ch32-metapac v0.1.0 (https://github.com/ch32-rs/ch32-metapac.git?tag=ch32-data-0f143d8ce505711e4667002b42b8a34eb9c1d039#d97b7453)
[INFO] [stderr]     Checking embedded-io v0.6.1
[INFO] [stderr]    Compiling portable-atomic v1.10.0
[INFO] [stderr]     Checking nb v1.1.0
[INFO] [stderr]    Compiling litrs v0.4.1
[INFO] [stderr]     Checking hash32 v0.3.1
[INFO] [stderr]    Compiling defmt-macros v0.4.0
[INFO] [stderr]    Compiling bitfield v0.14.0
[INFO] [stderr]    Compiling vcell v0.1.3
[INFO] [stderr]    Compiling embedded-hal-async v1.0.0
[INFO] [stderr]     Checking nb v0.1.3
[INFO] [stderr]    Compiling qingke-rt v0.2.1
[INFO] [stderr]     Checking encode_unicode v0.3.6
[INFO] [stderr]     Checking embassy-futures v0.1.1
[INFO] [stderr]    Compiling usbd-hid-descriptors v0.8.2
[INFO] [stderr]     Checking bit_field v0.10.2
[INFO] [stderr]     Checking void v1.0.2
[INFO] [stderr]    Compiling embassy-hal-internal v0.2.0
[INFO] [stderr]     Checking embedded-hal v0.2.7
[INFO] [stderr]     Checking qingke v0.2.0
[INFO] [stderr]    Compiling quote v1.0.37
[INFO] [stderr]    Compiling hashbrown v0.13.2
[INFO] [stderr]     Checking futures-channel v0.3.30
[INFO] [stderr]    Compiling embassy-usb v0.3.0
[INFO] [stderr]    Compiling defmt-rtt v0.4.1
[INFO] [stderr]     Checking embassy-usb-driver v0.1.0
[INFO] [stderr]     Checking embassy-net-driver v0.2.0
[INFO] [stderr]     Checking futures-io v0.3.30
[INFO] [stderr]    Compiling embassy-executor v0.6.0
[INFO] [stderr]     Checking embedded-hal-nb v1.0.0
[INFO] [stderr]     Checking sdio-host v0.5.0
[INFO] [stderr]     Checking rand_core v0.6.4
[INFO] [stderr]    Compiling burnboard v0.1.0 (/opt/rustwide/workdir)
[INFO] [stderr]     Checking panic-halt v0.2.0
[INFO] [stderr]    Compiling syn v2.0.87
[INFO] [stderr]     Checking usb-device v0.3.2
[INFO] [stderr]    Compiling proc-macro-error-attr2 v2.0.0
[INFO] [stderr]    Compiling proc-macro-error-attr v1.0.4
[INFO] [stderr]    Compiling document-features v0.2.10
[INFO] [stderr]     Checking ssmarshal v1.0.0
[INFO] [stderr]    Compiling ch32-hal v0.1.0 (https://github.com/ch32-rs/ch32-hal.git#82209ddc)
[INFO] [stderr]    Compiling darling_core v0.20.10
[INFO] [stderr]    Compiling proc-macro-error2 v2.0.1
[INFO] [stderr]    Compiling proc-macro-error v1.0.4
[INFO] [stderr]    Compiling futures-macro v0.3.30
[INFO] [stderr]    Compiling thiserror-impl v2.0.8
[INFO] [stderr]    Compiling usbd-hid-macros v0.8.2
[INFO] [stderr]    Compiling qingke-rt-macros v0.2.1
[INFO] [stderr]     Checking futures-util v0.3.30
[INFO] [stderr]     Checking usbd-hid v0.8.2
[INFO] [stderr]    Compiling defmt-parser v0.4.1
[INFO] [stderr]    Compiling darling_macro v0.20.10
[INFO] [stderr]    Compiling darling v0.20.10
[INFO] [stderr]    Compiling embassy-executor-macros v0.5.0
[INFO] [stderr]     Checking futures v0.3.30
[INFO] [stderr]     Checking embassy-time v0.3.2
[INFO] [stderr]     Checking embassy-net-driver-channel v0.3.0
[INFO] [stdout] error: unsafe attribute used without unsafe
[INFO] [stdout]    --> /opt/rustwide/cargo-home/git/checkouts/ch32-hal-f8ddd79b527ebc9f/82209dd/src/exti.rs:312:5
[INFO] [stdout]     |
[INFO] [stdout] 312 |     #[interrupt]
[INFO] [stdout]     |     ^^^^^^^^^^^^ usage of unsafe attribute
[INFO] [stdout]     |
[INFO] [stdout]     = note: this error originates in the attribute macro `interrupt` (in Nightly builds, run with -Z macro-backtrace for more info)
[INFO] [stdout] help: wrap the attribute in `unsafe(...)`
[INFO] [stdout]     |
[INFO] [stdout] 312 |     unsafe(#[interrupt])
[INFO] [stdout]     |     +++++++            +
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: unsafe attribute used without unsafe
[INFO] [stdout]    --> /opt/rustwide/cargo-home/git/checkouts/ch32-hal-f8ddd79b527ebc9f/82209dd/src/exti.rs:316:5
[INFO] [stdout]     |
[INFO] [stdout] 316 |     #[interrupt]
[INFO] [stdout]     |     ^^^^^^^^^^^^ usage of unsafe attribute
[INFO] [stdout]     |
[INFO] [stdout]     = note: this error originates in the attribute macro `interrupt` (in Nightly builds, run with -Z macro-backtrace for more info)
[INFO] [stdout] help: wrap the attribute in `unsafe(...)`
[INFO] [stdout]     |
[INFO] [stdout] 316 |     unsafe(#[interrupt])
[INFO] [stdout]     |     +++++++            +
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: unsafe attribute used without unsafe
[INFO] [stdout]    --> /opt/rustwide/cargo-home/git/checkouts/ch32-hal-f8ddd79b527ebc9f/82209dd/src/exti.rs:320:5
[INFO] [stdout]     |
[INFO] [stdout] 320 |     #[interrupt]
[INFO] [stdout]     |     ^^^^^^^^^^^^ usage of unsafe attribute
[INFO] [stdout]     |
[INFO] [stdout]     = note: this error originates in the attribute macro `interrupt` (in Nightly builds, run with -Z macro-backtrace for more info)
[INFO] [stdout] help: wrap the attribute in `unsafe(...)`
[INFO] [stdout]     |
[INFO] [stdout] 320 |     unsafe(#[interrupt])
[INFO] [stdout]     |     +++++++            +
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: unsafe attribute used without unsafe
[INFO] [stdout]    --> /opt/rustwide/cargo-home/git/checkouts/ch32-hal-f8ddd79b527ebc9f/82209dd/src/exti.rs:324:5
[INFO] [stdout]     |
[INFO] [stdout] 324 |     #[interrupt]
[INFO] [stdout]     |     ^^^^^^^^^^^^ usage of unsafe attribute
[INFO] [stdout]     |
[INFO] [stdout]     = note: this error originates in the attribute macro `interrupt` (in Nightly builds, run with -Z macro-backtrace for more info)
[INFO] [stdout] help: wrap the attribute in `unsafe(...)`
[INFO] [stdout]     |
[INFO] [stdout] 324 |     unsafe(#[interrupt])
[INFO] [stdout]     |     +++++++            +
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: unsafe attribute used without unsafe
[INFO] [stdout]    --> /opt/rustwide/cargo-home/git/checkouts/ch32-hal-f8ddd79b527ebc9f/82209dd/src/exti.rs:328:5
[INFO] [stdout]     |
[INFO] [stdout] 328 |     #[interrupt]
[INFO] [stdout]     |     ^^^^^^^^^^^^ usage of unsafe attribute
[INFO] [stdout]     |
[INFO] [stdout]     = note: this error originates in the attribute macro `interrupt` (in Nightly builds, run with -Z macro-backtrace for more info)
[INFO] [stdout] help: wrap the attribute in `unsafe(...)`
[INFO] [stdout]     |
[INFO] [stdout] 328 |     unsafe(#[interrupt])
[INFO] [stdout]     |     +++++++            +
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: unsafe attribute used without unsafe
[INFO] [stdout]    --> /opt/rustwide/cargo-home/git/checkouts/ch32-hal-f8ddd79b527ebc9f/82209dd/src/exti.rs:332:5
[INFO] [stdout]     |
[INFO] [stdout] 332 |     #[interrupt]
[INFO] [stdout]     |     ^^^^^^^^^^^^ usage of unsafe attribute
[INFO] [stdout]     |
[INFO] [stdout]     = note: this error originates in the attribute macro `interrupt` (in Nightly builds, run with -Z macro-backtrace for more info)
[INFO] [stdout] help: wrap the attribute in `unsafe(...)`
[INFO] [stdout]     |
[INFO] [stdout] 332 |     unsafe(#[interrupt])
[INFO] [stdout]     |     +++++++            +
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: unsafe attribute used without unsafe
[INFO] [stdout]    --> /opt/rustwide/cargo-home/git/checkouts/ch32-hal-f8ddd79b527ebc9f/82209dd/src/exti.rs:336:5
[INFO] [stdout]     |
[INFO] [stdout] 336 |     #[interrupt]
[INFO] [stdout]     |     ^^^^^^^^^^^^ usage of unsafe attribute
[INFO] [stdout]     |
[INFO] [stdout]     = note: this error originates in the attribute macro `interrupt` (in Nightly builds, run with -Z macro-backtrace for more info)
[INFO] [stdout] help: wrap the attribute in `unsafe(...)`
[INFO] [stdout]     |
[INFO] [stdout] 336 |     unsafe(#[interrupt])
[INFO] [stdout]     |     +++++++            +
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: unsafe attribute used without unsafe
[INFO] [stdout]   --> /opt/rustwide/cargo-home/git/checkouts/ch32-hal-f8ddd79b527ebc9f/82209dd/src/embassy/time_driver_tim.rs:58:9
[INFO] [stdout]    |
[INFO] [stdout] 58 |         #[interrupt]
[INFO] [stdout]    |         ^^^^^^^^^^^^ usage of unsafe attribute
[INFO] [stdout]    |
[INFO] [stdout]    = note: this error originates in the attribute macro `interrupt` which comes from the expansion of the macro `foreach_interrupt` (in Nightly builds, run with -Z macro-backtrace for more info)
[INFO] [stdout] help: wrap the attribute in `unsafe(...)`
[INFO] [stdout]    |
[INFO] [stdout] 58 |         unsafe(#[interrupt])
[INFO] [stdout]    |         +++++++            +
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: unsafe attribute used without unsafe
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/ch32-hal-eda383fa759fc47b/out/_generated.rs:1:28128
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...A1_CH8 , 7u8) ; # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL1 () { < crate :: peripherals :: DMA1_CH1 as...
[INFO] [stdout]   |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^ usage of unsafe attribute
[INFO] [stdout]   |
[INFO] [stdout]   = note: this error originates in the attribute macro `qingke_rt::interrupt` (in Nightly builds, run with -Z macro-backtrace for more info)
[INFO] [stdout] help: wrap the attribute in `unsafe(...)`
[INFO] [stdout]   |
[INFO] [stdout] 1 | crate :: peripherals_definition ! (PFIC , SYSTICK , FLASH , MCO , RCC , DMA1 , PA0 , PA1 , PA2 , PA3 , PA4 , PA5 , PA6 , PA7 , PA8 , PA9 , PA10 , PA11 , PA12 , PA13 , PA14 , PA15 , PB0 , PB1 , PB2 , PB3 , PB4 , PB5 , PB6 , PB7 , PB8 , PB9 , PB10 , PB11 , PB12 , PB13 , PB14 , PB15 , PC0 , PC1 , PC2 , PC3 , PC4 , PC5 , PC6 , PC7 , PC8 , PC9 , PC10 , PC11 , PC12 , PC13 , PC14 , PC15 , PD0 , PD1 , PD2 , PD3 , PD4 , PD5 , PD6 , PD7 , PD8 , PD9 , PD10 , PD11 , PD12 , PD13 , PD14 , PD15 , AFIO , EXTEND , RTC , USART1 , USART2 , TIM1 , TIM2 , TIM3 , TIM4 , ADC1 , ADC2 , SPI1 , I2C1 , USBD , USBRAM , CAN1 , EXTI0 , EXTI1 , EXTI2 , EXTI3 , EXTI4 , EXTI5 , EXTI6 , EXTI7 , EXTI8 , EXTI9 , EXTI10 , EXTI11 , EXTI12 , EXTI13 , EXTI14 , EXTI15 , DMA1_CH1 , DMA1_CH2 , DMA1_CH3 , DMA1_CH4 , DMA1_CH5 , DMA1_CH6 , DMA1_CH7 , DMA1_CH8) ; crate :: peripherals_struct ! (PFIC , SYSTICK , FLASH , MCO , RCC , DMA1 , PA0 , PA1 , PA2 , PA3 , PA4 , PA5 , PA6 , PA7 , PA8 , PA9 , PA10 , PA11 , PA12 , PA13 , PA14 , PA15 , PB0 , PB1 , PB2 , PB3 , PB4 , PB5 , PB6 , PB7 , PB8 , PB9 , PB10 , PB11 , PB12 , PB13 , PB14 , PB15 , PC0 , PC1 , PC2 , PC3 , PC4 , PC5 , PC6 , PC7 , PC8 , PC9 , PC10 , PC11 , PC12 , PC13 , PC14 , PC15 , PD0 , PD1 , PD2 , PD3 , PD4 , PD5 , PD6 , PD7 , PD8 , PD9 , PD10 , PD11 , PD12 , PD13 , PD14 , PD15 , AFIO , EXTEND , RTC , USART1 , USART2 , TIM1 , TIM2 , TIM3 , TIM4 , ADC1 , ADC2 , SPI1 , I2C1 , USBD , USBRAM , CAN1 , EXTI0 , EXTI1 , EXTI2 , EXTI3 , EXTI4 , EXTI5 , EXTI6 , EXTI7 , EXTI8 , EXTI9 , EXTI10 , EXTI11 , EXTI12 , EXTI13 , EXTI14 , EXTI15 , DMA1_CH1 , DMA1_CH2 , DMA1_CH3 , DMA1_CH4 , DMA1_CH5 , DMA1_CH6 , DMA1_CH7 , DMA1_CH8) ; crate :: interrupt_mod ! (WWDG , PVD , TAMPER , RTC , FLASH , RCC , EXTI0 , EXTI1 , EXTI2 , EXTI3 , EXTI4 , DMA1_CHANNEL1 , DMA1_CHANNEL2 , DMA1_CHANNEL3 , DMA1_CHANNEL4 , DMA1_CHANNEL5 , DMA1_CHANNEL6 , DMA1_CHANNEL7 , ADC , USB_HP_CAN1_TX , USB_LP_CAN1_RX0 , CAN1_RX1 , CAN1_SCE , EXTI9_5 , TIM1_BRK , TIM1_UP , TIM1_TRG_COM , TIM1_CC , TIM2 , TIM3 , TIM4 , I2C1_EV , I2C1_ER , I2C2_EV , I2C2_ER , SPI1 , SPI2 , USART1 , USART2 , USART3 , EXTI15_10 , RTC_ALARM , USB_WKUP , USBHD , USBHD_WKUP , UART4 , DMA1_CHANNEL8 ,) ; impl crate :: peripheral :: SealedRccPeripheral for peripherals :: DMA1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . hclk } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . ahbpcenr () . modify (| w | w . set_dma1en (true)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . ahbpcenr () . modify (| w | w . set_dma1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: DMA1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: AFIO { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_afioen (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_afiorst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_afiorst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_afioen (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: AFIO { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: USART1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_usart1en (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_usart1rst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_usart1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_usart1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: USART1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: USART2 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_usart2en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_usart2rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_usart2rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_usart2en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: USART2 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: USART2 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_usart2_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: USART2 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: TIM1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2_tim } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_tim1en (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_tim1rst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_tim1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_tim1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: TIM1 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: TIM1 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_tim1_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: TIM1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: TIM2 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1_tim } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim2en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim2rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim2rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim2en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: TIM2 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: TIM2 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_tim2_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: TIM2 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: TIM3 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1_tim } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim3en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim3rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim3rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim3en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: TIM3 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: TIM3 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_tim3_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: TIM3 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: TIM4 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1_tim } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim4en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim4rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim4rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim4en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: TIM4 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: TIM4 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_tim4_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: TIM4 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: ADC1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_adc1en (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_adc1rst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_adc1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_adc1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: ADC1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: ADC2 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_adc2en (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_adc2rst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_adc2rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_adc2en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: ADC2 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: SPI1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_spi1en (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_spi1rst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_spi1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_spi1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: SPI1 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: SPI1 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_spi1_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: SPI1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: I2C1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_i2c1en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_i2c1rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_i2c1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_i2c1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: I2C1 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: I2C1 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_i2c1_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: I2C1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: USBD { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_usbden (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_usbdrst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_usbdrst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_usbden (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: USBD { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: CAN1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_can1en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_can1rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_can1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_can1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: CAN1 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: CAN1 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_can1_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: CAN1 { } pub unsafe fn init_dma () { crate :: pac :: RCC . ahbpcenr () . modify (| w | w . set_dma1en (true)) ; } pub unsafe fn init_gpio () { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_iopaen (true)) ; crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_iopben (true)) ; crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_iopcen (true)) ; crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_iopden (true)) ; } pin_trait_impl ! (crate :: usart :: CkPin , USART1 , PA8 , 0u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART1 , PA9 , 0u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART1 , PA10 , 0u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART1 , PA11 , 0u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART1 , PA12 , 0u8) ; pin_trait_impl ! (crate :: usart :: CkPin , USART1 , PA8 , 1u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART1 , PB6 , 1u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART1 , PB7 , 1u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART1 , PA11 , 1u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART1 , PA12 , 1u8) ; pin_trait_impl ! (crate :: usart :: CkPin , USART1 , PA10 , 2u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART1 , PB15 , 2u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART1 , PA8 , 2u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART1 , PA5 , 2u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART1 , PA9 , 2u8) ; pin_trait_impl ! (crate :: usart :: CkPin , USART1 , PA5 , 3u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART1 , PA6 , 3u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART1 , PA7 , 3u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART1 , PC4 , 3u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART1 , PC5 , 3u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART2 , PA0 , 0u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART2 , PA1 , 0u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART2 , PA2 , 0u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART2 , PA3 , 0u8) ; pin_trait_impl ! (crate :: usart :: CkPin , USART2 , PA4 , 0u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART2 , PD3 , 1u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART2 , PD4 , 1u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART2 , PD5 , 1u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART2 , PD6 , 1u8) ; pin_trait_impl ! (crate :: usart :: CkPin , USART2 , PD7 , 1u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM1 , PA12 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM1 , PA8 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM1 , PA9 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM1 , PA10 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM1 , PA11 , 0u8) ; pin_trait_impl ! (crate :: timer :: BreakInputPin , TIM1 , PB12 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel1ComplementaryPin , TIM1 , PB13 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel2ComplementaryPin , TIM1 , PB14 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel3ComplementaryPin , TIM1 , PB15 , 0u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM1 , PA12 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM1 , PA8 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM1 , PA9 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM1 , PA10 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM1 , PA11 , 1u8) ; pin_trait_impl ! (crate :: timer :: BreakInputPin , TIM1 , PA6 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel1ComplementaryPin , TIM1 , PA7 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel2ComplementaryPin , TIM1 , PB0 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel3ComplementaryPin , TIM1 , PB1 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM2 , PA0 , 0u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM2 , PA0 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM2 , PA1 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM2 , PA2 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM2 , PA3 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM2 , PA15 , 1u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM2 , PA15 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM2 , PB3 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM2 , PA2 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM2 , PA3 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM2 , PA0 , 2u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM2 , PA0 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM2 , PA1 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM2 , PB10 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM2 , PB11 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM2 , PA15 , 3u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM2 , PA15 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM2 , PB3 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM2 , PB10 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM2 , PB11 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM3 , PA6 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM3 , PA7 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM3 , PB0 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM3 , PB1 , 0u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM3 , PD2 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM3 , PB4 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM3 , PB5 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM3 , PB0 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM3 , PB1 , 2u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM3 , PD2 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM3 , PC6 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM3 , PC7 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM3 , PC8 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM3 , PC9 , 3u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM3 , PD2 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM4 , PB6 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM4 , PB7 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM4 , PB8 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM4 , PB9 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM4 , PD12 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM4 , PD13 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM4 , PD14 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM4 , PD15 , 1u8) ; impl_adc_pin ! (ADC1 , PA0 , 0u8) ; impl_adc_pin ! (ADC1 , PA1 , 1u8) ; impl_adc_pin ! (ADC1 , PA2 , 2u8) ; impl_adc_pin ! (ADC1 , PA3 , 3u8) ; impl_adc_pin ! (ADC1 , PA4 , 4u8) ; impl_adc_pin ! (ADC1 , PA5 , 5u8) ; impl_adc_pin ! (ADC1 , PA6 , 6u8) ; impl_adc_pin ! (ADC1 , PA7 , 7u8) ; impl_adc_pin ! (ADC1 , PB0 , 8u8) ; impl_adc_pin ! (ADC1 , PB1 , 9u8) ; impl_adc_pin ! (ADC1 , PC0 , 10u8) ; impl_adc_pin ! (ADC1 , PC1 , 11u8) ; impl_adc_pin ! (ADC1 , PC2 , 12u8) ; impl_adc_pin ! (ADC1 , PC3 , 13u8) ; impl_adc_pin ! (ADC1 , PC4 , 14u8) ; impl_adc_pin ! (ADC1 , PC5 , 15u8) ; impl_adc_pin ! (ADC2 , PA0 , 0u8) ; impl_adc_pin ! (ADC2 , PA1 , 1u8) ; impl_adc_pin ! (ADC2 , PA2 , 2u8) ; impl_adc_pin ! (ADC2 , PA3 , 3u8) ; impl_adc_pin ! (ADC2 , PA4 , 4u8) ; impl_adc_pin ! (ADC2 , PA5 , 5u8) ; impl_adc_pin ! (ADC2 , PA6 , 6u8) ; impl_adc_pin ! (ADC2 , PA7 , 7u8) ; impl_adc_pin ! (ADC2 , PB0 , 8u8) ; impl_adc_pin ! (ADC2 , PB1 , 9u8) ; impl_adc_pin ! (ADC2 , PC0 , 10u8) ; impl_adc_pin ! (ADC2 , PC1 , 11u8) ; impl_adc_pin ! (ADC2 , PC2 , 12u8) ; impl_adc_pin ! (ADC2 , PC3 , 13u8) ; impl_adc_pin ! (ADC2 , PC4 , 14u8) ; impl_adc_pin ! (ADC2 , PC5 , 15u8) ; pin_trait_impl ! (crate :: spi :: CsPin , SPI1 , PA4 , 0u8) ; pin_trait_impl ! (crate :: spi :: SckPin , SPI1 , PA5 , 0u8) ; pin_trait_impl ! (crate :: spi :: MisoPin , SPI1 , PA6 , 0u8) ; pin_trait_impl ! (crate :: spi :: MosiPin , SPI1 , PA7 , 0u8) ; pin_trait_impl ! (crate :: spi :: CsPin , SPI1 , PA15 , 1u8) ; pin_trait_impl ! (crate :: spi :: SckPin , SPI1 , PB3 , 1u8) ; pin_trait_impl ! (crate :: spi :: MisoPin , SPI1 , PB4 , 1u8) ; pin_trait_impl ! (crate :: spi :: MosiPin , SPI1 , PB5 , 1u8) ; pin_trait_impl ! (crate :: i2c :: SclPin , I2C1 , PB6 , 0u8) ; pin_trait_impl ! (crate :: i2c :: SdaPin , I2C1 , PB7 , 0u8) ; pin_trait_impl ! (crate :: i2c :: SclPin , I2C1 , PB8 , 1u8) ; pin_trait_impl ! (crate :: i2c :: SdaPin , I2C1 , PB9 , 1u8) ; pin_trait_impl ! (crate :: usbd :: DmPin , USBD , PA11 , 0u8) ; pin_trait_impl ! (crate :: usbd :: DpPin , USBD , PA12 , 0u8) ; dma_trait_impl ! (crate :: usart :: RxDma , USART1 , { channel : DMA1_CH5 } , ()) ; dma_trait_impl ! (crate :: usart :: TxDma , USART1 , { channel : DMA1_CH4 } , ()) ; dma_trait_impl ! (crate :: usart :: RxDma , USART2 , { channel : DMA1_CH6 } , ()) ; dma_trait_impl ! (crate :: usart :: TxDma , USART2 , { channel : DMA1_CH7 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch3Dma , TIM1 , { channel : DMA1_CH6 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch2Dma , TIM1 , { channel : DMA1_CH3 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch4Dma , TIM1 , { channel : DMA1_CH4 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch1Dma , TIM1 , { channel : DMA1_CH2 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch4Dma , TIM2 , { channel : DMA1_CH7 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch1Dma , TIM2 , { channel : DMA1_CH5 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch2Dma , TIM2 , { channel : DMA1_CH7 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch3Dma , TIM2 , { channel : DMA1_CH1 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch1Dma , TIM3 , { channel : DMA1_CH6 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch3Dma , TIM3 , { channel : DMA1_CH2 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch4Dma , TIM3 , { channel : DMA1_CH3 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch1Dma , TIM4 , { channel : DMA1_CH1 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch3Dma , TIM4 , { channel : DMA1_CH5 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch2Dma , TIM4 , { channel : DMA1_CH4 } , ()) ; dma_trait_impl ! (crate :: spi :: TxDma , SPI1 , { channel : DMA1_CH3 } , ()) ; dma_trait_impl ! (crate :: spi :: RxDma , SPI1 , { channel : DMA1_CH2 } , ()) ; dma_trait_impl ! (crate :: i2c :: RxDma , I2C1 , { channel : DMA1_CH7 } , ()) ; dma_trait_impl ! (crate :: i2c :: TxDma , I2C1 , { channel : DMA1_CH6 } , ()) ; # [allow (non_camel_case_types)] pub mod peripheral_interrupts { pub mod PFIC { } pub mod SYSTICK { } pub mod FLASH { } pub mod EXTI { pub type EXTI0 = crate :: interrupt :: typelevel :: EXTI0 ; pub type EXTI1 = crate :: interrupt :: typelevel :: EXTI1 ; pub type EXTI2 = crate :: interrupt :: typelevel :: EXTI2 ; pub type EXTI3 = crate :: interrupt :: typelevel :: EXTI3 ; pub type EXTI4 = crate :: interrupt :: typelevel :: EXTI4 ; pub type EXTI5 = crate :: interrupt :: typelevel :: EXTI9_5 ; pub type EXTI10 = crate :: interrupt :: typelevel :: EXTI15_10 ; } pub mod RCC { } pub mod DMA1 { pub type CH1 = crate :: interrupt :: typelevel :: DMA1_CHANNEL1 ; pub type CH2 = crate :: interrupt :: typelevel :: DMA1_CHANNEL2 ; pub type CH3 = crate :: interrupt :: typelevel :: DMA1_CHANNEL3 ; pub type CH4 = crate :: interrupt :: typelevel :: DMA1_CHANNEL4 ; pub type CH5 = crate :: interrupt :: typelevel :: DMA1_CHANNEL5 ; pub type CH6 = crate :: interrupt :: typelevel :: DMA1_CHANNEL6 ; pub type CH7 = crate :: interrupt :: typelevel :: DMA1_CHANNEL7 ; pub type CH8 = crate :: interrupt :: typelevel :: DMA1_CHANNEL8 ; } pub mod GPIOA { } pub mod GPIOB { } pub mod GPIOC { } pub mod GPIOD { } pub mod AFIO { } pub mod EXTEND { } pub mod RTC { } pub mod USART1 { pub type GLOBAL = crate :: interrupt :: typelevel :: USART1 ; } pub mod USART2 { pub type GLOBAL = crate :: interrupt :: typelevel :: USART2 ; } pub mod TIM1 { pub type BRK = crate :: interrupt :: typelevel :: TIM1_BRK ; pub type UP = crate :: interrupt :: typelevel :: TIM1_UP ; pub type TRG = crate :: interrupt :: typelevel :: TIM1_TRG_COM ; pub type COM = crate :: interrupt :: typelevel :: TIM1_TRG_COM ; pub type CC = crate :: interrupt :: typelevel :: TIM1_CC ; } pub mod TIM2 { pub type UP = crate :: interrupt :: typelevel :: TIM2 ; pub type TRG = crate :: interrupt :: typelevel :: TIM2 ; pub type CC = crate :: interrupt :: typelevel :: TIM2 ; } pub mod TIM3 { pub type UP = crate :: interrupt :: typelevel :: TIM3 ; pub type TRG = crate :: interrupt :: typelevel :: TIM3 ; pub type CC = crate :: interrupt :: typelevel :: TIM3 ; } pub mod TIM4 { pub type UP = crate :: interrupt :: typelevel :: TIM4 ; pub type TRG = crate :: interrupt :: typelevel :: TIM4 ; pub type CC = crate :: interrupt :: typelevel :: TIM4 ; } pub mod ADC1 { pub type GLOBAL = crate :: interrupt :: typelevel :: ADC ; } pub mod ADC2 { pub type GLOBAL = crate :: interrupt :: typelevel :: ADC ; } pub mod SPI1 { pub type GLOBAL = crate :: interrupt :: typelevel :: SPI1 ; } pub mod I2C1 { pub type ER = crate :: interrupt :: typelevel :: I2C1_ER ; pub type EV = crate :: interrupt :: typelevel :: I2C1_EV ; } pub mod USBD { pub type HP = crate :: interrupt :: typelevel :: USB_HP_CAN1_TX ; pub type LP = crate :: interrupt :: typelevel :: USB_LP_CAN1_RX0 ; pub type WKUP = crate :: interrupt :: typelevel :: USB_WKUP ; } pub mod USBRAM { } pub mod CAN1 { pub type TX = crate :: interrupt :: typelevel :: USB_HP_CAN1_TX ; pub type RX0 = crate :: interrupt :: typelevel :: USB_LP_CAN1_RX0 ; pub type RX1 = crate :: interrupt :: typelevel :: CAN1_RX1 ; pub type SCE = crate :: interrupt :: typelevel :: CAN1_SCE ; } } dma_channel_impl ! (DMA1_CH1 , 0u8) ; dma_channel_impl ! (DMA1_CH2 , 1u8) ; dma_channel_impl ! (DMA1_CH3 , 2u8) ; dma_channel_impl ! (DMA1_CH4 , 3u8) ; dma_channel_impl ! (DMA1_CH5 , 4u8) ; dma_channel_impl ! (DMA1_CH6 , 5u8) ; dma_channel_impl ! (DMA1_CH7 , 6u8) ; dma_channel_impl ! (DMA1_CH8 , 7u8) ; # [cfg (feature = "rt")] unsafe(# [qingke_rt :: interrupt]) unsafe fn DMA1_CHANNEL1 () { < crate :: peripherals :: DMA1_CH1 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL2 () { < crate :: peripherals :: DMA1_CH2 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL3 () { < crate :: peripherals :: DMA1_CH3 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL4 () { < crate :: peripherals :: DMA1_CH4 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL5 () { < crate :: peripherals :: DMA1_CH5 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL6 () { < crate :: peripherals :: DMA1_CH6 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL7 () { < crate :: peripherals :: DMA1_CH7 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL8 () { < crate :: peripherals :: DMA1_CH8 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } pub (crate) const DMA_CHANNELS : & [crate :: dma :: ChannelInfo] = & [crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 0usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 1usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 2usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 3usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 4usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 5usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 6usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 7usize , } ,] ;
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +++++++                          +
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: unsafe attribute used without unsafe
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/ch32-hal-eda383fa759fc47b/out/_generated.rs:1:28299
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL2 () { < crate :: peripherals :: DMA1_CH2 as...
[INFO] [stdout]   |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^ usage of unsafe attribute
[INFO] [stdout]   |
[INFO] [stdout]   = note: this error originates in the attribute macro `qingke_rt::interrupt` (in Nightly builds, run with -Z macro-backtrace for more info)
[INFO] [stdout] help: wrap the attribute in `unsafe(...)`
[INFO] [stdout]   |
[INFO] [stdout] 1 | crate :: peripherals_definition ! (PFIC , SYSTICK , FLASH , MCO , RCC , DMA1 , PA0 , PA1 , PA2 , PA3 , PA4 , PA5 , PA6 , PA7 , PA8 , PA9 , PA10 , PA11 , PA12 , PA13 , PA14 , PA15 , PB0 , PB1 , PB2 , PB3 , PB4 , PB5 , PB6 , PB7 , PB8 , PB9 , PB10 , PB11 , PB12 , PB13 , PB14 , PB15 , PC0 , PC1 , PC2 , PC3 , PC4 , PC5 , PC6 , PC7 , PC8 , PC9 , PC10 , PC11 , PC12 , PC13 , PC14 , PC15 , PD0 , PD1 , PD2 , PD3 , PD4 , PD5 , PD6 , PD7 , PD8 , PD9 , PD10 , PD11 , PD12 , PD13 , PD14 , PD15 , AFIO , EXTEND , RTC , USART1 , USART2 , TIM1 , TIM2 , TIM3 , TIM4 , ADC1 , ADC2 , SPI1 , I2C1 , USBD , USBRAM , CAN1 , EXTI0 , EXTI1 , EXTI2 , EXTI3 , EXTI4 , EXTI5 , EXTI6 , EXTI7 , EXTI8 , EXTI9 , EXTI10 , EXTI11 , EXTI12 , EXTI13 , EXTI14 , EXTI15 , DMA1_CH1 , DMA1_CH2 , DMA1_CH3 , DMA1_CH4 , DMA1_CH5 , DMA1_CH6 , DMA1_CH7 , DMA1_CH8) ; crate :: peripherals_struct ! (PFIC , SYSTICK , FLASH , MCO , RCC , DMA1 , PA0 , PA1 , PA2 , PA3 , PA4 , PA5 , PA6 , PA7 , PA8 , PA9 , PA10 , PA11 , PA12 , PA13 , PA14 , PA15 , PB0 , PB1 , PB2 , PB3 , PB4 , PB5 , PB6 , PB7 , PB8 , PB9 , PB10 , PB11 , PB12 , PB13 , PB14 , PB15 , PC0 , PC1 , PC2 , PC3 , PC4 , PC5 , PC6 , PC7 , PC8 , PC9 , PC10 , PC11 , PC12 , PC13 , PC14 , PC15 , PD0 , PD1 , PD2 , PD3 , PD4 , PD5 , PD6 , PD7 , PD8 , PD9 , PD10 , PD11 , PD12 , PD13 , PD14 , PD15 , AFIO , EXTEND , RTC , USART1 , USART2 , TIM1 , TIM2 , TIM3 , TIM4 , ADC1 , ADC2 , SPI1 , I2C1 , USBD , USBRAM , CAN1 , EXTI0 , EXTI1 , EXTI2 , EXTI3 , EXTI4 , EXTI5 , EXTI6 , EXTI7 , EXTI8 , EXTI9 , EXTI10 , EXTI11 , EXTI12 , EXTI13 , EXTI14 , EXTI15 , DMA1_CH1 , DMA1_CH2 , DMA1_CH3 , DMA1_CH4 , DMA1_CH5 , DMA1_CH6 , DMA1_CH7 , DMA1_CH8) ; crate :: interrupt_mod ! (WWDG , PVD , TAMPER , RTC , FLASH , RCC , EXTI0 , EXTI1 , EXTI2 , EXTI3 , EXTI4 , DMA1_CHANNEL1 , DMA1_CHANNEL2 , DMA1_CHANNEL3 , DMA1_CHANNEL4 , DMA1_CHANNEL5 , DMA1_CHANNEL6 , DMA1_CHANNEL7 , ADC , USB_HP_CAN1_TX , USB_LP_CAN1_RX0 , CAN1_RX1 , CAN1_SCE , EXTI9_5 , TIM1_BRK , TIM1_UP , TIM1_TRG_COM , TIM1_CC , TIM2 , TIM3 , TIM4 , I2C1_EV , I2C1_ER , I2C2_EV , I2C2_ER , SPI1 , SPI2 , USART1 , USART2 , USART3 , EXTI15_10 , RTC_ALARM , USB_WKUP , USBHD , USBHD_WKUP , UART4 , DMA1_CHANNEL8 ,) ; impl crate :: peripheral :: SealedRccPeripheral for peripherals :: DMA1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . hclk } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . ahbpcenr () . modify (| w | w . set_dma1en (true)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . ahbpcenr () . modify (| w | w . set_dma1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: DMA1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: AFIO { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_afioen (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_afiorst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_afiorst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_afioen (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: AFIO { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: USART1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_usart1en (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_usart1rst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_usart1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_usart1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: USART1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: USART2 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_usart2en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_usart2rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_usart2rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_usart2en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: USART2 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: USART2 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_usart2_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: USART2 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: TIM1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2_tim } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_tim1en (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_tim1rst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_tim1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_tim1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: TIM1 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: TIM1 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_tim1_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: TIM1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: TIM2 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1_tim } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim2en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim2rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim2rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim2en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: TIM2 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: TIM2 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_tim2_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: TIM2 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: TIM3 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1_tim } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim3en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim3rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim3rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim3en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: TIM3 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: TIM3 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_tim3_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: TIM3 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: TIM4 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1_tim } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim4en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim4rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim4rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim4en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: TIM4 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: TIM4 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_tim4_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: TIM4 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: ADC1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_adc1en (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_adc1rst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_adc1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_adc1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: ADC1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: ADC2 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_adc2en (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_adc2rst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_adc2rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_adc2en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: ADC2 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: SPI1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_spi1en (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_spi1rst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_spi1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_spi1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: SPI1 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: SPI1 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_spi1_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: SPI1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: I2C1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_i2c1en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_i2c1rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_i2c1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_i2c1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: I2C1 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: I2C1 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_i2c1_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: I2C1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: USBD { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_usbden (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_usbdrst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_usbdrst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_usbden (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: USBD { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: CAN1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_can1en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_can1rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_can1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_can1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: CAN1 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: CAN1 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_can1_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: CAN1 { } pub unsafe fn init_dma () { crate :: pac :: RCC . ahbpcenr () . modify (| w | w . set_dma1en (true)) ; } pub unsafe fn init_gpio () { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_iopaen (true)) ; crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_iopben (true)) ; crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_iopcen (true)) ; crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_iopden (true)) ; } pin_trait_impl ! (crate :: usart :: CkPin , USART1 , PA8 , 0u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART1 , PA9 , 0u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART1 , PA10 , 0u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART1 , PA11 , 0u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART1 , PA12 , 0u8) ; pin_trait_impl ! (crate :: usart :: CkPin , USART1 , PA8 , 1u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART1 , PB6 , 1u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART1 , PB7 , 1u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART1 , PA11 , 1u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART1 , PA12 , 1u8) ; pin_trait_impl ! (crate :: usart :: CkPin , USART1 , PA10 , 2u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART1 , PB15 , 2u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART1 , PA8 , 2u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART1 , PA5 , 2u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART1 , PA9 , 2u8) ; pin_trait_impl ! (crate :: usart :: CkPin , USART1 , PA5 , 3u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART1 , PA6 , 3u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART1 , PA7 , 3u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART1 , PC4 , 3u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART1 , PC5 , 3u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART2 , PA0 , 0u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART2 , PA1 , 0u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART2 , PA2 , 0u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART2 , PA3 , 0u8) ; pin_trait_impl ! (crate :: usart :: CkPin , USART2 , PA4 , 0u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART2 , PD3 , 1u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART2 , PD4 , 1u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART2 , PD5 , 1u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART2 , PD6 , 1u8) ; pin_trait_impl ! (crate :: usart :: CkPin , USART2 , PD7 , 1u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM1 , PA12 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM1 , PA8 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM1 , PA9 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM1 , PA10 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM1 , PA11 , 0u8) ; pin_trait_impl ! (crate :: timer :: BreakInputPin , TIM1 , PB12 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel1ComplementaryPin , TIM1 , PB13 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel2ComplementaryPin , TIM1 , PB14 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel3ComplementaryPin , TIM1 , PB15 , 0u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM1 , PA12 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM1 , PA8 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM1 , PA9 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM1 , PA10 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM1 , PA11 , 1u8) ; pin_trait_impl ! (crate :: timer :: BreakInputPin , TIM1 , PA6 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel1ComplementaryPin , TIM1 , PA7 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel2ComplementaryPin , TIM1 , PB0 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel3ComplementaryPin , TIM1 , PB1 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM2 , PA0 , 0u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM2 , PA0 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM2 , PA1 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM2 , PA2 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM2 , PA3 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM2 , PA15 , 1u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM2 , PA15 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM2 , PB3 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM2 , PA2 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM2 , PA3 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM2 , PA0 , 2u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM2 , PA0 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM2 , PA1 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM2 , PB10 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM2 , PB11 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM2 , PA15 , 3u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM2 , PA15 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM2 , PB3 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM2 , PB10 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM2 , PB11 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM3 , PA6 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM3 , PA7 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM3 , PB0 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM3 , PB1 , 0u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM3 , PD2 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM3 , PB4 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM3 , PB5 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM3 , PB0 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM3 , PB1 , 2u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM3 , PD2 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM3 , PC6 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM3 , PC7 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM3 , PC8 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM3 , PC9 , 3u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM3 , PD2 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM4 , PB6 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM4 , PB7 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM4 , PB8 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM4 , PB9 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM4 , PD12 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM4 , PD13 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM4 , PD14 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM4 , PD15 , 1u8) ; impl_adc_pin ! (ADC1 , PA0 , 0u8) ; impl_adc_pin ! (ADC1 , PA1 , 1u8) ; impl_adc_pin ! (ADC1 , PA2 , 2u8) ; impl_adc_pin ! (ADC1 , PA3 , 3u8) ; impl_adc_pin ! (ADC1 , PA4 , 4u8) ; impl_adc_pin ! (ADC1 , PA5 , 5u8) ; impl_adc_pin ! (ADC1 , PA6 , 6u8) ; impl_adc_pin ! (ADC1 , PA7 , 7u8) ; impl_adc_pin ! (ADC1 , PB0 , 8u8) ; impl_adc_pin ! (ADC1 , PB1 , 9u8) ; impl_adc_pin ! (ADC1 , PC0 , 10u8) ; impl_adc_pin ! (ADC1 , PC1 , 11u8) ; impl_adc_pin ! (ADC1 , PC2 , 12u8) ; impl_adc_pin ! (ADC1 , PC3 , 13u8) ; impl_adc_pin ! (ADC1 , PC4 , 14u8) ; impl_adc_pin ! (ADC1 , PC5 , 15u8) ; impl_adc_pin ! (ADC2 , PA0 , 0u8) ; impl_adc_pin ! (ADC2 , PA1 , 1u8) ; impl_adc_pin ! (ADC2 , PA2 , 2u8) ; impl_adc_pin ! (ADC2 , PA3 , 3u8) ; impl_adc_pin ! (ADC2 , PA4 , 4u8) ; impl_adc_pin ! (ADC2 , PA5 , 5u8) ; impl_adc_pin ! (ADC2 , PA6 , 6u8) ; impl_adc_pin ! (ADC2 , PA7 , 7u8) ; impl_adc_pin ! (ADC2 , PB0 , 8u8) ; impl_adc_pin ! (ADC2 , PB1 , 9u8) ; impl_adc_pin ! (ADC2 , PC0 , 10u8) ; impl_adc_pin ! (ADC2 , PC1 , 11u8) ; impl_adc_pin ! (ADC2 , PC2 , 12u8) ; impl_adc_pin ! (ADC2 , PC3 , 13u8) ; impl_adc_pin ! (ADC2 , PC4 , 14u8) ; impl_adc_pin ! (ADC2 , PC5 , 15u8) ; pin_trait_impl ! (crate :: spi :: CsPin , SPI1 , PA4 , 0u8) ; pin_trait_impl ! (crate :: spi :: SckPin , SPI1 , PA5 , 0u8) ; pin_trait_impl ! (crate :: spi :: MisoPin , SPI1 , PA6 , 0u8) ; pin_trait_impl ! (crate :: spi :: MosiPin , SPI1 , PA7 , 0u8) ; pin_trait_impl ! (crate :: spi :: CsPin , SPI1 , PA15 , 1u8) ; pin_trait_impl ! (crate :: spi :: SckPin , SPI1 , PB3 , 1u8) ; pin_trait_impl ! (crate :: spi :: MisoPin , SPI1 , PB4 , 1u8) ; pin_trait_impl ! (crate :: spi :: MosiPin , SPI1 , PB5 , 1u8) ; pin_trait_impl ! (crate :: i2c :: SclPin , I2C1 , PB6 , 0u8) ; pin_trait_impl ! (crate :: i2c :: SdaPin , I2C1 , PB7 , 0u8) ; pin_trait_impl ! (crate :: i2c :: SclPin , I2C1 , PB8 , 1u8) ; pin_trait_impl ! (crate :: i2c :: SdaPin , I2C1 , PB9 , 1u8) ; pin_trait_impl ! (crate :: usbd :: DmPin , USBD , PA11 , 0u8) ; pin_trait_impl ! (crate :: usbd :: DpPin , USBD , PA12 , 0u8) ; dma_trait_impl ! (crate :: usart :: RxDma , USART1 , { channel : DMA1_CH5 } , ()) ; dma_trait_impl ! (crate :: usart :: TxDma , USART1 , { channel : DMA1_CH4 } , ()) ; dma_trait_impl ! (crate :: usart :: RxDma , USART2 , { channel : DMA1_CH6 } , ()) ; dma_trait_impl ! (crate :: usart :: TxDma , USART2 , { channel : DMA1_CH7 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch3Dma , TIM1 , { channel : DMA1_CH6 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch2Dma , TIM1 , { channel : DMA1_CH3 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch4Dma , TIM1 , { channel : DMA1_CH4 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch1Dma , TIM1 , { channel : DMA1_CH2 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch4Dma , TIM2 , { channel : DMA1_CH7 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch1Dma , TIM2 , { channel : DMA1_CH5 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch2Dma , TIM2 , { channel : DMA1_CH7 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch3Dma , TIM2 , { channel : DMA1_CH1 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch1Dma , TIM3 , { channel : DMA1_CH6 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch3Dma , TIM3 , { channel : DMA1_CH2 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch4Dma , TIM3 , { channel : DMA1_CH3 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch1Dma , TIM4 , { channel : DMA1_CH1 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch3Dma , TIM4 , { channel : DMA1_CH5 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch2Dma , TIM4 , { channel : DMA1_CH4 } , ()) ; dma_trait_impl ! (crate :: spi :: TxDma , SPI1 , { channel : DMA1_CH3 } , ()) ; dma_trait_impl ! (crate :: spi :: RxDma , SPI1 , { channel : DMA1_CH2 } , ()) ; dma_trait_impl ! (crate :: i2c :: RxDma , I2C1 , { channel : DMA1_CH7 } , ()) ; dma_trait_impl ! (crate :: i2c :: TxDma , I2C1 , { channel : DMA1_CH6 } , ()) ; # [allow (non_camel_case_types)] pub mod peripheral_interrupts { pub mod PFIC { } pub mod SYSTICK { } pub mod FLASH { } pub mod EXTI { pub type EXTI0 = crate :: interrupt :: typelevel :: EXTI0 ; pub type EXTI1 = crate :: interrupt :: typelevel :: EXTI1 ; pub type EXTI2 = crate :: interrupt :: typelevel :: EXTI2 ; pub type EXTI3 = crate :: interrupt :: typelevel :: EXTI3 ; pub type EXTI4 = crate :: interrupt :: typelevel :: EXTI4 ; pub type EXTI5 = crate :: interrupt :: typelevel :: EXTI9_5 ; pub type EXTI10 = crate :: interrupt :: typelevel :: EXTI15_10 ; } pub mod RCC { } pub mod DMA1 { pub type CH1 = crate :: interrupt :: typelevel :: DMA1_CHANNEL1 ; pub type CH2 = crate :: interrupt :: typelevel :: DMA1_CHANNEL2 ; pub type CH3 = crate :: interrupt :: typelevel :: DMA1_CHANNEL3 ; pub type CH4 = crate :: interrupt :: typelevel :: DMA1_CHANNEL4 ; pub type CH5 = crate :: interrupt :: typelevel :: DMA1_CHANNEL5 ; pub type CH6 = crate :: interrupt :: typelevel :: DMA1_CHANNEL6 ; pub type CH7 = crate :: interrupt :: typelevel :: DMA1_CHANNEL7 ; pub type CH8 = crate :: interrupt :: typelevel :: DMA1_CHANNEL8 ; } pub mod GPIOA { } pub mod GPIOB { } pub mod GPIOC { } pub mod GPIOD { } pub mod AFIO { } pub mod EXTEND { } pub mod RTC { } pub mod USART1 { pub type GLOBAL = crate :: interrupt :: typelevel :: USART1 ; } pub mod USART2 { pub type GLOBAL = crate :: interrupt :: typelevel :: USART2 ; } pub mod TIM1 { pub type BRK = crate :: interrupt :: typelevel :: TIM1_BRK ; pub type UP = crate :: interrupt :: typelevel :: TIM1_UP ; pub type TRG = crate :: interrupt :: typelevel :: TIM1_TRG_COM ; pub type COM = crate :: interrupt :: typelevel :: TIM1_TRG_COM ; pub type CC = crate :: interrupt :: typelevel :: TIM1_CC ; } pub mod TIM2 { pub type UP = crate :: interrupt :: typelevel :: TIM2 ; pub type TRG = crate :: interrupt :: typelevel :: TIM2 ; pub type CC = crate :: interrupt :: typelevel :: TIM2 ; } pub mod TIM3 { pub type UP = crate :: interrupt :: typelevel :: TIM3 ; pub type TRG = crate :: interrupt :: typelevel :: TIM3 ; pub type CC = crate :: interrupt :: typelevel :: TIM3 ; } pub mod TIM4 { pub type UP = crate :: interrupt :: typelevel :: TIM4 ; pub type TRG = crate :: interrupt :: typelevel :: TIM4 ; pub type CC = crate :: interrupt :: typelevel :: TIM4 ; } pub mod ADC1 { pub type GLOBAL = crate :: interrupt :: typelevel :: ADC ; } pub mod ADC2 { pub type GLOBAL = crate :: interrupt :: typelevel :: ADC ; } pub mod SPI1 { pub type GLOBAL = crate :: interrupt :: typelevel :: SPI1 ; } pub mod I2C1 { pub type ER = crate :: interrupt :: typelevel :: I2C1_ER ; pub type EV = crate :: interrupt :: typelevel :: I2C1_EV ; } pub mod USBD { pub type HP = crate :: interrupt :: typelevel :: USB_HP_CAN1_TX ; pub type LP = crate :: interrupt :: typelevel :: USB_LP_CAN1_RX0 ; pub type WKUP = crate :: interrupt :: typelevel :: USB_WKUP ; } pub mod USBRAM { } pub mod CAN1 { pub type TX = crate :: interrupt :: typelevel :: USB_HP_CAN1_TX ; pub type RX0 = crate :: interrupt :: typelevel :: USB_LP_CAN1_RX0 ; pub type RX1 = crate :: interrupt :: typelevel :: CAN1_RX1 ; pub type SCE = crate :: interrupt :: typelevel :: CAN1_SCE ; } } dma_channel_impl ! (DMA1_CH1 , 0u8) ; dma_channel_impl ! (DMA1_CH2 , 1u8) ; dma_channel_impl ! (DMA1_CH3 , 2u8) ; dma_channel_impl ! (DMA1_CH4 , 3u8) ; dma_channel_impl ! (DMA1_CH5 , 4u8) ; dma_channel_impl ! (DMA1_CH6 , 5u8) ; dma_channel_impl ! (DMA1_CH7 , 6u8) ; dma_channel_impl ! (DMA1_CH8 , 7u8) ; # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL1 () { < crate :: peripherals :: DMA1_CH1 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] unsafe(# [qingke_rt :: interrupt]) unsafe fn DMA1_CHANNEL2 () { < crate :: peripherals :: DMA1_CH2 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL3 () { < crate :: peripherals :: DMA1_CH3 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL4 () { < crate :: peripherals :: DMA1_CH4 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL5 () { < crate :: peripherals :: DMA1_CH5 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL6 () { < crate :: peripherals :: DMA1_CH6 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL7 () { < crate :: peripherals :: DMA1_CH7 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL8 () { < crate :: peripherals :: DMA1_CH8 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } pub (crate) const DMA_CHANNELS : & [crate :: dma :: ChannelInfo] = & [crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 0usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 1usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 2usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 3usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 4usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 5usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 6usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 7usize , } ,] ;
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           +++++++                          +
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: unsafe attribute used without unsafe
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/ch32-hal-eda383fa759fc47b/out/_generated.rs:1:28470
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL3 () { < crate :: peripherals :: DMA1_CH3 as...
[INFO] [stdout]   |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^ usage of unsafe attribute
[INFO] [stdout]   |
[INFO] [stdout]   = note: this error originates in the attribute macro `qingke_rt::interrupt` (in Nightly builds, run with -Z macro-backtrace for more info)
[INFO] [stdout] help: wrap the attribute in `unsafe(...)`
[INFO] [stdout]   |
[INFO] [stdout] 1 | crate :: peripherals_definition ! (PFIC , SYSTICK , FLASH , MCO , RCC , DMA1 , PA0 , PA1 , PA2 , PA3 , PA4 , PA5 , PA6 , PA7 , PA8 , PA9 , PA10 , PA11 , PA12 , PA13 , PA14 , PA15 , PB0 , PB1 , PB2 , PB3 , PB4 , PB5 , PB6 , PB7 , PB8 , PB9 , PB10 , PB11 , PB12 , PB13 , PB14 , PB15 , PC0 , PC1 , PC2 , PC3 , PC4 , PC5 , PC6 , PC7 , PC8 , PC9 , PC10 , PC11 , PC12 , PC13 , PC14 , PC15 , PD0 , PD1 , PD2 , PD3 , PD4 , PD5 , PD6 , PD7 , PD8 , PD9 , PD10 , PD11 , PD12 , PD13 , PD14 , PD15 , AFIO , EXTEND , RTC , USART1 , USART2 , TIM1 , TIM2 , TIM3 , TIM4 , ADC1 , ADC2 , SPI1 , I2C1 , USBD , USBRAM , CAN1 , EXTI0 , EXTI1 , EXTI2 , EXTI3 , EXTI4 , EXTI5 , EXTI6 , EXTI7 , EXTI8 , EXTI9 , EXTI10 , EXTI11 , EXTI12 , EXTI13 , EXTI14 , EXTI15 , DMA1_CH1 , DMA1_CH2 , DMA1_CH3 , DMA1_CH4 , DMA1_CH5 , DMA1_CH6 , DMA1_CH7 , DMA1_CH8) ; crate :: peripherals_struct ! (PFIC , SYSTICK , FLASH , MCO , RCC , DMA1 , PA0 , PA1 , PA2 , PA3 , PA4 , PA5 , PA6 , PA7 , PA8 , PA9 , PA10 , PA11 , PA12 , PA13 , PA14 , PA15 , PB0 , PB1 , PB2 , PB3 , PB4 , PB5 , PB6 , PB7 , PB8 , PB9 , PB10 , PB11 , PB12 , PB13 , PB14 , PB15 , PC0 , PC1 , PC2 , PC3 , PC4 , PC5 , PC6 , PC7 , PC8 , PC9 , PC10 , PC11 , PC12 , PC13 , PC14 , PC15 , PD0 , PD1 , PD2 , PD3 , PD4 , PD5 , PD6 , PD7 , PD8 , PD9 , PD10 , PD11 , PD12 , PD13 , PD14 , PD15 , AFIO , EXTEND , RTC , USART1 , USART2 , TIM1 , TIM2 , TIM3 , TIM4 , ADC1 , ADC2 , SPI1 , I2C1 , USBD , USBRAM , CAN1 , EXTI0 , EXTI1 , EXTI2 , EXTI3 , EXTI4 , EXTI5 , EXTI6 , EXTI7 , EXTI8 , EXTI9 , EXTI10 , EXTI11 , EXTI12 , EXTI13 , EXTI14 , EXTI15 , DMA1_CH1 , DMA1_CH2 , DMA1_CH3 , DMA1_CH4 , DMA1_CH5 , DMA1_CH6 , DMA1_CH7 , DMA1_CH8) ; crate :: interrupt_mod ! (WWDG , PVD , TAMPER , RTC , FLASH , RCC , EXTI0 , EXTI1 , EXTI2 , EXTI3 , EXTI4 , DMA1_CHANNEL1 , DMA1_CHANNEL2 , DMA1_CHANNEL3 , DMA1_CHANNEL4 , DMA1_CHANNEL5 , DMA1_CHANNEL6 , DMA1_CHANNEL7 , ADC , USB_HP_CAN1_TX , USB_LP_CAN1_RX0 , CAN1_RX1 , CAN1_SCE , EXTI9_5 , TIM1_BRK , TIM1_UP , TIM1_TRG_COM , TIM1_CC , TIM2 , TIM3 , TIM4 , I2C1_EV , I2C1_ER , I2C2_EV , I2C2_ER , SPI1 , SPI2 , USART1 , USART2 , USART3 , EXTI15_10 , RTC_ALARM , USB_WKUP , USBHD , USBHD_WKUP , UART4 , DMA1_CHANNEL8 ,) ; impl crate :: peripheral :: SealedRccPeripheral for peripherals :: DMA1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . hclk } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . ahbpcenr () . modify (| w | w . set_dma1en (true)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . ahbpcenr () . modify (| w | w . set_dma1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: DMA1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: AFIO { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_afioen (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_afiorst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_afiorst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_afioen (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: AFIO { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: USART1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_usart1en (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_usart1rst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_usart1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_usart1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: USART1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: USART2 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_usart2en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_usart2rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_usart2rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_usart2en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: USART2 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: USART2 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_usart2_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: USART2 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: TIM1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2_tim } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_tim1en (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_tim1rst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_tim1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_tim1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: TIM1 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: TIM1 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_tim1_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: TIM1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: TIM2 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1_tim } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim2en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim2rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim2rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim2en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: TIM2 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: TIM2 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_tim2_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: TIM2 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: TIM3 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1_tim } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim3en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim3rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim3rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim3en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: TIM3 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: TIM3 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_tim3_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: TIM3 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: TIM4 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1_tim } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim4en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim4rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim4rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim4en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: TIM4 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: TIM4 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_tim4_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: TIM4 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: ADC1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_adc1en (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_adc1rst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_adc1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_adc1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: ADC1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: ADC2 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_adc2en (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_adc2rst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_adc2rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_adc2en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: ADC2 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: SPI1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_spi1en (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_spi1rst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_spi1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_spi1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: SPI1 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: SPI1 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_spi1_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: SPI1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: I2C1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_i2c1en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_i2c1rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_i2c1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_i2c1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: I2C1 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: I2C1 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_i2c1_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: I2C1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: USBD { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_usbden (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_usbdrst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_usbdrst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_usbden (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: USBD { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: CAN1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_can1en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_can1rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_can1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_can1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: CAN1 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: CAN1 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_can1_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: CAN1 { } pub unsafe fn init_dma () { crate :: pac :: RCC . ahbpcenr () . modify (| w | w . set_dma1en (true)) ; } pub unsafe fn init_gpio () { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_iopaen (true)) ; crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_iopben (true)) ; crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_iopcen (true)) ; crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_iopden (true)) ; } pin_trait_impl ! (crate :: usart :: CkPin , USART1 , PA8 , 0u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART1 , PA9 , 0u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART1 , PA10 , 0u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART1 , PA11 , 0u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART1 , PA12 , 0u8) ; pin_trait_impl ! (crate :: usart :: CkPin , USART1 , PA8 , 1u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART1 , PB6 , 1u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART1 , PB7 , 1u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART1 , PA11 , 1u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART1 , PA12 , 1u8) ; pin_trait_impl ! (crate :: usart :: CkPin , USART1 , PA10 , 2u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART1 , PB15 , 2u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART1 , PA8 , 2u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART1 , PA5 , 2u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART1 , PA9 , 2u8) ; pin_trait_impl ! (crate :: usart :: CkPin , USART1 , PA5 , 3u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART1 , PA6 , 3u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART1 , PA7 , 3u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART1 , PC4 , 3u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART1 , PC5 , 3u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART2 , PA0 , 0u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART2 , PA1 , 0u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART2 , PA2 , 0u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART2 , PA3 , 0u8) ; pin_trait_impl ! (crate :: usart :: CkPin , USART2 , PA4 , 0u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART2 , PD3 , 1u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART2 , PD4 , 1u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART2 , PD5 , 1u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART2 , PD6 , 1u8) ; pin_trait_impl ! (crate :: usart :: CkPin , USART2 , PD7 , 1u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM1 , PA12 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM1 , PA8 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM1 , PA9 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM1 , PA10 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM1 , PA11 , 0u8) ; pin_trait_impl ! (crate :: timer :: BreakInputPin , TIM1 , PB12 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel1ComplementaryPin , TIM1 , PB13 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel2ComplementaryPin , TIM1 , PB14 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel3ComplementaryPin , TIM1 , PB15 , 0u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM1 , PA12 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM1 , PA8 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM1 , PA9 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM1 , PA10 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM1 , PA11 , 1u8) ; pin_trait_impl ! (crate :: timer :: BreakInputPin , TIM1 , PA6 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel1ComplementaryPin , TIM1 , PA7 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel2ComplementaryPin , TIM1 , PB0 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel3ComplementaryPin , TIM1 , PB1 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM2 , PA0 , 0u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM2 , PA0 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM2 , PA1 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM2 , PA2 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM2 , PA3 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM2 , PA15 , 1u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM2 , PA15 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM2 , PB3 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM2 , PA2 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM2 , PA3 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM2 , PA0 , 2u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM2 , PA0 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM2 , PA1 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM2 , PB10 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM2 , PB11 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM2 , PA15 , 3u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM2 , PA15 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM2 , PB3 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM2 , PB10 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM2 , PB11 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM3 , PA6 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM3 , PA7 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM3 , PB0 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM3 , PB1 , 0u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM3 , PD2 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM3 , PB4 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM3 , PB5 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM3 , PB0 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM3 , PB1 , 2u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM3 , PD2 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM3 , PC6 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM3 , PC7 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM3 , PC8 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM3 , PC9 , 3u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM3 , PD2 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM4 , PB6 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM4 , PB7 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM4 , PB8 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM4 , PB9 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM4 , PD12 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM4 , PD13 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM4 , PD14 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM4 , PD15 , 1u8) ; impl_adc_pin ! (ADC1 , PA0 , 0u8) ; impl_adc_pin ! (ADC1 , PA1 , 1u8) ; impl_adc_pin ! (ADC1 , PA2 , 2u8) ; impl_adc_pin ! (ADC1 , PA3 , 3u8) ; impl_adc_pin ! (ADC1 , PA4 , 4u8) ; impl_adc_pin ! (ADC1 , PA5 , 5u8) ; impl_adc_pin ! (ADC1 , PA6 , 6u8) ; impl_adc_pin ! (ADC1 , PA7 , 7u8) ; impl_adc_pin ! (ADC1 , PB0 , 8u8) ; impl_adc_pin ! (ADC1 , PB1 , 9u8) ; impl_adc_pin ! (ADC1 , PC0 , 10u8) ; impl_adc_pin ! (ADC1 , PC1 , 11u8) ; impl_adc_pin ! (ADC1 , PC2 , 12u8) ; impl_adc_pin ! (ADC1 , PC3 , 13u8) ; impl_adc_pin ! (ADC1 , PC4 , 14u8) ; impl_adc_pin ! (ADC1 , PC5 , 15u8) ; impl_adc_pin ! (ADC2 , PA0 , 0u8) ; impl_adc_pin ! (ADC2 , PA1 , 1u8) ; impl_adc_pin ! (ADC2 , PA2 , 2u8) ; impl_adc_pin ! (ADC2 , PA3 , 3u8) ; impl_adc_pin ! (ADC2 , PA4 , 4u8) ; impl_adc_pin ! (ADC2 , PA5 , 5u8) ; impl_adc_pin ! (ADC2 , PA6 , 6u8) ; impl_adc_pin ! (ADC2 , PA7 , 7u8) ; impl_adc_pin ! (ADC2 , PB0 , 8u8) ; impl_adc_pin ! (ADC2 , PB1 , 9u8) ; impl_adc_pin ! (ADC2 , PC0 , 10u8) ; impl_adc_pin ! (ADC2 , PC1 , 11u8) ; impl_adc_pin ! (ADC2 , PC2 , 12u8) ; impl_adc_pin ! (ADC2 , PC3 , 13u8) ; impl_adc_pin ! (ADC2 , PC4 , 14u8) ; impl_adc_pin ! (ADC2 , PC5 , 15u8) ; pin_trait_impl ! (crate :: spi :: CsPin , SPI1 , PA4 , 0u8) ; pin_trait_impl ! (crate :: spi :: SckPin , SPI1 , PA5 , 0u8) ; pin_trait_impl ! (crate :: spi :: MisoPin , SPI1 , PA6 , 0u8) ; pin_trait_impl ! (crate :: spi :: MosiPin , SPI1 , PA7 , 0u8) ; pin_trait_impl ! (crate :: spi :: CsPin , SPI1 , PA15 , 1u8) ; pin_trait_impl ! (crate :: spi :: SckPin , SPI1 , PB3 , 1u8) ; pin_trait_impl ! (crate :: spi :: MisoPin , SPI1 , PB4 , 1u8) ; pin_trait_impl ! (crate :: spi :: MosiPin , SPI1 , PB5 , 1u8) ; pin_trait_impl ! (crate :: i2c :: SclPin , I2C1 , PB6 , 0u8) ; pin_trait_impl ! (crate :: i2c :: SdaPin , I2C1 , PB7 , 0u8) ; pin_trait_impl ! (crate :: i2c :: SclPin , I2C1 , PB8 , 1u8) ; pin_trait_impl ! (crate :: i2c :: SdaPin , I2C1 , PB9 , 1u8) ; pin_trait_impl ! (crate :: usbd :: DmPin , USBD , PA11 , 0u8) ; pin_trait_impl ! (crate :: usbd :: DpPin , USBD , PA12 , 0u8) ; dma_trait_impl ! (crate :: usart :: RxDma , USART1 , { channel : DMA1_CH5 } , ()) ; dma_trait_impl ! (crate :: usart :: TxDma , USART1 , { channel : DMA1_CH4 } , ()) ; dma_trait_impl ! (crate :: usart :: RxDma , USART2 , { channel : DMA1_CH6 } , ()) ; dma_trait_impl ! (crate :: usart :: TxDma , USART2 , { channel : DMA1_CH7 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch3Dma , TIM1 , { channel : DMA1_CH6 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch2Dma , TIM1 , { channel : DMA1_CH3 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch4Dma , TIM1 , { channel : DMA1_CH4 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch1Dma , TIM1 , { channel : DMA1_CH2 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch4Dma , TIM2 , { channel : DMA1_CH7 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch1Dma , TIM2 , { channel : DMA1_CH5 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch2Dma , TIM2 , { channel : DMA1_CH7 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch3Dma , TIM2 , { channel : DMA1_CH1 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch1Dma , TIM3 , { channel : DMA1_CH6 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch3Dma , TIM3 , { channel : DMA1_CH2 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch4Dma , TIM3 , { channel : DMA1_CH3 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch1Dma , TIM4 , { channel : DMA1_CH1 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch3Dma , TIM4 , { channel : DMA1_CH5 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch2Dma , TIM4 , { channel : DMA1_CH4 } , ()) ; dma_trait_impl ! (crate :: spi :: TxDma , SPI1 , { channel : DMA1_CH3 } , ()) ; dma_trait_impl ! (crate :: spi :: RxDma , SPI1 , { channel : DMA1_CH2 } , ()) ; dma_trait_impl ! (crate :: i2c :: RxDma , I2C1 , { channel : DMA1_CH7 } , ()) ; dma_trait_impl ! (crate :: i2c :: TxDma , I2C1 , { channel : DMA1_CH6 } , ()) ; # [allow (non_camel_case_types)] pub mod peripheral_interrupts { pub mod PFIC { } pub mod SYSTICK { } pub mod FLASH { } pub mod EXTI { pub type EXTI0 = crate :: interrupt :: typelevel :: EXTI0 ; pub type EXTI1 = crate :: interrupt :: typelevel :: EXTI1 ; pub type EXTI2 = crate :: interrupt :: typelevel :: EXTI2 ; pub type EXTI3 = crate :: interrupt :: typelevel :: EXTI3 ; pub type EXTI4 = crate :: interrupt :: typelevel :: EXTI4 ; pub type EXTI5 = crate :: interrupt :: typelevel :: EXTI9_5 ; pub type EXTI10 = crate :: interrupt :: typelevel :: EXTI15_10 ; } pub mod RCC { } pub mod DMA1 { pub type CH1 = crate :: interrupt :: typelevel :: DMA1_CHANNEL1 ; pub type CH2 = crate :: interrupt :: typelevel :: DMA1_CHANNEL2 ; pub type CH3 = crate :: interrupt :: typelevel :: DMA1_CHANNEL3 ; pub type CH4 = crate :: interrupt :: typelevel :: DMA1_CHANNEL4 ; pub type CH5 = crate :: interrupt :: typelevel :: DMA1_CHANNEL5 ; pub type CH6 = crate :: interrupt :: typelevel :: DMA1_CHANNEL6 ; pub type CH7 = crate :: interrupt :: typelevel :: DMA1_CHANNEL7 ; pub type CH8 = crate :: interrupt :: typelevel :: DMA1_CHANNEL8 ; } pub mod GPIOA { } pub mod GPIOB { } pub mod GPIOC { } pub mod GPIOD { } pub mod AFIO { } pub mod EXTEND { } pub mod RTC { } pub mod USART1 { pub type GLOBAL = crate :: interrupt :: typelevel :: USART1 ; } pub mod USART2 { pub type GLOBAL = crate :: interrupt :: typelevel :: USART2 ; } pub mod TIM1 { pub type BRK = crate :: interrupt :: typelevel :: TIM1_BRK ; pub type UP = crate :: interrupt :: typelevel :: TIM1_UP ; pub type TRG = crate :: interrupt :: typelevel :: TIM1_TRG_COM ; pub type COM = crate :: interrupt :: typelevel :: TIM1_TRG_COM ; pub type CC = crate :: interrupt :: typelevel :: TIM1_CC ; } pub mod TIM2 { pub type UP = crate :: interrupt :: typelevel :: TIM2 ; pub type TRG = crate :: interrupt :: typelevel :: TIM2 ; pub type CC = crate :: interrupt :: typelevel :: TIM2 ; } pub mod TIM3 { pub type UP = crate :: interrupt :: typelevel :: TIM3 ; pub type TRG = crate :: interrupt :: typelevel :: TIM3 ; pub type CC = crate :: interrupt :: typelevel :: TIM3 ; } pub mod TIM4 { pub type UP = crate :: interrupt :: typelevel :: TIM4 ; pub type TRG = crate :: interrupt :: typelevel :: TIM4 ; pub type CC = crate :: interrupt :: typelevel :: TIM4 ; } pub mod ADC1 { pub type GLOBAL = crate :: interrupt :: typelevel :: ADC ; } pub mod ADC2 { pub type GLOBAL = crate :: interrupt :: typelevel :: ADC ; } pub mod SPI1 { pub type GLOBAL = crate :: interrupt :: typelevel :: SPI1 ; } pub mod I2C1 { pub type ER = crate :: interrupt :: typelevel :: I2C1_ER ; pub type EV = crate :: interrupt :: typelevel :: I2C1_EV ; } pub mod USBD { pub type HP = crate :: interrupt :: typelevel :: USB_HP_CAN1_TX ; pub type LP = crate :: interrupt :: typelevel :: USB_LP_CAN1_RX0 ; pub type WKUP = crate :: interrupt :: typelevel :: USB_WKUP ; } pub mod USBRAM { } pub mod CAN1 { pub type TX = crate :: interrupt :: typelevel :: USB_HP_CAN1_TX ; pub type RX0 = crate :: interrupt :: typelevel :: USB_LP_CAN1_RX0 ; pub type RX1 = crate :: interrupt :: typelevel :: CAN1_RX1 ; pub type SCE = crate :: interrupt :: typelevel :: CAN1_SCE ; } } dma_channel_impl ! (DMA1_CH1 , 0u8) ; dma_channel_impl ! (DMA1_CH2 , 1u8) ; dma_channel_impl ! (DMA1_CH3 , 2u8) ; dma_channel_impl ! (DMA1_CH4 , 3u8) ; dma_channel_impl ! (DMA1_CH5 , 4u8) ; dma_channel_impl ! (DMA1_CH6 , 5u8) ; dma_channel_impl ! (DMA1_CH7 , 6u8) ; dma_channel_impl ! (DMA1_CH8 , 7u8) ; # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL1 () { < crate :: peripherals :: DMA1_CH1 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL2 () { < crate :: peripherals :: DMA1_CH2 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] unsafe(# [qingke_rt :: interrupt]) unsafe fn DMA1_CHANNEL3 () { < crate :: peripherals :: DMA1_CH3 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL4 () { < crate :: peripherals :: DMA1_CH4 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL5 () { < crate :: peripherals :: DMA1_CH5 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL6 () { < crate :: peripherals :: DMA1_CH6 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL7 () { < crate :: peripherals :: DMA1_CH7 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL8 () { < crate :: peripherals :: DMA1_CH8 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } pub (crate) const DMA_CHANNELS : & [crate :: dma :: ChannelInfo] = & [crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 0usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 1usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 2usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 3usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 4usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 5usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 6usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 7usize , } ,] ;
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +++++++                          +
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: unsafe attribute used without unsafe
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/ch32-hal-eda383fa759fc47b/out/_generated.rs:1:28641
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL4 () { < crate :: peripherals :: DMA1_CH4 as...
[INFO] [stdout]   |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^ usage of unsafe attribute
[INFO] [stdout]   |
[INFO] [stdout]   = note: this error originates in the attribute macro `qingke_rt::interrupt` (in Nightly builds, run with -Z macro-backtrace for more info)
[INFO] [stdout] help: wrap the attribute in `unsafe(...)`
[INFO] [stdout]   |
[INFO] [stdout] 1 | crate :: peripherals_definition ! (PFIC , SYSTICK , FLASH , MCO , RCC , DMA1 , PA0 , PA1 , PA2 , PA3 , PA4 , PA5 , PA6 , PA7 , PA8 , PA9 , PA10 , PA11 , PA12 , PA13 , PA14 , PA15 , PB0 , PB1 , PB2 , PB3 , PB4 , PB5 , PB6 , PB7 , PB8 , PB9 , PB10 , PB11 , PB12 , PB13 , PB14 , PB15 , PC0 , PC1 , PC2 , PC3 , PC4 , PC5 , PC6 , PC7 , PC8 , PC9 , PC10 , PC11 , PC12 , PC13 , PC14 , PC15 , PD0 , PD1 , PD2 , PD3 , PD4 , PD5 , PD6 , PD7 , PD8 , PD9 , PD10 , PD11 , PD12 , PD13 , PD14 , PD15 , AFIO , EXTEND , RTC , USART1 , USART2 , TIM1 , TIM2 , TIM3 , TIM4 , ADC1 , ADC2 , SPI1 , I2C1 , USBD , USBRAM , CAN1 , EXTI0 , EXTI1 , EXTI2 , EXTI3 , EXTI4 , EXTI5 , EXTI6 , EXTI7 , EXTI8 , EXTI9 , EXTI10 , EXTI11 , EXTI12 , EXTI13 , EXTI14 , EXTI15 , DMA1_CH1 , DMA1_CH2 , DMA1_CH3 , DMA1_CH4 , DMA1_CH5 , DMA1_CH6 , DMA1_CH7 , DMA1_CH8) ; crate :: peripherals_struct ! (PFIC , SYSTICK , FLASH , MCO , RCC , DMA1 , PA0 , PA1 , PA2 , PA3 , PA4 , PA5 , PA6 , PA7 , PA8 , PA9 , PA10 , PA11 , PA12 , PA13 , PA14 , PA15 , PB0 , PB1 , PB2 , PB3 , PB4 , PB5 , PB6 , PB7 , PB8 , PB9 , PB10 , PB11 , PB12 , PB13 , PB14 , PB15 , PC0 , PC1 , PC2 , PC3 , PC4 , PC5 , PC6 , PC7 , PC8 , PC9 , PC10 , PC11 , PC12 , PC13 , PC14 , PC15 , PD0 , PD1 , PD2 , PD3 , PD4 , PD5 , PD6 , PD7 , PD8 , PD9 , PD10 , PD11 , PD12 , PD13 , PD14 , PD15 , AFIO , EXTEND , RTC , USART1 , USART2 , TIM1 , TIM2 , TIM3 , TIM4 , ADC1 , ADC2 , SPI1 , I2C1 , USBD , USBRAM , CAN1 , EXTI0 , EXTI1 , EXTI2 , EXTI3 , EXTI4 , EXTI5 , EXTI6 , EXTI7 , EXTI8 , EXTI9 , EXTI10 , EXTI11 , EXTI12 , EXTI13 , EXTI14 , EXTI15 , DMA1_CH1 , DMA1_CH2 , DMA1_CH3 , DMA1_CH4 , DMA1_CH5 , DMA1_CH6 , DMA1_CH7 , DMA1_CH8) ; crate :: interrupt_mod ! (WWDG , PVD , TAMPER , RTC , FLASH , RCC , EXTI0 , EXTI1 , EXTI2 , EXTI3 , EXTI4 , DMA1_CHANNEL1 , DMA1_CHANNEL2 , DMA1_CHANNEL3 , DMA1_CHANNEL4 , DMA1_CHANNEL5 , DMA1_CHANNEL6 , DMA1_CHANNEL7 , ADC , USB_HP_CAN1_TX , USB_LP_CAN1_RX0 , CAN1_RX1 , CAN1_SCE , EXTI9_5 , TIM1_BRK , TIM1_UP , TIM1_TRG_COM , TIM1_CC , TIM2 , TIM3 , TIM4 , I2C1_EV , I2C1_ER , I2C2_EV , I2C2_ER , SPI1 , SPI2 , USART1 , USART2 , USART3 , EXTI15_10 , RTC_ALARM , USB_WKUP , USBHD , USBHD_WKUP , UART4 , DMA1_CHANNEL8 ,) ; impl crate :: peripheral :: SealedRccPeripheral for peripherals :: DMA1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . hclk } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . ahbpcenr () . modify (| w | w . set_dma1en (true)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . ahbpcenr () . modify (| w | w . set_dma1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: DMA1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: AFIO { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_afioen (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_afiorst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_afiorst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_afioen (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: AFIO { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: USART1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_usart1en (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_usart1rst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_usart1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_usart1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: USART1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: USART2 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_usart2en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_usart2rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_usart2rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_usart2en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: USART2 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: USART2 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_usart2_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: USART2 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: TIM1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2_tim } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_tim1en (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_tim1rst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_tim1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_tim1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: TIM1 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: TIM1 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_tim1_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: TIM1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: TIM2 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1_tim } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim2en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim2rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim2rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim2en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: TIM2 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: TIM2 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_tim2_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: TIM2 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: TIM3 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1_tim } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim3en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim3rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim3rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim3en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: TIM3 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: TIM3 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_tim3_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: TIM3 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: TIM4 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1_tim } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim4en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim4rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim4rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim4en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: TIM4 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: TIM4 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_tim4_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: TIM4 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: ADC1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_adc1en (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_adc1rst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_adc1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_adc1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: ADC1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: ADC2 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_adc2en (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_adc2rst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_adc2rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_adc2en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: ADC2 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: SPI1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_spi1en (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_spi1rst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_spi1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_spi1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: SPI1 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: SPI1 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_spi1_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: SPI1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: I2C1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_i2c1en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_i2c1rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_i2c1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_i2c1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: I2C1 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: I2C1 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_i2c1_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: I2C1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: USBD { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_usbden (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_usbdrst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_usbdrst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_usbden (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: USBD { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: CAN1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_can1en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_can1rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_can1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_can1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: CAN1 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: CAN1 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_can1_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: CAN1 { } pub unsafe fn init_dma () { crate :: pac :: RCC . ahbpcenr () . modify (| w | w . set_dma1en (true)) ; } pub unsafe fn init_gpio () { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_iopaen (true)) ; crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_iopben (true)) ; crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_iopcen (true)) ; crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_iopden (true)) ; } pin_trait_impl ! (crate :: usart :: CkPin , USART1 , PA8 , 0u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART1 , PA9 , 0u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART1 , PA10 , 0u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART1 , PA11 , 0u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART1 , PA12 , 0u8) ; pin_trait_impl ! (crate :: usart :: CkPin , USART1 , PA8 , 1u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART1 , PB6 , 1u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART1 , PB7 , 1u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART1 , PA11 , 1u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART1 , PA12 , 1u8) ; pin_trait_impl ! (crate :: usart :: CkPin , USART1 , PA10 , 2u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART1 , PB15 , 2u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART1 , PA8 , 2u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART1 , PA5 , 2u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART1 , PA9 , 2u8) ; pin_trait_impl ! (crate :: usart :: CkPin , USART1 , PA5 , 3u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART1 , PA6 , 3u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART1 , PA7 , 3u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART1 , PC4 , 3u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART1 , PC5 , 3u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART2 , PA0 , 0u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART2 , PA1 , 0u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART2 , PA2 , 0u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART2 , PA3 , 0u8) ; pin_trait_impl ! (crate :: usart :: CkPin , USART2 , PA4 , 0u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART2 , PD3 , 1u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART2 , PD4 , 1u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART2 , PD5 , 1u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART2 , PD6 , 1u8) ; pin_trait_impl ! (crate :: usart :: CkPin , USART2 , PD7 , 1u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM1 , PA12 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM1 , PA8 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM1 , PA9 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM1 , PA10 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM1 , PA11 , 0u8) ; pin_trait_impl ! (crate :: timer :: BreakInputPin , TIM1 , PB12 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel1ComplementaryPin , TIM1 , PB13 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel2ComplementaryPin , TIM1 , PB14 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel3ComplementaryPin , TIM1 , PB15 , 0u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM1 , PA12 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM1 , PA8 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM1 , PA9 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM1 , PA10 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM1 , PA11 , 1u8) ; pin_trait_impl ! (crate :: timer :: BreakInputPin , TIM1 , PA6 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel1ComplementaryPin , TIM1 , PA7 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel2ComplementaryPin , TIM1 , PB0 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel3ComplementaryPin , TIM1 , PB1 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM2 , PA0 , 0u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM2 , PA0 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM2 , PA1 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM2 , PA2 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM2 , PA3 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM2 , PA15 , 1u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM2 , PA15 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM2 , PB3 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM2 , PA2 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM2 , PA3 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM2 , PA0 , 2u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM2 , PA0 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM2 , PA1 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM2 , PB10 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM2 , PB11 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM2 , PA15 , 3u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM2 , PA15 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM2 , PB3 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM2 , PB10 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM2 , PB11 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM3 , PA6 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM3 , PA7 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM3 , PB0 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM3 , PB1 , 0u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM3 , PD2 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM3 , PB4 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM3 , PB5 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM3 , PB0 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM3 , PB1 , 2u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM3 , PD2 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM3 , PC6 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM3 , PC7 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM3 , PC8 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM3 , PC9 , 3u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM3 , PD2 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM4 , PB6 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM4 , PB7 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM4 , PB8 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM4 , PB9 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM4 , PD12 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM4 , PD13 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM4 , PD14 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM4 , PD15 , 1u8) ; impl_adc_pin ! (ADC1 , PA0 , 0u8) ; impl_adc_pin ! (ADC1 , PA1 , 1u8) ; impl_adc_pin ! (ADC1 , PA2 , 2u8) ; impl_adc_pin ! (ADC1 , PA3 , 3u8) ; impl_adc_pin ! (ADC1 , PA4 , 4u8) ; impl_adc_pin ! (ADC1 , PA5 , 5u8) ; impl_adc_pin ! (ADC1 , PA6 , 6u8) ; impl_adc_pin ! (ADC1 , PA7 , 7u8) ; impl_adc_pin ! (ADC1 , PB0 , 8u8) ; impl_adc_pin ! (ADC1 , PB1 , 9u8) ; impl_adc_pin ! (ADC1 , PC0 , 10u8) ; impl_adc_pin ! (ADC1 , PC1 , 11u8) ; impl_adc_pin ! (ADC1 , PC2 , 12u8) ; impl_adc_pin ! (ADC1 , PC3 , 13u8) ; impl_adc_pin ! (ADC1 , PC4 , 14u8) ; impl_adc_pin ! (ADC1 , PC5 , 15u8) ; impl_adc_pin ! (ADC2 , PA0 , 0u8) ; impl_adc_pin ! (ADC2 , PA1 , 1u8) ; impl_adc_pin ! (ADC2 , PA2 , 2u8) ; impl_adc_pin ! (ADC2 , PA3 , 3u8) ; impl_adc_pin ! (ADC2 , PA4 , 4u8) ; impl_adc_pin ! (ADC2 , PA5 , 5u8) ; impl_adc_pin ! (ADC2 , PA6 , 6u8) ; impl_adc_pin ! (ADC2 , PA7 , 7u8) ; impl_adc_pin ! (ADC2 , PB0 , 8u8) ; impl_adc_pin ! (ADC2 , PB1 , 9u8) ; impl_adc_pin ! (ADC2 , PC0 , 10u8) ; impl_adc_pin ! (ADC2 , PC1 , 11u8) ; impl_adc_pin ! (ADC2 , PC2 , 12u8) ; impl_adc_pin ! (ADC2 , PC3 , 13u8) ; impl_adc_pin ! (ADC2 , PC4 , 14u8) ; impl_adc_pin ! (ADC2 , PC5 , 15u8) ; pin_trait_impl ! (crate :: spi :: CsPin , SPI1 , PA4 , 0u8) ; pin_trait_impl ! (crate :: spi :: SckPin , SPI1 , PA5 , 0u8) ; pin_trait_impl ! (crate :: spi :: MisoPin , SPI1 , PA6 , 0u8) ; pin_trait_impl ! (crate :: spi :: MosiPin , SPI1 , PA7 , 0u8) ; pin_trait_impl ! (crate :: spi :: CsPin , SPI1 , PA15 , 1u8) ; pin_trait_impl ! (crate :: spi :: SckPin , SPI1 , PB3 , 1u8) ; pin_trait_impl ! (crate :: spi :: MisoPin , SPI1 , PB4 , 1u8) ; pin_trait_impl ! (crate :: spi :: MosiPin , SPI1 , PB5 , 1u8) ; pin_trait_impl ! (crate :: i2c :: SclPin , I2C1 , PB6 , 0u8) ; pin_trait_impl ! (crate :: i2c :: SdaPin , I2C1 , PB7 , 0u8) ; pin_trait_impl ! (crate :: i2c :: SclPin , I2C1 , PB8 , 1u8) ; pin_trait_impl ! (crate :: i2c :: SdaPin , I2C1 , PB9 , 1u8) ; pin_trait_impl ! (crate :: usbd :: DmPin , USBD , PA11 , 0u8) ; pin_trait_impl ! (crate :: usbd :: DpPin , USBD , PA12 , 0u8) ; dma_trait_impl ! (crate :: usart :: RxDma , USART1 , { channel : DMA1_CH5 } , ()) ; dma_trait_impl ! (crate :: usart :: TxDma , USART1 , { channel : DMA1_CH4 } , ()) ; dma_trait_impl ! (crate :: usart :: RxDma , USART2 , { channel : DMA1_CH6 } , ()) ; dma_trait_impl ! (crate :: usart :: TxDma , USART2 , { channel : DMA1_CH7 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch3Dma , TIM1 , { channel : DMA1_CH6 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch2Dma , TIM1 , { channel : DMA1_CH3 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch4Dma , TIM1 , { channel : DMA1_CH4 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch1Dma , TIM1 , { channel : DMA1_CH2 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch4Dma , TIM2 , { channel : DMA1_CH7 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch1Dma , TIM2 , { channel : DMA1_CH5 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch2Dma , TIM2 , { channel : DMA1_CH7 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch3Dma , TIM2 , { channel : DMA1_CH1 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch1Dma , TIM3 , { channel : DMA1_CH6 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch3Dma , TIM3 , { channel : DMA1_CH2 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch4Dma , TIM3 , { channel : DMA1_CH3 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch1Dma , TIM4 , { channel : DMA1_CH1 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch3Dma , TIM4 , { channel : DMA1_CH5 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch2Dma , TIM4 , { channel : DMA1_CH4 } , ()) ; dma_trait_impl ! (crate :: spi :: TxDma , SPI1 , { channel : DMA1_CH3 } , ()) ; dma_trait_impl ! (crate :: spi :: RxDma , SPI1 , { channel : DMA1_CH2 } , ()) ; dma_trait_impl ! (crate :: i2c :: RxDma , I2C1 , { channel : DMA1_CH7 } , ()) ; dma_trait_impl ! (crate :: i2c :: TxDma , I2C1 , { channel : DMA1_CH6 } , ()) ; # [allow (non_camel_case_types)] pub mod peripheral_interrupts { pub mod PFIC { } pub mod SYSTICK { } pub mod FLASH { } pub mod EXTI { pub type EXTI0 = crate :: interrupt :: typelevel :: EXTI0 ; pub type EXTI1 = crate :: interrupt :: typelevel :: EXTI1 ; pub type EXTI2 = crate :: interrupt :: typelevel :: EXTI2 ; pub type EXTI3 = crate :: interrupt :: typelevel :: EXTI3 ; pub type EXTI4 = crate :: interrupt :: typelevel :: EXTI4 ; pub type EXTI5 = crate :: interrupt :: typelevel :: EXTI9_5 ; pub type EXTI10 = crate :: interrupt :: typelevel :: EXTI15_10 ; } pub mod RCC { } pub mod DMA1 { pub type CH1 = crate :: interrupt :: typelevel :: DMA1_CHANNEL1 ; pub type CH2 = crate :: interrupt :: typelevel :: DMA1_CHANNEL2 ; pub type CH3 = crate :: interrupt :: typelevel :: DMA1_CHANNEL3 ; pub type CH4 = crate :: interrupt :: typelevel :: DMA1_CHANNEL4 ; pub type CH5 = crate :: interrupt :: typelevel :: DMA1_CHANNEL5 ; pub type CH6 = crate :: interrupt :: typelevel :: DMA1_CHANNEL6 ; pub type CH7 = crate :: interrupt :: typelevel :: DMA1_CHANNEL7 ; pub type CH8 = crate :: interrupt :: typelevel :: DMA1_CHANNEL8 ; } pub mod GPIOA { } pub mod GPIOB { } pub mod GPIOC { } pub mod GPIOD { } pub mod AFIO { } pub mod EXTEND { } pub mod RTC { } pub mod USART1 { pub type GLOBAL = crate :: interrupt :: typelevel :: USART1 ; } pub mod USART2 { pub type GLOBAL = crate :: interrupt :: typelevel :: USART2 ; } pub mod TIM1 { pub type BRK = crate :: interrupt :: typelevel :: TIM1_BRK ; pub type UP = crate :: interrupt :: typelevel :: TIM1_UP ; pub type TRG = crate :: interrupt :: typelevel :: TIM1_TRG_COM ; pub type COM = crate :: interrupt :: typelevel :: TIM1_TRG_COM ; pub type CC = crate :: interrupt :: typelevel :: TIM1_CC ; } pub mod TIM2 { pub type UP = crate :: interrupt :: typelevel :: TIM2 ; pub type TRG = crate :: interrupt :: typelevel :: TIM2 ; pub type CC = crate :: interrupt :: typelevel :: TIM2 ; } pub mod TIM3 { pub type UP = crate :: interrupt :: typelevel :: TIM3 ; pub type TRG = crate :: interrupt :: typelevel :: TIM3 ; pub type CC = crate :: interrupt :: typelevel :: TIM3 ; } pub mod TIM4 { pub type UP = crate :: interrupt :: typelevel :: TIM4 ; pub type TRG = crate :: interrupt :: typelevel :: TIM4 ; pub type CC = crate :: interrupt :: typelevel :: TIM4 ; } pub mod ADC1 { pub type GLOBAL = crate :: interrupt :: typelevel :: ADC ; } pub mod ADC2 { pub type GLOBAL = crate :: interrupt :: typelevel :: ADC ; } pub mod SPI1 { pub type GLOBAL = crate :: interrupt :: typelevel :: SPI1 ; } pub mod I2C1 { pub type ER = crate :: interrupt :: typelevel :: I2C1_ER ; pub type EV = crate :: interrupt :: typelevel :: I2C1_EV ; } pub mod USBD { pub type HP = crate :: interrupt :: typelevel :: USB_HP_CAN1_TX ; pub type LP = crate :: interrupt :: typelevel :: USB_LP_CAN1_RX0 ; pub type WKUP = crate :: interrupt :: typelevel :: USB_WKUP ; } pub mod USBRAM { } pub mod CAN1 { pub type TX = crate :: interrupt :: typelevel :: USB_HP_CAN1_TX ; pub type RX0 = crate :: interrupt :: typelevel :: USB_LP_CAN1_RX0 ; pub type RX1 = crate :: interrupt :: typelevel :: CAN1_RX1 ; pub type SCE = crate :: interrupt :: typelevel :: CAN1_SCE ; } } dma_channel_impl ! (DMA1_CH1 , 0u8) ; dma_channel_impl ! (DMA1_CH2 , 1u8) ; dma_channel_impl ! (DMA1_CH3 , 2u8) ; dma_channel_impl ! (DMA1_CH4 , 3u8) ; dma_channel_impl ! (DMA1_CH5 , 4u8) ; dma_channel_impl ! (DMA1_CH6 , 5u8) ; dma_channel_impl ! (DMA1_CH7 , 6u8) ; dma_channel_impl ! (DMA1_CH8 , 7u8) ; # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL1 () { < crate :: peripherals :: DMA1_CH1 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL2 () { < crate :: peripherals :: DMA1_CH2 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL3 () { < crate :: peripherals :: DMA1_CH3 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] unsafe(# [qingke_rt :: interrupt]) unsafe fn DMA1_CHANNEL4 () { < crate :: peripherals :: DMA1_CH4 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL5 () { < crate :: peripherals :: DMA1_CH5 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL6 () { < crate :: peripherals :: DMA1_CH6 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL7 () { < crate :: peripherals :: DMA1_CH7 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL8 () { < crate :: peripherals :: DMA1_CH8 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } pub (crate) const DMA_CHANNELS : & [crate :: dma :: ChannelInfo] = & [crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 0usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 1usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 2usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 3usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 4usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 5usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 6usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 7usize , } ,] ;
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 +++++++                          +
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: unsafe attribute used without unsafe
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/ch32-hal-eda383fa759fc47b/out/_generated.rs:1:28812
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL5 () { < crate :: peripherals :: DMA1_CH5 as...
[INFO] [stdout]   |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^ usage of unsafe attribute
[INFO] [stdout]   |
[INFO] [stdout]   = note: this error originates in the attribute macro `qingke_rt::interrupt` (in Nightly builds, run with -Z macro-backtrace for more info)
[INFO] [stdout] help: wrap the attribute in `unsafe(...)`
[INFO] [stdout]   |
[INFO] [stdout] 1 | crate :: peripherals_definition ! (PFIC , SYSTICK , FLASH , MCO , RCC , DMA1 , PA0 , PA1 , PA2 , PA3 , PA4 , PA5 , PA6 , PA7 , PA8 , PA9 , PA10 , PA11 , PA12 , PA13 , PA14 , PA15 , PB0 , PB1 , PB2 , PB3 , PB4 , PB5 , PB6 , PB7 , PB8 , PB9 , PB10 , PB11 , PB12 , PB13 , PB14 , PB15 , PC0 , PC1 , PC2 , PC3 , PC4 , PC5 , PC6 , PC7 , PC8 , PC9 , PC10 , PC11 , PC12 , PC13 , PC14 , PC15 , PD0 , PD1 , PD2 , PD3 , PD4 , PD5 , PD6 , PD7 , PD8 , PD9 , PD10 , PD11 , PD12 , PD13 , PD14 , PD15 , AFIO , EXTEND , RTC , USART1 , USART2 , TIM1 , TIM2 , TIM3 , TIM4 , ADC1 , ADC2 , SPI1 , I2C1 , USBD , USBRAM , CAN1 , EXTI0 , EXTI1 , EXTI2 , EXTI3 , EXTI4 , EXTI5 , EXTI6 , EXTI7 , EXTI8 , EXTI9 , EXTI10 , EXTI11 , EXTI12 , EXTI13 , EXTI14 , EXTI15 , DMA1_CH1 , DMA1_CH2 , DMA1_CH3 , DMA1_CH4 , DMA1_CH5 , DMA1_CH6 , DMA1_CH7 , DMA1_CH8) ; crate :: peripherals_struct ! (PFIC , SYSTICK , FLASH , MCO , RCC , DMA1 , PA0 , PA1 , PA2 , PA3 , PA4 , PA5 , PA6 , PA7 , PA8 , PA9 , PA10 , PA11 , PA12 , PA13 , PA14 , PA15 , PB0 , PB1 , PB2 , PB3 , PB4 , PB5 , PB6 , PB7 , PB8 , PB9 , PB10 , PB11 , PB12 , PB13 , PB14 , PB15 , PC0 , PC1 , PC2 , PC3 , PC4 , PC5 , PC6 , PC7 , PC8 , PC9 , PC10 , PC11 , PC12 , PC13 , PC14 , PC15 , PD0 , PD1 , PD2 , PD3 , PD4 , PD5 , PD6 , PD7 , PD8 , PD9 , PD10 , PD11 , PD12 , PD13 , PD14 , PD15 , AFIO , EXTEND , RTC , USART1 , USART2 , TIM1 , TIM2 , TIM3 , TIM4 , ADC1 , ADC2 , SPI1 , I2C1 , USBD , USBRAM , CAN1 , EXTI0 , EXTI1 , EXTI2 , EXTI3 , EXTI4 , EXTI5 , EXTI6 , EXTI7 , EXTI8 , EXTI9 , EXTI10 , EXTI11 , EXTI12 , EXTI13 , EXTI14 , EXTI15 , DMA1_CH1 , DMA1_CH2 , DMA1_CH3 , DMA1_CH4 , DMA1_CH5 , DMA1_CH6 , DMA1_CH7 , DMA1_CH8) ; crate :: interrupt_mod ! (WWDG , PVD , TAMPER , RTC , FLASH , RCC , EXTI0 , EXTI1 , EXTI2 , EXTI3 , EXTI4 , DMA1_CHANNEL1 , DMA1_CHANNEL2 , DMA1_CHANNEL3 , DMA1_CHANNEL4 , DMA1_CHANNEL5 , DMA1_CHANNEL6 , DMA1_CHANNEL7 , ADC , USB_HP_CAN1_TX , USB_LP_CAN1_RX0 , CAN1_RX1 , CAN1_SCE , EXTI9_5 , TIM1_BRK , TIM1_UP , TIM1_TRG_COM , TIM1_CC , TIM2 , TIM3 , TIM4 , I2C1_EV , I2C1_ER , I2C2_EV , I2C2_ER , SPI1 , SPI2 , USART1 , USART2 , USART3 , EXTI15_10 , RTC_ALARM , USB_WKUP , USBHD , USBHD_WKUP , UART4 , DMA1_CHANNEL8 ,) ; impl crate :: peripheral :: SealedRccPeripheral for peripherals :: DMA1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . hclk } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . ahbpcenr () . modify (| w | w . set_dma1en (true)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . ahbpcenr () . modify (| w | w . set_dma1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: DMA1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: AFIO { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_afioen (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_afiorst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_afiorst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_afioen (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: AFIO { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: USART1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_usart1en (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_usart1rst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_usart1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_usart1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: USART1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: USART2 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_usart2en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_usart2rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_usart2rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_usart2en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: USART2 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: USART2 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_usart2_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: USART2 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: TIM1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2_tim } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_tim1en (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_tim1rst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_tim1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_tim1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: TIM1 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: TIM1 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_tim1_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: TIM1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: TIM2 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1_tim } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim2en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim2rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim2rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim2en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: TIM2 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: TIM2 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_tim2_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: TIM2 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: TIM3 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1_tim } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim3en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim3rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim3rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim3en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: TIM3 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: TIM3 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_tim3_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: TIM3 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: TIM4 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1_tim } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim4en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim4rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim4rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim4en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: TIM4 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: TIM4 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_tim4_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: TIM4 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: ADC1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_adc1en (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_adc1rst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_adc1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_adc1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: ADC1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: ADC2 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_adc2en (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_adc2rst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_adc2rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_adc2en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: ADC2 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: SPI1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_spi1en (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_spi1rst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_spi1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_spi1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: SPI1 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: SPI1 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_spi1_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: SPI1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: I2C1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_i2c1en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_i2c1rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_i2c1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_i2c1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: I2C1 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: I2C1 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_i2c1_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: I2C1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: USBD { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_usbden (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_usbdrst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_usbdrst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_usbden (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: USBD { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: CAN1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_can1en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_can1rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_can1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_can1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: CAN1 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: CAN1 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_can1_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: CAN1 { } pub unsafe fn init_dma () { crate :: pac :: RCC . ahbpcenr () . modify (| w | w . set_dma1en (true)) ; } pub unsafe fn init_gpio () { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_iopaen (true)) ; crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_iopben (true)) ; crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_iopcen (true)) ; crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_iopden (true)) ; } pin_trait_impl ! (crate :: usart :: CkPin , USART1 , PA8 , 0u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART1 , PA9 , 0u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART1 , PA10 , 0u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART1 , PA11 , 0u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART1 , PA12 , 0u8) ; pin_trait_impl ! (crate :: usart :: CkPin , USART1 , PA8 , 1u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART1 , PB6 , 1u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART1 , PB7 , 1u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART1 , PA11 , 1u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART1 , PA12 , 1u8) ; pin_trait_impl ! (crate :: usart :: CkPin , USART1 , PA10 , 2u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART1 , PB15 , 2u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART1 , PA8 , 2u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART1 , PA5 , 2u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART1 , PA9 , 2u8) ; pin_trait_impl ! (crate :: usart :: CkPin , USART1 , PA5 , 3u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART1 , PA6 , 3u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART1 , PA7 , 3u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART1 , PC4 , 3u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART1 , PC5 , 3u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART2 , PA0 , 0u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART2 , PA1 , 0u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART2 , PA2 , 0u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART2 , PA3 , 0u8) ; pin_trait_impl ! (crate :: usart :: CkPin , USART2 , PA4 , 0u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART2 , PD3 , 1u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART2 , PD4 , 1u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART2 , PD5 , 1u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART2 , PD6 , 1u8) ; pin_trait_impl ! (crate :: usart :: CkPin , USART2 , PD7 , 1u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM1 , PA12 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM1 , PA8 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM1 , PA9 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM1 , PA10 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM1 , PA11 , 0u8) ; pin_trait_impl ! (crate :: timer :: BreakInputPin , TIM1 , PB12 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel1ComplementaryPin , TIM1 , PB13 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel2ComplementaryPin , TIM1 , PB14 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel3ComplementaryPin , TIM1 , PB15 , 0u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM1 , PA12 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM1 , PA8 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM1 , PA9 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM1 , PA10 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM1 , PA11 , 1u8) ; pin_trait_impl ! (crate :: timer :: BreakInputPin , TIM1 , PA6 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel1ComplementaryPin , TIM1 , PA7 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel2ComplementaryPin , TIM1 , PB0 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel3ComplementaryPin , TIM1 , PB1 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM2 , PA0 , 0u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM2 , PA0 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM2 , PA1 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM2 , PA2 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM2 , PA3 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM2 , PA15 , 1u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM2 , PA15 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM2 , PB3 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM2 , PA2 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM2 , PA3 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM2 , PA0 , 2u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM2 , PA0 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM2 , PA1 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM2 , PB10 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM2 , PB11 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM2 , PA15 , 3u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM2 , PA15 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM2 , PB3 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM2 , PB10 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM2 , PB11 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM3 , PA6 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM3 , PA7 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM3 , PB0 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM3 , PB1 , 0u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM3 , PD2 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM3 , PB4 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM3 , PB5 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM3 , PB0 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM3 , PB1 , 2u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM3 , PD2 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM3 , PC6 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM3 , PC7 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM3 , PC8 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM3 , PC9 , 3u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM3 , PD2 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM4 , PB6 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM4 , PB7 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM4 , PB8 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM4 , PB9 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM4 , PD12 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM4 , PD13 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM4 , PD14 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM4 , PD15 , 1u8) ; impl_adc_pin ! (ADC1 , PA0 , 0u8) ; impl_adc_pin ! (ADC1 , PA1 , 1u8) ; impl_adc_pin ! (ADC1 , PA2 , 2u8) ; impl_adc_pin ! (ADC1 , PA3 , 3u8) ; impl_adc_pin ! (ADC1 , PA4 , 4u8) ; impl_adc_pin ! (ADC1 , PA5 , 5u8) ; impl_adc_pin ! (ADC1 , PA6 , 6u8) ; impl_adc_pin ! (ADC1 , PA7 , 7u8) ; impl_adc_pin ! (ADC1 , PB0 , 8u8) ; impl_adc_pin ! (ADC1 , PB1 , 9u8) ; impl_adc_pin ! (ADC1 , PC0 , 10u8) ; impl_adc_pin ! (ADC1 , PC1 , 11u8) ; impl_adc_pin ! (ADC1 , PC2 , 12u8) ; impl_adc_pin ! (ADC1 , PC3 , 13u8) ; impl_adc_pin ! (ADC1 , PC4 , 14u8) ; impl_adc_pin ! (ADC1 , PC5 , 15u8) ; impl_adc_pin ! (ADC2 , PA0 , 0u8) ; impl_adc_pin ! (ADC2 , PA1 , 1u8) ; impl_adc_pin ! (ADC2 , PA2 , 2u8) ; impl_adc_pin ! (ADC2 , PA3 , 3u8) ; impl_adc_pin ! (ADC2 , PA4 , 4u8) ; impl_adc_pin ! (ADC2 , PA5 , 5u8) ; impl_adc_pin ! (ADC2 , PA6 , 6u8) ; impl_adc_pin ! (ADC2 , PA7 , 7u8) ; impl_adc_pin ! (ADC2 , PB0 , 8u8) ; impl_adc_pin ! (ADC2 , PB1 , 9u8) ; impl_adc_pin ! (ADC2 , PC0 , 10u8) ; impl_adc_pin ! (ADC2 , PC1 , 11u8) ; impl_adc_pin ! (ADC2 , PC2 , 12u8) ; impl_adc_pin ! (ADC2 , PC3 , 13u8) ; impl_adc_pin ! (ADC2 , PC4 , 14u8) ; impl_adc_pin ! (ADC2 , PC5 , 15u8) ; pin_trait_impl ! (crate :: spi :: CsPin , SPI1 , PA4 , 0u8) ; pin_trait_impl ! (crate :: spi :: SckPin , SPI1 , PA5 , 0u8) ; pin_trait_impl ! (crate :: spi :: MisoPin , SPI1 , PA6 , 0u8) ; pin_trait_impl ! (crate :: spi :: MosiPin , SPI1 , PA7 , 0u8) ; pin_trait_impl ! (crate :: spi :: CsPin , SPI1 , PA15 , 1u8) ; pin_trait_impl ! (crate :: spi :: SckPin , SPI1 , PB3 , 1u8) ; pin_trait_impl ! (crate :: spi :: MisoPin , SPI1 , PB4 , 1u8) ; pin_trait_impl ! (crate :: spi :: MosiPin , SPI1 , PB5 , 1u8) ; pin_trait_impl ! (crate :: i2c :: SclPin , I2C1 , PB6 , 0u8) ; pin_trait_impl ! (crate :: i2c :: SdaPin , I2C1 , PB7 , 0u8) ; pin_trait_impl ! (crate :: i2c :: SclPin , I2C1 , PB8 , 1u8) ; pin_trait_impl ! (crate :: i2c :: SdaPin , I2C1 , PB9 , 1u8) ; pin_trait_impl ! (crate :: usbd :: DmPin , USBD , PA11 , 0u8) ; pin_trait_impl ! (crate :: usbd :: DpPin , USBD , PA12 , 0u8) ; dma_trait_impl ! (crate :: usart :: RxDma , USART1 , { channel : DMA1_CH5 } , ()) ; dma_trait_impl ! (crate :: usart :: TxDma , USART1 , { channel : DMA1_CH4 } , ()) ; dma_trait_impl ! (crate :: usart :: RxDma , USART2 , { channel : DMA1_CH6 } , ()) ; dma_trait_impl ! (crate :: usart :: TxDma , USART2 , { channel : DMA1_CH7 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch3Dma , TIM1 , { channel : DMA1_CH6 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch2Dma , TIM1 , { channel : DMA1_CH3 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch4Dma , TIM1 , { channel : DMA1_CH4 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch1Dma , TIM1 , { channel : DMA1_CH2 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch4Dma , TIM2 , { channel : DMA1_CH7 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch1Dma , TIM2 , { channel : DMA1_CH5 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch2Dma , TIM2 , { channel : DMA1_CH7 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch3Dma , TIM2 , { channel : DMA1_CH1 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch1Dma , TIM3 , { channel : DMA1_CH6 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch3Dma , TIM3 , { channel : DMA1_CH2 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch4Dma , TIM3 , { channel : DMA1_CH3 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch1Dma , TIM4 , { channel : DMA1_CH1 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch3Dma , TIM4 , { channel : DMA1_CH5 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch2Dma , TIM4 , { channel : DMA1_CH4 } , ()) ; dma_trait_impl ! (crate :: spi :: TxDma , SPI1 , { channel : DMA1_CH3 } , ()) ; dma_trait_impl ! (crate :: spi :: RxDma , SPI1 , { channel : DMA1_CH2 } , ()) ; dma_trait_impl ! (crate :: i2c :: RxDma , I2C1 , { channel : DMA1_CH7 } , ()) ; dma_trait_impl ! (crate :: i2c :: TxDma , I2C1 , { channel : DMA1_CH6 } , ()) ; # [allow (non_camel_case_types)] pub mod peripheral_interrupts { pub mod PFIC { } pub mod SYSTICK { } pub mod FLASH { } pub mod EXTI { pub type EXTI0 = crate :: interrupt :: typelevel :: EXTI0 ; pub type EXTI1 = crate :: interrupt :: typelevel :: EXTI1 ; pub type EXTI2 = crate :: interrupt :: typelevel :: EXTI2 ; pub type EXTI3 = crate :: interrupt :: typelevel :: EXTI3 ; pub type EXTI4 = crate :: interrupt :: typelevel :: EXTI4 ; pub type EXTI5 = crate :: interrupt :: typelevel :: EXTI9_5 ; pub type EXTI10 = crate :: interrupt :: typelevel :: EXTI15_10 ; } pub mod RCC { } pub mod DMA1 { pub type CH1 = crate :: interrupt :: typelevel :: DMA1_CHANNEL1 ; pub type CH2 = crate :: interrupt :: typelevel :: DMA1_CHANNEL2 ; pub type CH3 = crate :: interrupt :: typelevel :: DMA1_CHANNEL3 ; pub type CH4 = crate :: interrupt :: typelevel :: DMA1_CHANNEL4 ; pub type CH5 = crate :: interrupt :: typelevel :: DMA1_CHANNEL5 ; pub type CH6 = crate :: interrupt :: typelevel :: DMA1_CHANNEL6 ; pub type CH7 = crate :: interrupt :: typelevel :: DMA1_CHANNEL7 ; pub type CH8 = crate :: interrupt :: typelevel :: DMA1_CHANNEL8 ; } pub mod GPIOA { } pub mod GPIOB { } pub mod GPIOC { } pub mod GPIOD { } pub mod AFIO { } pub mod EXTEND { } pub mod RTC { } pub mod USART1 { pub type GLOBAL = crate :: interrupt :: typelevel :: USART1 ; } pub mod USART2 { pub type GLOBAL = crate :: interrupt :: typelevel :: USART2 ; } pub mod TIM1 { pub type BRK = crate :: interrupt :: typelevel :: TIM1_BRK ; pub type UP = crate :: interrupt :: typelevel :: TIM1_UP ; pub type TRG = crate :: interrupt :: typelevel :: TIM1_TRG_COM ; pub type COM = crate :: interrupt :: typelevel :: TIM1_TRG_COM ; pub type CC = crate :: interrupt :: typelevel :: TIM1_CC ; } pub mod TIM2 { pub type UP = crate :: interrupt :: typelevel :: TIM2 ; pub type TRG = crate :: interrupt :: typelevel :: TIM2 ; pub type CC = crate :: interrupt :: typelevel :: TIM2 ; } pub mod TIM3 { pub type UP = crate :: interrupt :: typelevel :: TIM3 ; pub type TRG = crate :: interrupt :: typelevel :: TIM3 ; pub type CC = crate :: interrupt :: typelevel :: TIM3 ; } pub mod TIM4 { pub type UP = crate :: interrupt :: typelevel :: TIM4 ; pub type TRG = crate :: interrupt :: typelevel :: TIM4 ; pub type CC = crate :: interrupt :: typelevel :: TIM4 ; } pub mod ADC1 { pub type GLOBAL = crate :: interrupt :: typelevel :: ADC ; } pub mod ADC2 { pub type GLOBAL = crate :: interrupt :: typelevel :: ADC ; } pub mod SPI1 { pub type GLOBAL = crate :: interrupt :: typelevel :: SPI1 ; } pub mod I2C1 { pub type ER = crate :: interrupt :: typelevel :: I2C1_ER ; pub type EV = crate :: interrupt :: typelevel :: I2C1_EV ; } pub mod USBD { pub type HP = crate :: interrupt :: typelevel :: USB_HP_CAN1_TX ; pub type LP = crate :: interrupt :: typelevel :: USB_LP_CAN1_RX0 ; pub type WKUP = crate :: interrupt :: typelevel :: USB_WKUP ; } pub mod USBRAM { } pub mod CAN1 { pub type TX = crate :: interrupt :: typelevel :: USB_HP_CAN1_TX ; pub type RX0 = crate :: interrupt :: typelevel :: USB_LP_CAN1_RX0 ; pub type RX1 = crate :: interrupt :: typelevel :: CAN1_RX1 ; pub type SCE = crate :: interrupt :: typelevel :: CAN1_SCE ; } } dma_channel_impl ! (DMA1_CH1 , 0u8) ; dma_channel_impl ! (DMA1_CH2 , 1u8) ; dma_channel_impl ! (DMA1_CH3 , 2u8) ; dma_channel_impl ! (DMA1_CH4 , 3u8) ; dma_channel_impl ! (DMA1_CH5 , 4u8) ; dma_channel_impl ! (DMA1_CH6 , 5u8) ; dma_channel_impl ! (DMA1_CH7 , 6u8) ; dma_channel_impl ! (DMA1_CH8 , 7u8) ; # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL1 () { < crate :: peripherals :: DMA1_CH1 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL2 () { < crate :: peripherals :: DMA1_CH2 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL3 () { < crate :: peripherals :: DMA1_CH3 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL4 () { < crate :: peripherals :: DMA1_CH4 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] unsafe(# [qingke_rt :: interrupt]) unsafe fn DMA1_CHANNEL5 () { < crate :: peripherals :: DMA1_CH5 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL6 () { < crate :: peripherals :: DMA1_CH6 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL7 () { < crate :: peripherals :: DMA1_CH7 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL8 () { < crate :: peripherals :: DMA1_CH8 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } pub (crate) const DMA_CHANNELS : & [crate :: dma :: ChannelInfo] = & [crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 0usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 1usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 2usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 3usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 4usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 5usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 6usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 7usize , } ,] ;
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +++++++                          +
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: unsafe attribute used without unsafe
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/ch32-hal-eda383fa759fc47b/out/_generated.rs:1:28983
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL6 () { < crate :: peripherals :: DMA1_CH6 as...
[INFO] [stdout]   |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^ usage of unsafe attribute
[INFO] [stdout]   |
[INFO] [stdout]   = note: this error originates in the attribute macro `qingke_rt::interrupt` (in Nightly builds, run with -Z macro-backtrace for more info)
[INFO] [stdout] help: wrap the attribute in `unsafe(...)`
[INFO] [stdout]   |
[INFO] [stdout] 1 | crate :: peripherals_definition ! (PFIC , SYSTICK , FLASH , MCO , RCC , DMA1 , PA0 , PA1 , PA2 , PA3 , PA4 , PA5 , PA6 , PA7 , PA8 , PA9 , PA10 , PA11 , PA12 , PA13 , PA14 , PA15 , PB0 , PB1 , PB2 , PB3 , PB4 , PB5 , PB6 , PB7 , PB8 , PB9 , PB10 , PB11 , PB12 , PB13 , PB14 , PB15 , PC0 , PC1 , PC2 , PC3 , PC4 , PC5 , PC6 , PC7 , PC8 , PC9 , PC10 , PC11 , PC12 , PC13 , PC14 , PC15 , PD0 , PD1 , PD2 , PD3 , PD4 , PD5 , PD6 , PD7 , PD8 , PD9 , PD10 , PD11 , PD12 , PD13 , PD14 , PD15 , AFIO , EXTEND , RTC , USART1 , USART2 , TIM1 , TIM2 , TIM3 , TIM4 , ADC1 , ADC2 , SPI1 , I2C1 , USBD , USBRAM , CAN1 , EXTI0 , EXTI1 , EXTI2 , EXTI3 , EXTI4 , EXTI5 , EXTI6 , EXTI7 , EXTI8 , EXTI9 , EXTI10 , EXTI11 , EXTI12 , EXTI13 , EXTI14 , EXTI15 , DMA1_CH1 , DMA1_CH2 , DMA1_CH3 , DMA1_CH4 , DMA1_CH5 , DMA1_CH6 , DMA1_CH7 , DMA1_CH8) ; crate :: peripherals_struct ! (PFIC , SYSTICK , FLASH , MCO , RCC , DMA1 , PA0 , PA1 , PA2 , PA3 , PA4 , PA5 , PA6 , PA7 , PA8 , PA9 , PA10 , PA11 , PA12 , PA13 , PA14 , PA15 , PB0 , PB1 , PB2 , PB3 , PB4 , PB5 , PB6 , PB7 , PB8 , PB9 , PB10 , PB11 , PB12 , PB13 , PB14 , PB15 , PC0 , PC1 , PC2 , PC3 , PC4 , PC5 , PC6 , PC7 , PC8 , PC9 , PC10 , PC11 , PC12 , PC13 , PC14 , PC15 , PD0 , PD1 , PD2 , PD3 , PD4 , PD5 , PD6 , PD7 , PD8 , PD9 , PD10 , PD11 , PD12 , PD13 , PD14 , PD15 , AFIO , EXTEND , RTC , USART1 , USART2 , TIM1 , TIM2 , TIM3 , TIM4 , ADC1 , ADC2 , SPI1 , I2C1 , USBD , USBRAM , CAN1 , EXTI0 , EXTI1 , EXTI2 , EXTI3 , EXTI4 , EXTI5 , EXTI6 , EXTI7 , EXTI8 , EXTI9 , EXTI10 , EXTI11 , EXTI12 , EXTI13 , EXTI14 , EXTI15 , DMA1_CH1 , DMA1_CH2 , DMA1_CH3 , DMA1_CH4 , DMA1_CH5 , DMA1_CH6 , DMA1_CH7 , DMA1_CH8) ; crate :: interrupt_mod ! (WWDG , PVD , TAMPER , RTC , FLASH , RCC , EXTI0 , EXTI1 , EXTI2 , EXTI3 , EXTI4 , DMA1_CHANNEL1 , DMA1_CHANNEL2 , DMA1_CHANNEL3 , DMA1_CHANNEL4 , DMA1_CHANNEL5 , DMA1_CHANNEL6 , DMA1_CHANNEL7 , ADC , USB_HP_CAN1_TX , USB_LP_CAN1_RX0 , CAN1_RX1 , CAN1_SCE , EXTI9_5 , TIM1_BRK , TIM1_UP , TIM1_TRG_COM , TIM1_CC , TIM2 , TIM3 , TIM4 , I2C1_EV , I2C1_ER , I2C2_EV , I2C2_ER , SPI1 , SPI2 , USART1 , USART2 , USART3 , EXTI15_10 , RTC_ALARM , USB_WKUP , USBHD , USBHD_WKUP , UART4 , DMA1_CHANNEL8 ,) ; impl crate :: peripheral :: SealedRccPeripheral for peripherals :: DMA1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . hclk } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . ahbpcenr () . modify (| w | w . set_dma1en (true)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . ahbpcenr () . modify (| w | w . set_dma1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: DMA1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: AFIO { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_afioen (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_afiorst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_afiorst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_afioen (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: AFIO { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: USART1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_usart1en (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_usart1rst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_usart1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_usart1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: USART1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: USART2 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_usart2en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_usart2rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_usart2rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_usart2en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: USART2 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: USART2 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_usart2_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: USART2 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: TIM1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2_tim } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_tim1en (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_tim1rst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_tim1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_tim1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: TIM1 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: TIM1 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_tim1_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: TIM1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: TIM2 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1_tim } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim2en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim2rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim2rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim2en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: TIM2 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: TIM2 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_tim2_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: TIM2 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: TIM3 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1_tim } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim3en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim3rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim3rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim3en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: TIM3 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: TIM3 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_tim3_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: TIM3 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: TIM4 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1_tim } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim4en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim4rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim4rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim4en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: TIM4 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: TIM4 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_tim4_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: TIM4 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: ADC1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_adc1en (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_adc1rst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_adc1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_adc1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: ADC1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: ADC2 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_adc2en (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_adc2rst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_adc2rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_adc2en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: ADC2 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: SPI1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_spi1en (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_spi1rst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_spi1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_spi1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: SPI1 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: SPI1 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_spi1_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: SPI1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: I2C1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_i2c1en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_i2c1rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_i2c1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_i2c1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: I2C1 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: I2C1 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_i2c1_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: I2C1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: USBD { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_usbden (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_usbdrst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_usbdrst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_usbden (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: USBD { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: CAN1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_can1en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_can1rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_can1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_can1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: CAN1 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: CAN1 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_can1_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: CAN1 { } pub unsafe fn init_dma () { crate :: pac :: RCC . ahbpcenr () . modify (| w | w . set_dma1en (true)) ; } pub unsafe fn init_gpio () { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_iopaen (true)) ; crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_iopben (true)) ; crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_iopcen (true)) ; crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_iopden (true)) ; } pin_trait_impl ! (crate :: usart :: CkPin , USART1 , PA8 , 0u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART1 , PA9 , 0u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART1 , PA10 , 0u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART1 , PA11 , 0u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART1 , PA12 , 0u8) ; pin_trait_impl ! (crate :: usart :: CkPin , USART1 , PA8 , 1u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART1 , PB6 , 1u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART1 , PB7 , 1u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART1 , PA11 , 1u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART1 , PA12 , 1u8) ; pin_trait_impl ! (crate :: usart :: CkPin , USART1 , PA10 , 2u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART1 , PB15 , 2u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART1 , PA8 , 2u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART1 , PA5 , 2u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART1 , PA9 , 2u8) ; pin_trait_impl ! (crate :: usart :: CkPin , USART1 , PA5 , 3u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART1 , PA6 , 3u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART1 , PA7 , 3u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART1 , PC4 , 3u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART1 , PC5 , 3u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART2 , PA0 , 0u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART2 , PA1 , 0u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART2 , PA2 , 0u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART2 , PA3 , 0u8) ; pin_trait_impl ! (crate :: usart :: CkPin , USART2 , PA4 , 0u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART2 , PD3 , 1u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART2 , PD4 , 1u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART2 , PD5 , 1u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART2 , PD6 , 1u8) ; pin_trait_impl ! (crate :: usart :: CkPin , USART2 , PD7 , 1u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM1 , PA12 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM1 , PA8 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM1 , PA9 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM1 , PA10 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM1 , PA11 , 0u8) ; pin_trait_impl ! (crate :: timer :: BreakInputPin , TIM1 , PB12 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel1ComplementaryPin , TIM1 , PB13 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel2ComplementaryPin , TIM1 , PB14 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel3ComplementaryPin , TIM1 , PB15 , 0u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM1 , PA12 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM1 , PA8 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM1 , PA9 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM1 , PA10 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM1 , PA11 , 1u8) ; pin_trait_impl ! (crate :: timer :: BreakInputPin , TIM1 , PA6 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel1ComplementaryPin , TIM1 , PA7 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel2ComplementaryPin , TIM1 , PB0 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel3ComplementaryPin , TIM1 , PB1 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM2 , PA0 , 0u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM2 , PA0 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM2 , PA1 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM2 , PA2 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM2 , PA3 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM2 , PA15 , 1u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM2 , PA15 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM2 , PB3 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM2 , PA2 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM2 , PA3 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM2 , PA0 , 2u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM2 , PA0 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM2 , PA1 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM2 , PB10 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM2 , PB11 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM2 , PA15 , 3u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM2 , PA15 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM2 , PB3 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM2 , PB10 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM2 , PB11 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM3 , PA6 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM3 , PA7 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM3 , PB0 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM3 , PB1 , 0u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM3 , PD2 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM3 , PB4 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM3 , PB5 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM3 , PB0 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM3 , PB1 , 2u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM3 , PD2 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM3 , PC6 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM3 , PC7 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM3 , PC8 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM3 , PC9 , 3u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM3 , PD2 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM4 , PB6 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM4 , PB7 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM4 , PB8 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM4 , PB9 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM4 , PD12 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM4 , PD13 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM4 , PD14 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM4 , PD15 , 1u8) ; impl_adc_pin ! (ADC1 , PA0 , 0u8) ; impl_adc_pin ! (ADC1 , PA1 , 1u8) ; impl_adc_pin ! (ADC1 , PA2 , 2u8) ; impl_adc_pin ! (ADC1 , PA3 , 3u8) ; impl_adc_pin ! (ADC1 , PA4 , 4u8) ; impl_adc_pin ! (ADC1 , PA5 , 5u8) ; impl_adc_pin ! (ADC1 , PA6 , 6u8) ; impl_adc_pin ! (ADC1 , PA7 , 7u8) ; impl_adc_pin ! (ADC1 , PB0 , 8u8) ; impl_adc_pin ! (ADC1 , PB1 , 9u8) ; impl_adc_pin ! (ADC1 , PC0 , 10u8) ; impl_adc_pin ! (ADC1 , PC1 , 11u8) ; impl_adc_pin ! (ADC1 , PC2 , 12u8) ; impl_adc_pin ! (ADC1 , PC3 , 13u8) ; impl_adc_pin ! (ADC1 , PC4 , 14u8) ; impl_adc_pin ! (ADC1 , PC5 , 15u8) ; impl_adc_pin ! (ADC2 , PA0 , 0u8) ; impl_adc_pin ! (ADC2 , PA1 , 1u8) ; impl_adc_pin ! (ADC2 , PA2 , 2u8) ; impl_adc_pin ! (ADC2 , PA3 , 3u8) ; impl_adc_pin ! (ADC2 , PA4 , 4u8) ; impl_adc_pin ! (ADC2 , PA5 , 5u8) ; impl_adc_pin ! (ADC2 , PA6 , 6u8) ; impl_adc_pin ! (ADC2 , PA7 , 7u8) ; impl_adc_pin ! (ADC2 , PB0 , 8u8) ; impl_adc_pin ! (ADC2 , PB1 , 9u8) ; impl_adc_pin ! (ADC2 , PC0 , 10u8) ; impl_adc_pin ! (ADC2 , PC1 , 11u8) ; impl_adc_pin ! (ADC2 , PC2 , 12u8) ; impl_adc_pin ! (ADC2 , PC3 , 13u8) ; impl_adc_pin ! (ADC2 , PC4 , 14u8) ; impl_adc_pin ! (ADC2 , PC5 , 15u8) ; pin_trait_impl ! (crate :: spi :: CsPin , SPI1 , PA4 , 0u8) ; pin_trait_impl ! (crate :: spi :: SckPin , SPI1 , PA5 , 0u8) ; pin_trait_impl ! (crate :: spi :: MisoPin , SPI1 , PA6 , 0u8) ; pin_trait_impl ! (crate :: spi :: MosiPin , SPI1 , PA7 , 0u8) ; pin_trait_impl ! (crate :: spi :: CsPin , SPI1 , PA15 , 1u8) ; pin_trait_impl ! (crate :: spi :: SckPin , SPI1 , PB3 , 1u8) ; pin_trait_impl ! (crate :: spi :: MisoPin , SPI1 , PB4 , 1u8) ; pin_trait_impl ! (crate :: spi :: MosiPin , SPI1 , PB5 , 1u8) ; pin_trait_impl ! (crate :: i2c :: SclPin , I2C1 , PB6 , 0u8) ; pin_trait_impl ! (crate :: i2c :: SdaPin , I2C1 , PB7 , 0u8) ; pin_trait_impl ! (crate :: i2c :: SclPin , I2C1 , PB8 , 1u8) ; pin_trait_impl ! (crate :: i2c :: SdaPin , I2C1 , PB9 , 1u8) ; pin_trait_impl ! (crate :: usbd :: DmPin , USBD , PA11 , 0u8) ; pin_trait_impl ! (crate :: usbd :: DpPin , USBD , PA12 , 0u8) ; dma_trait_impl ! (crate :: usart :: RxDma , USART1 , { channel : DMA1_CH5 } , ()) ; dma_trait_impl ! (crate :: usart :: TxDma , USART1 , { channel : DMA1_CH4 } , ()) ; dma_trait_impl ! (crate :: usart :: RxDma , USART2 , { channel : DMA1_CH6 } , ()) ; dma_trait_impl ! (crate :: usart :: TxDma , USART2 , { channel : DMA1_CH7 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch3Dma , TIM1 , { channel : DMA1_CH6 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch2Dma , TIM1 , { channel : DMA1_CH3 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch4Dma , TIM1 , { channel : DMA1_CH4 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch1Dma , TIM1 , { channel : DMA1_CH2 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch4Dma , TIM2 , { channel : DMA1_CH7 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch1Dma , TIM2 , { channel : DMA1_CH5 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch2Dma , TIM2 , { channel : DMA1_CH7 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch3Dma , TIM2 , { channel : DMA1_CH1 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch1Dma , TIM3 , { channel : DMA1_CH6 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch3Dma , TIM3 , { channel : DMA1_CH2 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch4Dma , TIM3 , { channel : DMA1_CH3 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch1Dma , TIM4 , { channel : DMA1_CH1 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch3Dma , TIM4 , { channel : DMA1_CH5 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch2Dma , TIM4 , { channel : DMA1_CH4 } , ()) ; dma_trait_impl ! (crate :: spi :: TxDma , SPI1 , { channel : DMA1_CH3 } , ()) ; dma_trait_impl ! (crate :: spi :: RxDma , SPI1 , { channel : DMA1_CH2 } , ()) ; dma_trait_impl ! (crate :: i2c :: RxDma , I2C1 , { channel : DMA1_CH7 } , ()) ; dma_trait_impl ! (crate :: i2c :: TxDma , I2C1 , { channel : DMA1_CH6 } , ()) ; # [allow (non_camel_case_types)] pub mod peripheral_interrupts { pub mod PFIC { } pub mod SYSTICK { } pub mod FLASH { } pub mod EXTI { pub type EXTI0 = crate :: interrupt :: typelevel :: EXTI0 ; pub type EXTI1 = crate :: interrupt :: typelevel :: EXTI1 ; pub type EXTI2 = crate :: interrupt :: typelevel :: EXTI2 ; pub type EXTI3 = crate :: interrupt :: typelevel :: EXTI3 ; pub type EXTI4 = crate :: interrupt :: typelevel :: EXTI4 ; pub type EXTI5 = crate :: interrupt :: typelevel :: EXTI9_5 ; pub type EXTI10 = crate :: interrupt :: typelevel :: EXTI15_10 ; } pub mod RCC { } pub mod DMA1 { pub type CH1 = crate :: interrupt :: typelevel :: DMA1_CHANNEL1 ; pub type CH2 = crate :: interrupt :: typelevel :: DMA1_CHANNEL2 ; pub type CH3 = crate :: interrupt :: typelevel :: DMA1_CHANNEL3 ; pub type CH4 = crate :: interrupt :: typelevel :: DMA1_CHANNEL4 ; pub type CH5 = crate :: interrupt :: typelevel :: DMA1_CHANNEL5 ; pub type CH6 = crate :: interrupt :: typelevel :: DMA1_CHANNEL6 ; pub type CH7 = crate :: interrupt :: typelevel :: DMA1_CHANNEL7 ; pub type CH8 = crate :: interrupt :: typelevel :: DMA1_CHANNEL8 ; } pub mod GPIOA { } pub mod GPIOB { } pub mod GPIOC { } pub mod GPIOD { } pub mod AFIO { } pub mod EXTEND { } pub mod RTC { } pub mod USART1 { pub type GLOBAL = crate :: interrupt :: typelevel :: USART1 ; } pub mod USART2 { pub type GLOBAL = crate :: interrupt :: typelevel :: USART2 ; } pub mod TIM1 { pub type BRK = crate :: interrupt :: typelevel :: TIM1_BRK ; pub type UP = crate :: interrupt :: typelevel :: TIM1_UP ; pub type TRG = crate :: interrupt :: typelevel :: TIM1_TRG_COM ; pub type COM = crate :: interrupt :: typelevel :: TIM1_TRG_COM ; pub type CC = crate :: interrupt :: typelevel :: TIM1_CC ; } pub mod TIM2 { pub type UP = crate :: interrupt :: typelevel :: TIM2 ; pub type TRG = crate :: interrupt :: typelevel :: TIM2 ; pub type CC = crate :: interrupt :: typelevel :: TIM2 ; } pub mod TIM3 { pub type UP = crate :: interrupt :: typelevel :: TIM3 ; pub type TRG = crate :: interrupt :: typelevel :: TIM3 ; pub type CC = crate :: interrupt :: typelevel :: TIM3 ; } pub mod TIM4 { pub type UP = crate :: interrupt :: typelevel :: TIM4 ; pub type TRG = crate :: interrupt :: typelevel :: TIM4 ; pub type CC = crate :: interrupt :: typelevel :: TIM4 ; } pub mod ADC1 { pub type GLOBAL = crate :: interrupt :: typelevel :: ADC ; } pub mod ADC2 { pub type GLOBAL = crate :: interrupt :: typelevel :: ADC ; } pub mod SPI1 { pub type GLOBAL = crate :: interrupt :: typelevel :: SPI1 ; } pub mod I2C1 { pub type ER = crate :: interrupt :: typelevel :: I2C1_ER ; pub type EV = crate :: interrupt :: typelevel :: I2C1_EV ; } pub mod USBD { pub type HP = crate :: interrupt :: typelevel :: USB_HP_CAN1_TX ; pub type LP = crate :: interrupt :: typelevel :: USB_LP_CAN1_RX0 ; pub type WKUP = crate :: interrupt :: typelevel :: USB_WKUP ; } pub mod USBRAM { } pub mod CAN1 { pub type TX = crate :: interrupt :: typelevel :: USB_HP_CAN1_TX ; pub type RX0 = crate :: interrupt :: typelevel :: USB_LP_CAN1_RX0 ; pub type RX1 = crate :: interrupt :: typelevel :: CAN1_RX1 ; pub type SCE = crate :: interrupt :: typelevel :: CAN1_SCE ; } } dma_channel_impl ! (DMA1_CH1 , 0u8) ; dma_channel_impl ! (DMA1_CH2 , 1u8) ; dma_channel_impl ! (DMA1_CH3 , 2u8) ; dma_channel_impl ! (DMA1_CH4 , 3u8) ; dma_channel_impl ! (DMA1_CH5 , 4u8) ; dma_channel_impl ! (DMA1_CH6 , 5u8) ; dma_channel_impl ! (DMA1_CH7 , 6u8) ; dma_channel_impl ! (DMA1_CH8 , 7u8) ; # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL1 () { < crate :: peripherals :: DMA1_CH1 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL2 () { < crate :: peripherals :: DMA1_CH2 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL3 () { < crate :: peripherals :: DMA1_CH3 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL4 () { < crate :: peripherals :: DMA1_CH4 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL5 () { < crate :: peripherals :: DMA1_CH5 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] unsafe(# [qingke_rt :: interrupt]) unsafe fn DMA1_CHANNEL6 () { < crate :: peripherals :: DMA1_CH6 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL7 () { < crate :: peripherals :: DMA1_CH7 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL8 () { < crate :: peripherals :: DMA1_CH8 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } pub (crate) const DMA_CHANNELS : & [crate :: dma :: ChannelInfo] = & [crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 0usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 1usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 2usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 3usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 4usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 5usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 6usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 7usize , } ,] ;
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       +++++++                          +
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: unsafe attribute used without unsafe
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/ch32-hal-eda383fa759fc47b/out/_generated.rs:1:29154
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL7 () { < crate :: peripherals :: DMA1_CH7 as...
[INFO] [stdout]   |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^ usage of unsafe attribute
[INFO] [stdout]   |
[INFO] [stdout]   = note: this error originates in the attribute macro `qingke_rt::interrupt` (in Nightly builds, run with -Z macro-backtrace for more info)
[INFO] [stdout] help: wrap the attribute in `unsafe(...)`
[INFO] [stdout]   |
[INFO] [stdout] 1 | crate :: peripherals_definition ! (PFIC , SYSTICK , FLASH , MCO , RCC , DMA1 , PA0 , PA1 , PA2 , PA3 , PA4 , PA5 , PA6 , PA7 , PA8 , PA9 , PA10 , PA11 , PA12 , PA13 , PA14 , PA15 , PB0 , PB1 , PB2 , PB3 , PB4 , PB5 , PB6 , PB7 , PB8 , PB9 , PB10 , PB11 , PB12 , PB13 , PB14 , PB15 , PC0 , PC1 , PC2 , PC3 , PC4 , PC5 , PC6 , PC7 , PC8 , PC9 , PC10 , PC11 , PC12 , PC13 , PC14 , PC15 , PD0 , PD1 , PD2 , PD3 , PD4 , PD5 , PD6 , PD7 , PD8 , PD9 , PD10 , PD11 , PD12 , PD13 , PD14 , PD15 , AFIO , EXTEND , RTC , USART1 , USART2 , TIM1 , TIM2 , TIM3 , TIM4 , ADC1 , ADC2 , SPI1 , I2C1 , USBD , USBRAM , CAN1 , EXTI0 , EXTI1 , EXTI2 , EXTI3 , EXTI4 , EXTI5 , EXTI6 , EXTI7 , EXTI8 , EXTI9 , EXTI10 , EXTI11 , EXTI12 , EXTI13 , EXTI14 , EXTI15 , DMA1_CH1 , DMA1_CH2 , DMA1_CH3 , DMA1_CH4 , DMA1_CH5 , DMA1_CH6 , DMA1_CH7 , DMA1_CH8) ; crate :: peripherals_struct ! (PFIC , SYSTICK , FLASH , MCO , RCC , DMA1 , PA0 , PA1 , PA2 , PA3 , PA4 , PA5 , PA6 , PA7 , PA8 , PA9 , PA10 , PA11 , PA12 , PA13 , PA14 , PA15 , PB0 , PB1 , PB2 , PB3 , PB4 , PB5 , PB6 , PB7 , PB8 , PB9 , PB10 , PB11 , PB12 , PB13 , PB14 , PB15 , PC0 , PC1 , PC2 , PC3 , PC4 , PC5 , PC6 , PC7 , PC8 , PC9 , PC10 , PC11 , PC12 , PC13 , PC14 , PC15 , PD0 , PD1 , PD2 , PD3 , PD4 , PD5 , PD6 , PD7 , PD8 , PD9 , PD10 , PD11 , PD12 , PD13 , PD14 , PD15 , AFIO , EXTEND , RTC , USART1 , USART2 , TIM1 , TIM2 , TIM3 , TIM4 , ADC1 , ADC2 , SPI1 , I2C1 , USBD , USBRAM , CAN1 , EXTI0 , EXTI1 , EXTI2 , EXTI3 , EXTI4 , EXTI5 , EXTI6 , EXTI7 , EXTI8 , EXTI9 , EXTI10 , EXTI11 , EXTI12 , EXTI13 , EXTI14 , EXTI15 , DMA1_CH1 , DMA1_CH2 , DMA1_CH3 , DMA1_CH4 , DMA1_CH5 , DMA1_CH6 , DMA1_CH7 , DMA1_CH8) ; crate :: interrupt_mod ! (WWDG , PVD , TAMPER , RTC , FLASH , RCC , EXTI0 , EXTI1 , EXTI2 , EXTI3 , EXTI4 , DMA1_CHANNEL1 , DMA1_CHANNEL2 , DMA1_CHANNEL3 , DMA1_CHANNEL4 , DMA1_CHANNEL5 , DMA1_CHANNEL6 , DMA1_CHANNEL7 , ADC , USB_HP_CAN1_TX , USB_LP_CAN1_RX0 , CAN1_RX1 , CAN1_SCE , EXTI9_5 , TIM1_BRK , TIM1_UP , TIM1_TRG_COM , TIM1_CC , TIM2 , TIM3 , TIM4 , I2C1_EV , I2C1_ER , I2C2_EV , I2C2_ER , SPI1 , SPI2 , USART1 , USART2 , USART3 , EXTI15_10 , RTC_ALARM , USB_WKUP , USBHD , USBHD_WKUP , UART4 , DMA1_CHANNEL8 ,) ; impl crate :: peripheral :: SealedRccPeripheral for peripherals :: DMA1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . hclk } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . ahbpcenr () . modify (| w | w . set_dma1en (true)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . ahbpcenr () . modify (| w | w . set_dma1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: DMA1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: AFIO { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_afioen (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_afiorst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_afiorst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_afioen (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: AFIO { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: USART1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_usart1en (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_usart1rst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_usart1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_usart1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: USART1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: USART2 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_usart2en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_usart2rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_usart2rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_usart2en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: USART2 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: USART2 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_usart2_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: USART2 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: TIM1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2_tim } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_tim1en (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_tim1rst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_tim1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_tim1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: TIM1 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: TIM1 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_tim1_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: TIM1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: TIM2 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1_tim } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim2en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim2rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim2rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim2en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: TIM2 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: TIM2 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_tim2_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: TIM2 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: TIM3 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1_tim } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim3en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim3rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim3rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim3en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: TIM3 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: TIM3 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_tim3_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: TIM3 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: TIM4 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1_tim } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim4en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim4rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim4rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim4en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: TIM4 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: TIM4 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_tim4_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: TIM4 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: ADC1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_adc1en (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_adc1rst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_adc1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_adc1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: ADC1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: ADC2 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_adc2en (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_adc2rst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_adc2rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_adc2en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: ADC2 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: SPI1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_spi1en (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_spi1rst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_spi1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_spi1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: SPI1 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: SPI1 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_spi1_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: SPI1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: I2C1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_i2c1en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_i2c1rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_i2c1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_i2c1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: I2C1 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: I2C1 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_i2c1_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: I2C1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: USBD { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_usbden (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_usbdrst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_usbdrst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_usbden (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: USBD { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: CAN1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_can1en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_can1rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_can1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_can1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: CAN1 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: CAN1 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_can1_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: CAN1 { } pub unsafe fn init_dma () { crate :: pac :: RCC . ahbpcenr () . modify (| w | w . set_dma1en (true)) ; } pub unsafe fn init_gpio () { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_iopaen (true)) ; crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_iopben (true)) ; crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_iopcen (true)) ; crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_iopden (true)) ; } pin_trait_impl ! (crate :: usart :: CkPin , USART1 , PA8 , 0u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART1 , PA9 , 0u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART1 , PA10 , 0u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART1 , PA11 , 0u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART1 , PA12 , 0u8) ; pin_trait_impl ! (crate :: usart :: CkPin , USART1 , PA8 , 1u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART1 , PB6 , 1u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART1 , PB7 , 1u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART1 , PA11 , 1u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART1 , PA12 , 1u8) ; pin_trait_impl ! (crate :: usart :: CkPin , USART1 , PA10 , 2u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART1 , PB15 , 2u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART1 , PA8 , 2u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART1 , PA5 , 2u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART1 , PA9 , 2u8) ; pin_trait_impl ! (crate :: usart :: CkPin , USART1 , PA5 , 3u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART1 , PA6 , 3u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART1 , PA7 , 3u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART1 , PC4 , 3u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART1 , PC5 , 3u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART2 , PA0 , 0u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART2 , PA1 , 0u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART2 , PA2 , 0u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART2 , PA3 , 0u8) ; pin_trait_impl ! (crate :: usart :: CkPin , USART2 , PA4 , 0u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART2 , PD3 , 1u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART2 , PD4 , 1u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART2 , PD5 , 1u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART2 , PD6 , 1u8) ; pin_trait_impl ! (crate :: usart :: CkPin , USART2 , PD7 , 1u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM1 , PA12 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM1 , PA8 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM1 , PA9 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM1 , PA10 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM1 , PA11 , 0u8) ; pin_trait_impl ! (crate :: timer :: BreakInputPin , TIM1 , PB12 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel1ComplementaryPin , TIM1 , PB13 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel2ComplementaryPin , TIM1 , PB14 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel3ComplementaryPin , TIM1 , PB15 , 0u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM1 , PA12 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM1 , PA8 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM1 , PA9 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM1 , PA10 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM1 , PA11 , 1u8) ; pin_trait_impl ! (crate :: timer :: BreakInputPin , TIM1 , PA6 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel1ComplementaryPin , TIM1 , PA7 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel2ComplementaryPin , TIM1 , PB0 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel3ComplementaryPin , TIM1 , PB1 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM2 , PA0 , 0u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM2 , PA0 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM2 , PA1 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM2 , PA2 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM2 , PA3 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM2 , PA15 , 1u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM2 , PA15 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM2 , PB3 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM2 , PA2 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM2 , PA3 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM2 , PA0 , 2u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM2 , PA0 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM2 , PA1 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM2 , PB10 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM2 , PB11 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM2 , PA15 , 3u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM2 , PA15 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM2 , PB3 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM2 , PB10 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM2 , PB11 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM3 , PA6 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM3 , PA7 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM3 , PB0 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM3 , PB1 , 0u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM3 , PD2 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM3 , PB4 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM3 , PB5 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM3 , PB0 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM3 , PB1 , 2u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM3 , PD2 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM3 , PC6 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM3 , PC7 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM3 , PC8 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM3 , PC9 , 3u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM3 , PD2 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM4 , PB6 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM4 , PB7 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM4 , PB8 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM4 , PB9 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM4 , PD12 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM4 , PD13 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM4 , PD14 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM4 , PD15 , 1u8) ; impl_adc_pin ! (ADC1 , PA0 , 0u8) ; impl_adc_pin ! (ADC1 , PA1 , 1u8) ; impl_adc_pin ! (ADC1 , PA2 , 2u8) ; impl_adc_pin ! (ADC1 , PA3 , 3u8) ; impl_adc_pin ! (ADC1 , PA4 , 4u8) ; impl_adc_pin ! (ADC1 , PA5 , 5u8) ; impl_adc_pin ! (ADC1 , PA6 , 6u8) ; impl_adc_pin ! (ADC1 , PA7 , 7u8) ; impl_adc_pin ! (ADC1 , PB0 , 8u8) ; impl_adc_pin ! (ADC1 , PB1 , 9u8) ; impl_adc_pin ! (ADC1 , PC0 , 10u8) ; impl_adc_pin ! (ADC1 , PC1 , 11u8) ; impl_adc_pin ! (ADC1 , PC2 , 12u8) ; impl_adc_pin ! (ADC1 , PC3 , 13u8) ; impl_adc_pin ! (ADC1 , PC4 , 14u8) ; impl_adc_pin ! (ADC1 , PC5 , 15u8) ; impl_adc_pin ! (ADC2 , PA0 , 0u8) ; impl_adc_pin ! (ADC2 , PA1 , 1u8) ; impl_adc_pin ! (ADC2 , PA2 , 2u8) ; impl_adc_pin ! (ADC2 , PA3 , 3u8) ; impl_adc_pin ! (ADC2 , PA4 , 4u8) ; impl_adc_pin ! (ADC2 , PA5 , 5u8) ; impl_adc_pin ! (ADC2 , PA6 , 6u8) ; impl_adc_pin ! (ADC2 , PA7 , 7u8) ; impl_adc_pin ! (ADC2 , PB0 , 8u8) ; impl_adc_pin ! (ADC2 , PB1 , 9u8) ; impl_adc_pin ! (ADC2 , PC0 , 10u8) ; impl_adc_pin ! (ADC2 , PC1 , 11u8) ; impl_adc_pin ! (ADC2 , PC2 , 12u8) ; impl_adc_pin ! (ADC2 , PC3 , 13u8) ; impl_adc_pin ! (ADC2 , PC4 , 14u8) ; impl_adc_pin ! (ADC2 , PC5 , 15u8) ; pin_trait_impl ! (crate :: spi :: CsPin , SPI1 , PA4 , 0u8) ; pin_trait_impl ! (crate :: spi :: SckPin , SPI1 , PA5 , 0u8) ; pin_trait_impl ! (crate :: spi :: MisoPin , SPI1 , PA6 , 0u8) ; pin_trait_impl ! (crate :: spi :: MosiPin , SPI1 , PA7 , 0u8) ; pin_trait_impl ! (crate :: spi :: CsPin , SPI1 , PA15 , 1u8) ; pin_trait_impl ! (crate :: spi :: SckPin , SPI1 , PB3 , 1u8) ; pin_trait_impl ! (crate :: spi :: MisoPin , SPI1 , PB4 , 1u8) ; pin_trait_impl ! (crate :: spi :: MosiPin , SPI1 , PB5 , 1u8) ; pin_trait_impl ! (crate :: i2c :: SclPin , I2C1 , PB6 , 0u8) ; pin_trait_impl ! (crate :: i2c :: SdaPin , I2C1 , PB7 , 0u8) ; pin_trait_impl ! (crate :: i2c :: SclPin , I2C1 , PB8 , 1u8) ; pin_trait_impl ! (crate :: i2c :: SdaPin , I2C1 , PB9 , 1u8) ; pin_trait_impl ! (crate :: usbd :: DmPin , USBD , PA11 , 0u8) ; pin_trait_impl ! (crate :: usbd :: DpPin , USBD , PA12 , 0u8) ; dma_trait_impl ! (crate :: usart :: RxDma , USART1 , { channel : DMA1_CH5 } , ()) ; dma_trait_impl ! (crate :: usart :: TxDma , USART1 , { channel : DMA1_CH4 } , ()) ; dma_trait_impl ! (crate :: usart :: RxDma , USART2 , { channel : DMA1_CH6 } , ()) ; dma_trait_impl ! (crate :: usart :: TxDma , USART2 , { channel : DMA1_CH7 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch3Dma , TIM1 , { channel : DMA1_CH6 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch2Dma , TIM1 , { channel : DMA1_CH3 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch4Dma , TIM1 , { channel : DMA1_CH4 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch1Dma , TIM1 , { channel : DMA1_CH2 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch4Dma , TIM2 , { channel : DMA1_CH7 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch1Dma , TIM2 , { channel : DMA1_CH5 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch2Dma , TIM2 , { channel : DMA1_CH7 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch3Dma , TIM2 , { channel : DMA1_CH1 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch1Dma , TIM3 , { channel : DMA1_CH6 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch3Dma , TIM3 , { channel : DMA1_CH2 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch4Dma , TIM3 , { channel : DMA1_CH3 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch1Dma , TIM4 , { channel : DMA1_CH1 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch3Dma , TIM4 , { channel : DMA1_CH5 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch2Dma , TIM4 , { channel : DMA1_CH4 } , ()) ; dma_trait_impl ! (crate :: spi :: TxDma , SPI1 , { channel : DMA1_CH3 } , ()) ; dma_trait_impl ! (crate :: spi :: RxDma , SPI1 , { channel : DMA1_CH2 } , ()) ; dma_trait_impl ! (crate :: i2c :: RxDma , I2C1 , { channel : DMA1_CH7 } , ()) ; dma_trait_impl ! (crate :: i2c :: TxDma , I2C1 , { channel : DMA1_CH6 } , ()) ; # [allow (non_camel_case_types)] pub mod peripheral_interrupts { pub mod PFIC { } pub mod SYSTICK { } pub mod FLASH { } pub mod EXTI { pub type EXTI0 = crate :: interrupt :: typelevel :: EXTI0 ; pub type EXTI1 = crate :: interrupt :: typelevel :: EXTI1 ; pub type EXTI2 = crate :: interrupt :: typelevel :: EXTI2 ; pub type EXTI3 = crate :: interrupt :: typelevel :: EXTI3 ; pub type EXTI4 = crate :: interrupt :: typelevel :: EXTI4 ; pub type EXTI5 = crate :: interrupt :: typelevel :: EXTI9_5 ; pub type EXTI10 = crate :: interrupt :: typelevel :: EXTI15_10 ; } pub mod RCC { } pub mod DMA1 { pub type CH1 = crate :: interrupt :: typelevel :: DMA1_CHANNEL1 ; pub type CH2 = crate :: interrupt :: typelevel :: DMA1_CHANNEL2 ; pub type CH3 = crate :: interrupt :: typelevel :: DMA1_CHANNEL3 ; pub type CH4 = crate :: interrupt :: typelevel :: DMA1_CHANNEL4 ; pub type CH5 = crate :: interrupt :: typelevel :: DMA1_CHANNEL5 ; pub type CH6 = crate :: interrupt :: typelevel :: DMA1_CHANNEL6 ; pub type CH7 = crate :: interrupt :: typelevel :: DMA1_CHANNEL7 ; pub type CH8 = crate :: interrupt :: typelevel :: DMA1_CHANNEL8 ; } pub mod GPIOA { } pub mod GPIOB { } pub mod GPIOC { } pub mod GPIOD { } pub mod AFIO { } pub mod EXTEND { } pub mod RTC { } pub mod USART1 { pub type GLOBAL = crate :: interrupt :: typelevel :: USART1 ; } pub mod USART2 { pub type GLOBAL = crate :: interrupt :: typelevel :: USART2 ; } pub mod TIM1 { pub type BRK = crate :: interrupt :: typelevel :: TIM1_BRK ; pub type UP = crate :: interrupt :: typelevel :: TIM1_UP ; pub type TRG = crate :: interrupt :: typelevel :: TIM1_TRG_COM ; pub type COM = crate :: interrupt :: typelevel :: TIM1_TRG_COM ; pub type CC = crate :: interrupt :: typelevel :: TIM1_CC ; } pub mod TIM2 { pub type UP = crate :: interrupt :: typelevel :: TIM2 ; pub type TRG = crate :: interrupt :: typelevel :: TIM2 ; pub type CC = crate :: interrupt :: typelevel :: TIM2 ; } pub mod TIM3 { pub type UP = crate :: interrupt :: typelevel :: TIM3 ; pub type TRG = crate :: interrupt :: typelevel :: TIM3 ; pub type CC = crate :: interrupt :: typelevel :: TIM3 ; } pub mod TIM4 { pub type UP = crate :: interrupt :: typelevel :: TIM4 ; pub type TRG = crate :: interrupt :: typelevel :: TIM4 ; pub type CC = crate :: interrupt :: typelevel :: TIM4 ; } pub mod ADC1 { pub type GLOBAL = crate :: interrupt :: typelevel :: ADC ; } pub mod ADC2 { pub type GLOBAL = crate :: interrupt :: typelevel :: ADC ; } pub mod SPI1 { pub type GLOBAL = crate :: interrupt :: typelevel :: SPI1 ; } pub mod I2C1 { pub type ER = crate :: interrupt :: typelevel :: I2C1_ER ; pub type EV = crate :: interrupt :: typelevel :: I2C1_EV ; } pub mod USBD { pub type HP = crate :: interrupt :: typelevel :: USB_HP_CAN1_TX ; pub type LP = crate :: interrupt :: typelevel :: USB_LP_CAN1_RX0 ; pub type WKUP = crate :: interrupt :: typelevel :: USB_WKUP ; } pub mod USBRAM { } pub mod CAN1 { pub type TX = crate :: interrupt :: typelevel :: USB_HP_CAN1_TX ; pub type RX0 = crate :: interrupt :: typelevel :: USB_LP_CAN1_RX0 ; pub type RX1 = crate :: interrupt :: typelevel :: CAN1_RX1 ; pub type SCE = crate :: interrupt :: typelevel :: CAN1_SCE ; } } dma_channel_impl ! (DMA1_CH1 , 0u8) ; dma_channel_impl ! (DMA1_CH2 , 1u8) ; dma_channel_impl ! (DMA1_CH3 , 2u8) ; dma_channel_impl ! (DMA1_CH4 , 3u8) ; dma_channel_impl ! (DMA1_CH5 , 4u8) ; dma_channel_impl ! (DMA1_CH6 , 5u8) ; dma_channel_impl ! (DMA1_CH7 , 6u8) ; dma_channel_impl ! (DMA1_CH8 , 7u8) ; # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL1 () { < crate :: peripherals :: DMA1_CH1 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL2 () { < crate :: peripherals :: DMA1_CH2 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL3 () { < crate :: peripherals :: DMA1_CH3 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL4 () { < crate :: peripherals :: DMA1_CH4 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL5 () { < crate :: peripherals :: DMA1_CH5 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL6 () { < crate :: peripherals :: DMA1_CH6 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] unsafe(# [qingke_rt :: interrupt]) unsafe fn DMA1_CHANNEL7 () { < crate :: peripherals :: DMA1_CH7 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL8 () { < crate :: peripherals :: DMA1_CH8 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } pub (crate) const DMA_CHANNELS : & [crate :: dma :: ChannelInfo] = & [crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 0usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 1usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 2usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 3usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 4usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 5usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 6usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 7usize , } ,] ;
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +++++++                          +
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: unsafe attribute used without unsafe
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/ch32-hal-eda383fa759fc47b/out/_generated.rs:1:29325
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL8 () { < crate :: peripherals :: DMA1_CH8 as...
[INFO] [stdout]   |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^ usage of unsafe attribute
[INFO] [stdout]   |
[INFO] [stdout]   = note: this error originates in the attribute macro `qingke_rt::interrupt` (in Nightly builds, run with -Z macro-backtrace for more info)
[INFO] [stdout] help: wrap the attribute in `unsafe(...)`
[INFO] [stdout]   |
[INFO] [stdout] 1 | crate :: peripherals_definition ! (PFIC , SYSTICK , FLASH , MCO , RCC , DMA1 , PA0 , PA1 , PA2 , PA3 , PA4 , PA5 , PA6 , PA7 , PA8 , PA9 , PA10 , PA11 , PA12 , PA13 , PA14 , PA15 , PB0 , PB1 , PB2 , PB3 , PB4 , PB5 , PB6 , PB7 , PB8 , PB9 , PB10 , PB11 , PB12 , PB13 , PB14 , PB15 , PC0 , PC1 , PC2 , PC3 , PC4 , PC5 , PC6 , PC7 , PC8 , PC9 , PC10 , PC11 , PC12 , PC13 , PC14 , PC15 , PD0 , PD1 , PD2 , PD3 , PD4 , PD5 , PD6 , PD7 , PD8 , PD9 , PD10 , PD11 , PD12 , PD13 , PD14 , PD15 , AFIO , EXTEND , RTC , USART1 , USART2 , TIM1 , TIM2 , TIM3 , TIM4 , ADC1 , ADC2 , SPI1 , I2C1 , USBD , USBRAM , CAN1 , EXTI0 , EXTI1 , EXTI2 , EXTI3 , EXTI4 , EXTI5 , EXTI6 , EXTI7 , EXTI8 , EXTI9 , EXTI10 , EXTI11 , EXTI12 , EXTI13 , EXTI14 , EXTI15 , DMA1_CH1 , DMA1_CH2 , DMA1_CH3 , DMA1_CH4 , DMA1_CH5 , DMA1_CH6 , DMA1_CH7 , DMA1_CH8) ; crate :: peripherals_struct ! (PFIC , SYSTICK , FLASH , MCO , RCC , DMA1 , PA0 , PA1 , PA2 , PA3 , PA4 , PA5 , PA6 , PA7 , PA8 , PA9 , PA10 , PA11 , PA12 , PA13 , PA14 , PA15 , PB0 , PB1 , PB2 , PB3 , PB4 , PB5 , PB6 , PB7 , PB8 , PB9 , PB10 , PB11 , PB12 , PB13 , PB14 , PB15 , PC0 , PC1 , PC2 , PC3 , PC4 , PC5 , PC6 , PC7 , PC8 , PC9 , PC10 , PC11 , PC12 , PC13 , PC14 , PC15 , PD0 , PD1 , PD2 , PD3 , PD4 , PD5 , PD6 , PD7 , PD8 , PD9 , PD10 , PD11 , PD12 , PD13 , PD14 , PD15 , AFIO , EXTEND , RTC , USART1 , USART2 , TIM1 , TIM2 , TIM3 , TIM4 , ADC1 , ADC2 , SPI1 , I2C1 , USBD , USBRAM , CAN1 , EXTI0 , EXTI1 , EXTI2 , EXTI3 , EXTI4 , EXTI5 , EXTI6 , EXTI7 , EXTI8 , EXTI9 , EXTI10 , EXTI11 , EXTI12 , EXTI13 , EXTI14 , EXTI15 , DMA1_CH1 , DMA1_CH2 , DMA1_CH3 , DMA1_CH4 , DMA1_CH5 , DMA1_CH6 , DMA1_CH7 , DMA1_CH8) ; crate :: interrupt_mod ! (WWDG , PVD , TAMPER , RTC , FLASH , RCC , EXTI0 , EXTI1 , EXTI2 , EXTI3 , EXTI4 , DMA1_CHANNEL1 , DMA1_CHANNEL2 , DMA1_CHANNEL3 , DMA1_CHANNEL4 , DMA1_CHANNEL5 , DMA1_CHANNEL6 , DMA1_CHANNEL7 , ADC , USB_HP_CAN1_TX , USB_LP_CAN1_RX0 , CAN1_RX1 , CAN1_SCE , EXTI9_5 , TIM1_BRK , TIM1_UP , TIM1_TRG_COM , TIM1_CC , TIM2 , TIM3 , TIM4 , I2C1_EV , I2C1_ER , I2C2_EV , I2C2_ER , SPI1 , SPI2 , USART1 , USART2 , USART3 , EXTI15_10 , RTC_ALARM , USB_WKUP , USBHD , USBHD_WKUP , UART4 , DMA1_CHANNEL8 ,) ; impl crate :: peripheral :: SealedRccPeripheral for peripherals :: DMA1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . hclk } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . ahbpcenr () . modify (| w | w . set_dma1en (true)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . ahbpcenr () . modify (| w | w . set_dma1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: DMA1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: AFIO { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_afioen (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_afiorst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_afiorst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_afioen (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: AFIO { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: USART1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_usart1en (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_usart1rst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_usart1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_usart1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: USART1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: USART2 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_usart2en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_usart2rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_usart2rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_usart2en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: USART2 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: USART2 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_usart2_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: USART2 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: TIM1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2_tim } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_tim1en (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_tim1rst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_tim1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_tim1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: TIM1 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: TIM1 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_tim1_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: TIM1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: TIM2 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1_tim } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim2en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim2rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim2rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim2en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: TIM2 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: TIM2 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_tim2_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: TIM2 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: TIM3 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1_tim } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim3en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim3rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim3rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim3en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: TIM3 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: TIM3 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_tim3_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: TIM3 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: TIM4 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1_tim } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim4en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim4rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_tim4rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_tim4en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: TIM4 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: TIM4 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_tim4_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: TIM4 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: ADC1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_adc1en (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_adc1rst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_adc1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_adc1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: ADC1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: ADC2 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_adc2en (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_adc2rst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_adc2rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_adc2en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: ADC2 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: SPI1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk2 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_spi1en (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_spi1rst (true)) ; crate :: pac :: RCC . apb2prstr () . modify (| w | w . set_spi1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_spi1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: SPI1 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: SPI1 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_spi1_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: SPI1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: I2C1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_i2c1en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_i2c1rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_i2c1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_i2c1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: I2C1 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: I2C1 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_i2c1_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: I2C1 { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: USBD { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_usbden (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_usbdrst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_usbdrst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_usbden (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: USBD { } impl crate :: peripheral :: SealedRccPeripheral for peripherals :: CAN1 { fn frequency () -> crate :: time :: Hertz { crate :: rcc :: clocks () . pclk1 } fn enable_and_reset_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_can1en (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_can1rst (true)) ; crate :: pac :: RCC . apb1prstr () . modify (| w | w . set_can1rst (false)) ; } fn disable_with_cs (_cs : critical_section :: CriticalSection) { crate :: pac :: RCC . apb1pcenr () . modify (| w | w . set_can1en (false)) ; } } impl crate :: peripheral :: RccPeripheral for peripherals :: CAN1 { } impl crate :: peripheral :: SealedRemapPeripheral for peripherals :: CAN1 { fn set_remap (remap : u8) { crate :: pac :: AFIO . pcfr1 () . modify (| w | w . set_can1_rm (unsafe { core :: mem :: transmute (remap) })) ; } } impl crate :: peripheral :: RemapPeripheral for peripherals :: CAN1 { } pub unsafe fn init_dma () { crate :: pac :: RCC . ahbpcenr () . modify (| w | w . set_dma1en (true)) ; } pub unsafe fn init_gpio () { crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_iopaen (true)) ; crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_iopben (true)) ; crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_iopcen (true)) ; crate :: pac :: RCC . apb2pcenr () . modify (| w | w . set_iopden (true)) ; } pin_trait_impl ! (crate :: usart :: CkPin , USART1 , PA8 , 0u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART1 , PA9 , 0u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART1 , PA10 , 0u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART1 , PA11 , 0u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART1 , PA12 , 0u8) ; pin_trait_impl ! (crate :: usart :: CkPin , USART1 , PA8 , 1u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART1 , PB6 , 1u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART1 , PB7 , 1u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART1 , PA11 , 1u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART1 , PA12 , 1u8) ; pin_trait_impl ! (crate :: usart :: CkPin , USART1 , PA10 , 2u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART1 , PB15 , 2u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART1 , PA8 , 2u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART1 , PA5 , 2u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART1 , PA9 , 2u8) ; pin_trait_impl ! (crate :: usart :: CkPin , USART1 , PA5 , 3u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART1 , PA6 , 3u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART1 , PA7 , 3u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART1 , PC4 , 3u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART1 , PC5 , 3u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART2 , PA0 , 0u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART2 , PA1 , 0u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART2 , PA2 , 0u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART2 , PA3 , 0u8) ; pin_trait_impl ! (crate :: usart :: CkPin , USART2 , PA4 , 0u8) ; pin_trait_impl ! (crate :: usart :: CtsPin , USART2 , PD3 , 1u8) ; pin_trait_impl ! (crate :: usart :: RtsPin , USART2 , PD4 , 1u8) ; pin_trait_impl ! (crate :: usart :: TxPin , USART2 , PD5 , 1u8) ; pin_trait_impl ! (crate :: usart :: RxPin , USART2 , PD6 , 1u8) ; pin_trait_impl ! (crate :: usart :: CkPin , USART2 , PD7 , 1u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM1 , PA12 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM1 , PA8 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM1 , PA9 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM1 , PA10 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM1 , PA11 , 0u8) ; pin_trait_impl ! (crate :: timer :: BreakInputPin , TIM1 , PB12 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel1ComplementaryPin , TIM1 , PB13 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel2ComplementaryPin , TIM1 , PB14 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel3ComplementaryPin , TIM1 , PB15 , 0u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM1 , PA12 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM1 , PA8 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM1 , PA9 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM1 , PA10 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM1 , PA11 , 1u8) ; pin_trait_impl ! (crate :: timer :: BreakInputPin , TIM1 , PA6 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel1ComplementaryPin , TIM1 , PA7 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel2ComplementaryPin , TIM1 , PB0 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel3ComplementaryPin , TIM1 , PB1 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM2 , PA0 , 0u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM2 , PA0 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM2 , PA1 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM2 , PA2 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM2 , PA3 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM2 , PA15 , 1u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM2 , PA15 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM2 , PB3 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM2 , PA2 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM2 , PA3 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM2 , PA0 , 2u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM2 , PA0 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM2 , PA1 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM2 , PB10 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM2 , PB11 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM2 , PA15 , 3u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM2 , PA15 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM2 , PB3 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM2 , PB10 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM2 , PB11 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM3 , PA6 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM3 , PA7 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM3 , PB0 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM3 , PB1 , 0u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM3 , PD2 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM3 , PB4 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM3 , PB5 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM3 , PB0 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM3 , PB1 , 2u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM3 , PD2 , 2u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM3 , PC6 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM3 , PC7 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM3 , PC8 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM3 , PC9 , 3u8) ; pin_trait_impl ! (crate :: timer :: ExternalTriggerPin , TIM3 , PD2 , 3u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM4 , PB6 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM4 , PB7 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM4 , PB8 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM4 , PB9 , 0u8) ; pin_trait_impl ! (crate :: timer :: Channel1Pin , TIM4 , PD12 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel2Pin , TIM4 , PD13 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel3Pin , TIM4 , PD14 , 1u8) ; pin_trait_impl ! (crate :: timer :: Channel4Pin , TIM4 , PD15 , 1u8) ; impl_adc_pin ! (ADC1 , PA0 , 0u8) ; impl_adc_pin ! (ADC1 , PA1 , 1u8) ; impl_adc_pin ! (ADC1 , PA2 , 2u8) ; impl_adc_pin ! (ADC1 , PA3 , 3u8) ; impl_adc_pin ! (ADC1 , PA4 , 4u8) ; impl_adc_pin ! (ADC1 , PA5 , 5u8) ; impl_adc_pin ! (ADC1 , PA6 , 6u8) ; impl_adc_pin ! (ADC1 , PA7 , 7u8) ; impl_adc_pin ! (ADC1 , PB0 , 8u8) ; impl_adc_pin ! (ADC1 , PB1 , 9u8) ; impl_adc_pin ! (ADC1 , PC0 , 10u8) ; impl_adc_pin ! (ADC1 , PC1 , 11u8) ; impl_adc_pin ! (ADC1 , PC2 , 12u8) ; impl_adc_pin ! (ADC1 , PC3 , 13u8) ; impl_adc_pin ! (ADC1 , PC4 , 14u8) ; impl_adc_pin ! (ADC1 , PC5 , 15u8) ; impl_adc_pin ! (ADC2 , PA0 , 0u8) ; impl_adc_pin ! (ADC2 , PA1 , 1u8) ; impl_adc_pin ! (ADC2 , PA2 , 2u8) ; impl_adc_pin ! (ADC2 , PA3 , 3u8) ; impl_adc_pin ! (ADC2 , PA4 , 4u8) ; impl_adc_pin ! (ADC2 , PA5 , 5u8) ; impl_adc_pin ! (ADC2 , PA6 , 6u8) ; impl_adc_pin ! (ADC2 , PA7 , 7u8) ; impl_adc_pin ! (ADC2 , PB0 , 8u8) ; impl_adc_pin ! (ADC2 , PB1 , 9u8) ; impl_adc_pin ! (ADC2 , PC0 , 10u8) ; impl_adc_pin ! (ADC2 , PC1 , 11u8) ; impl_adc_pin ! (ADC2 , PC2 , 12u8) ; impl_adc_pin ! (ADC2 , PC3 , 13u8) ; impl_adc_pin ! (ADC2 , PC4 , 14u8) ; impl_adc_pin ! (ADC2 , PC5 , 15u8) ; pin_trait_impl ! (crate :: spi :: CsPin , SPI1 , PA4 , 0u8) ; pin_trait_impl ! (crate :: spi :: SckPin , SPI1 , PA5 , 0u8) ; pin_trait_impl ! (crate :: spi :: MisoPin , SPI1 , PA6 , 0u8) ; pin_trait_impl ! (crate :: spi :: MosiPin , SPI1 , PA7 , 0u8) ; pin_trait_impl ! (crate :: spi :: CsPin , SPI1 , PA15 , 1u8) ; pin_trait_impl ! (crate :: spi :: SckPin , SPI1 , PB3 , 1u8) ; pin_trait_impl ! (crate :: spi :: MisoPin , SPI1 , PB4 , 1u8) ; pin_trait_impl ! (crate :: spi :: MosiPin , SPI1 , PB5 , 1u8) ; pin_trait_impl ! (crate :: i2c :: SclPin , I2C1 , PB6 , 0u8) ; pin_trait_impl ! (crate :: i2c :: SdaPin , I2C1 , PB7 , 0u8) ; pin_trait_impl ! (crate :: i2c :: SclPin , I2C1 , PB8 , 1u8) ; pin_trait_impl ! (crate :: i2c :: SdaPin , I2C1 , PB9 , 1u8) ; pin_trait_impl ! (crate :: usbd :: DmPin , USBD , PA11 , 0u8) ; pin_trait_impl ! (crate :: usbd :: DpPin , USBD , PA12 , 0u8) ; dma_trait_impl ! (crate :: usart :: RxDma , USART1 , { channel : DMA1_CH5 } , ()) ; dma_trait_impl ! (crate :: usart :: TxDma , USART1 , { channel : DMA1_CH4 } , ()) ; dma_trait_impl ! (crate :: usart :: RxDma , USART2 , { channel : DMA1_CH6 } , ()) ; dma_trait_impl ! (crate :: usart :: TxDma , USART2 , { channel : DMA1_CH7 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch3Dma , TIM1 , { channel : DMA1_CH6 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch2Dma , TIM1 , { channel : DMA1_CH3 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch4Dma , TIM1 , { channel : DMA1_CH4 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch1Dma , TIM1 , { channel : DMA1_CH2 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch4Dma , TIM2 , { channel : DMA1_CH7 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch1Dma , TIM2 , { channel : DMA1_CH5 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch2Dma , TIM2 , { channel : DMA1_CH7 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch3Dma , TIM2 , { channel : DMA1_CH1 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch1Dma , TIM3 , { channel : DMA1_CH6 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch3Dma , TIM3 , { channel : DMA1_CH2 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch4Dma , TIM3 , { channel : DMA1_CH3 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch1Dma , TIM4 , { channel : DMA1_CH1 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch3Dma , TIM4 , { channel : DMA1_CH5 } , ()) ; dma_trait_impl ! (crate :: timer :: Ch2Dma , TIM4 , { channel : DMA1_CH4 } , ()) ; dma_trait_impl ! (crate :: spi :: TxDma , SPI1 , { channel : DMA1_CH3 } , ()) ; dma_trait_impl ! (crate :: spi :: RxDma , SPI1 , { channel : DMA1_CH2 } , ()) ; dma_trait_impl ! (crate :: i2c :: RxDma , I2C1 , { channel : DMA1_CH7 } , ()) ; dma_trait_impl ! (crate :: i2c :: TxDma , I2C1 , { channel : DMA1_CH6 } , ()) ; # [allow (non_camel_case_types)] pub mod peripheral_interrupts { pub mod PFIC { } pub mod SYSTICK { } pub mod FLASH { } pub mod EXTI { pub type EXTI0 = crate :: interrupt :: typelevel :: EXTI0 ; pub type EXTI1 = crate :: interrupt :: typelevel :: EXTI1 ; pub type EXTI2 = crate :: interrupt :: typelevel :: EXTI2 ; pub type EXTI3 = crate :: interrupt :: typelevel :: EXTI3 ; pub type EXTI4 = crate :: interrupt :: typelevel :: EXTI4 ; pub type EXTI5 = crate :: interrupt :: typelevel :: EXTI9_5 ; pub type EXTI10 = crate :: interrupt :: typelevel :: EXTI15_10 ; } pub mod RCC { } pub mod DMA1 { pub type CH1 = crate :: interrupt :: typelevel :: DMA1_CHANNEL1 ; pub type CH2 = crate :: interrupt :: typelevel :: DMA1_CHANNEL2 ; pub type CH3 = crate :: interrupt :: typelevel :: DMA1_CHANNEL3 ; pub type CH4 = crate :: interrupt :: typelevel :: DMA1_CHANNEL4 ; pub type CH5 = crate :: interrupt :: typelevel :: DMA1_CHANNEL5 ; pub type CH6 = crate :: interrupt :: typelevel :: DMA1_CHANNEL6 ; pub type CH7 = crate :: interrupt :: typelevel :: DMA1_CHANNEL7 ; pub type CH8 = crate :: interrupt :: typelevel :: DMA1_CHANNEL8 ; } pub mod GPIOA { } pub mod GPIOB { } pub mod GPIOC { } pub mod GPIOD { } pub mod AFIO { } pub mod EXTEND { } pub mod RTC { } pub mod USART1 { pub type GLOBAL = crate :: interrupt :: typelevel :: USART1 ; } pub mod USART2 { pub type GLOBAL = crate :: interrupt :: typelevel :: USART2 ; } pub mod TIM1 { pub type BRK = crate :: interrupt :: typelevel :: TIM1_BRK ; pub type UP = crate :: interrupt :: typelevel :: TIM1_UP ; pub type TRG = crate :: interrupt :: typelevel :: TIM1_TRG_COM ; pub type COM = crate :: interrupt :: typelevel :: TIM1_TRG_COM ; pub type CC = crate :: interrupt :: typelevel :: TIM1_CC ; } pub mod TIM2 { pub type UP = crate :: interrupt :: typelevel :: TIM2 ; pub type TRG = crate :: interrupt :: typelevel :: TIM2 ; pub type CC = crate :: interrupt :: typelevel :: TIM2 ; } pub mod TIM3 { pub type UP = crate :: interrupt :: typelevel :: TIM3 ; pub type TRG = crate :: interrupt :: typelevel :: TIM3 ; pub type CC = crate :: interrupt :: typelevel :: TIM3 ; } pub mod TIM4 { pub type UP = crate :: interrupt :: typelevel :: TIM4 ; pub type TRG = crate :: interrupt :: typelevel :: TIM4 ; pub type CC = crate :: interrupt :: typelevel :: TIM4 ; } pub mod ADC1 { pub type GLOBAL = crate :: interrupt :: typelevel :: ADC ; } pub mod ADC2 { pub type GLOBAL = crate :: interrupt :: typelevel :: ADC ; } pub mod SPI1 { pub type GLOBAL = crate :: interrupt :: typelevel :: SPI1 ; } pub mod I2C1 { pub type ER = crate :: interrupt :: typelevel :: I2C1_ER ; pub type EV = crate :: interrupt :: typelevel :: I2C1_EV ; } pub mod USBD { pub type HP = crate :: interrupt :: typelevel :: USB_HP_CAN1_TX ; pub type LP = crate :: interrupt :: typelevel :: USB_LP_CAN1_RX0 ; pub type WKUP = crate :: interrupt :: typelevel :: USB_WKUP ; } pub mod USBRAM { } pub mod CAN1 { pub type TX = crate :: interrupt :: typelevel :: USB_HP_CAN1_TX ; pub type RX0 = crate :: interrupt :: typelevel :: USB_LP_CAN1_RX0 ; pub type RX1 = crate :: interrupt :: typelevel :: CAN1_RX1 ; pub type SCE = crate :: interrupt :: typelevel :: CAN1_SCE ; } } dma_channel_impl ! (DMA1_CH1 , 0u8) ; dma_channel_impl ! (DMA1_CH2 , 1u8) ; dma_channel_impl ! (DMA1_CH3 , 2u8) ; dma_channel_impl ! (DMA1_CH4 , 3u8) ; dma_channel_impl ! (DMA1_CH5 , 4u8) ; dma_channel_impl ! (DMA1_CH6 , 5u8) ; dma_channel_impl ! (DMA1_CH7 , 6u8) ; dma_channel_impl ! (DMA1_CH8 , 7u8) ; # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL1 () { < crate :: peripherals :: DMA1_CH1 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL2 () { < crate :: peripherals :: DMA1_CH2 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL3 () { < crate :: peripherals :: DMA1_CH3 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL4 () { < crate :: peripherals :: DMA1_CH4 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL5 () { < crate :: peripherals :: DMA1_CH5 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL6 () { < crate :: peripherals :: DMA1_CH6 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL7 () { < crate :: peripherals :: DMA1_CH7 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } # [cfg (feature = "rt")] unsafe(# [qingke_rt :: interrupt]) unsafe fn DMA1_CHANNEL8 () { < crate :: peripherals :: DMA1_CH8 as crate :: dma :: ChannelInterrupt > :: on_irq () ; } pub (crate) const DMA_CHANNELS : & [crate :: dma :: ChannelInfo] = & [crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 0usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 1usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 2usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 3usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 4usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 5usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 6usize , } , crate :: dma :: ChannelInfo { dma : crate :: dma :: DmaInfo :: Dma (crate :: pac :: DMA1) , num : 7usize , } ,] ;
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             +++++++                          +
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no method named `as_raw` found for reference `&Waker` in the current scope
[INFO] [stdout]   --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/embassy-executor-0.6.0/src/raw/waker.rs:53:35
[INFO] [stdout]    |
[INFO] [stdout] 53 |             let raw_waker = waker.as_raw();
[INFO] [stdout]    |                                   ^^^^^^
[INFO] [stdout]    |
[INFO] [stdout] help: there is a method `as_ref` with a similar name
[INFO] [stdout]    |
[INFO] [stdout] 53 -             let raw_waker = waker.as_raw();
[INFO] [stdout] 53 +             let raw_waker = waker.as_ref();
[INFO] [stdout]    |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] For more information about this error, try `rustc --explain E0599`.
[INFO] [stdout] 
[INFO] [stderr] error: could not compile `embassy-executor` (lib) due to 1 previous error
[INFO] [stderr] warning: build failed, waiting for other jobs to finish...
[INFO] [stdout] error[E0787]: the `asm!` macro is not allowed in naked functions
[INFO] [stdout]    --> /opt/rustwide/cargo-home/git/checkouts/ch32-hal-f8ddd79b527ebc9f/82209dd/src/exti.rs:312:5
[INFO] [stdout]     |
[INFO] [stdout] 312 |     #[interrupt]
[INFO] [stdout]     |     ^^^^^^^^^^^^ consider using the `naked_asm!` macro instead
[INFO] [stdout]     |
[INFO] [stdout]     = note: this error originates in the attribute macro `interrupt` (in Nightly builds, run with -Z macro-backtrace for more info)
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0787]: the `asm!` macro is not allowed in naked functions
[INFO] [stdout]    --> /opt/rustwide/cargo-home/git/checkouts/ch32-hal-f8ddd79b527ebc9f/82209dd/src/exti.rs:316:5
[INFO] [stdout]     |
[INFO] [stdout] 316 |     #[interrupt]
[INFO] [stdout]     |     ^^^^^^^^^^^^ consider using the `naked_asm!` macro instead
[INFO] [stdout]     |
[INFO] [stdout]     = note: this error originates in the attribute macro `interrupt` (in Nightly builds, run with -Z macro-backtrace for more info)
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0787]: the `asm!` macro is not allowed in naked functions
[INFO] [stdout]    --> /opt/rustwide/cargo-home/git/checkouts/ch32-hal-f8ddd79b527ebc9f/82209dd/src/exti.rs:320:5
[INFO] [stdout]     |
[INFO] [stdout] 320 |     #[interrupt]
[INFO] [stdout]     |     ^^^^^^^^^^^^ consider using the `naked_asm!` macro instead
[INFO] [stdout]     |
[INFO] [stdout]     = note: this error originates in the attribute macro `interrupt` (in Nightly builds, run with -Z macro-backtrace for more info)
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0787]: the `asm!` macro is not allowed in naked functions
[INFO] [stdout]    --> /opt/rustwide/cargo-home/git/checkouts/ch32-hal-f8ddd79b527ebc9f/82209dd/src/exti.rs:324:5
[INFO] [stdout]     |
[INFO] [stdout] 324 |     #[interrupt]
[INFO] [stdout]     |     ^^^^^^^^^^^^ consider using the `naked_asm!` macro instead
[INFO] [stdout]     |
[INFO] [stdout]     = note: this error originates in the attribute macro `interrupt` (in Nightly builds, run with -Z macro-backtrace for more info)
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0787]: the `asm!` macro is not allowed in naked functions
[INFO] [stdout]    --> /opt/rustwide/cargo-home/git/checkouts/ch32-hal-f8ddd79b527ebc9f/82209dd/src/exti.rs:328:5
[INFO] [stdout]     |
[INFO] [stdout] 328 |     #[interrupt]
[INFO] [stdout]     |     ^^^^^^^^^^^^ consider using the `naked_asm!` macro instead
[INFO] [stdout]     |
[INFO] [stdout]     = note: this error originates in the attribute macro `interrupt` (in Nightly builds, run with -Z macro-backtrace for more info)
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0787]: the `asm!` macro is not allowed in naked functions
[INFO] [stdout]    --> /opt/rustwide/cargo-home/git/checkouts/ch32-hal-f8ddd79b527ebc9f/82209dd/src/exti.rs:332:5
[INFO] [stdout]     |
[INFO] [stdout] 332 |     #[interrupt]
[INFO] [stdout]     |     ^^^^^^^^^^^^ consider using the `naked_asm!` macro instead
[INFO] [stdout]     |
[INFO] [stdout]     = note: this error originates in the attribute macro `interrupt` (in Nightly builds, run with -Z macro-backtrace for more info)
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0787]: the `asm!` macro is not allowed in naked functions
[INFO] [stdout]    --> /opt/rustwide/cargo-home/git/checkouts/ch32-hal-f8ddd79b527ebc9f/82209dd/src/exti.rs:336:5
[INFO] [stdout]     |
[INFO] [stdout] 336 |     #[interrupt]
[INFO] [stdout]     |     ^^^^^^^^^^^^ consider using the `naked_asm!` macro instead
[INFO] [stdout]     |
[INFO] [stdout]     = note: this error originates in the attribute macro `interrupt` (in Nightly builds, run with -Z macro-backtrace for more info)
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0787]: the `asm!` macro is not allowed in naked functions
[INFO] [stdout]   --> /opt/rustwide/cargo-home/git/checkouts/ch32-hal-f8ddd79b527ebc9f/82209dd/src/embassy/time_driver_tim.rs:58:9
[INFO] [stdout]    |
[INFO] [stdout] 58 |         #[interrupt]
[INFO] [stdout]    |         ^^^^^^^^^^^^ consider using the `naked_asm!` macro instead
[INFO] [stdout]    |
[INFO] [stdout]    = note: this error originates in the attribute macro `interrupt` which comes from the expansion of the macro `foreach_interrupt` (in Nightly builds, run with -Z macro-backtrace for more info)
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0787]: the `asm!` macro is not allowed in naked functions
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/ch32-hal-eda383fa759fc47b/out/_generated.rs:1:28128
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...u8) ; # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL1 () { < crate :: peripherals :: DMA1_CH1 as crate :: ...
[INFO] [stdout]   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^ consider using the `naked_asm!` macro instead
[INFO] [stdout]   |
[INFO] [stdout]   = note: this error originates in the attribute macro `qingke_rt::interrupt` (in Nightly builds, run with -Z macro-backtrace for more info)
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0787]: the `asm!` macro is not allowed in naked functions
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/ch32-hal-eda383fa759fc47b/out/_generated.rs:1:28299
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...) ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL2 () { < crate :: peripherals :: DMA1_CH2 as crate :: ...
[INFO] [stdout]   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^ consider using the `naked_asm!` macro instead
[INFO] [stdout]   |
[INFO] [stdout]   = note: this error originates in the attribute macro `qingke_rt::interrupt` (in Nightly builds, run with -Z macro-backtrace for more info)
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0787]: the `asm!` macro is not allowed in naked functions
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/ch32-hal-eda383fa759fc47b/out/_generated.rs:1:28470
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...) ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL3 () { < crate :: peripherals :: DMA1_CH3 as crate :: ...
[INFO] [stdout]   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^ consider using the `naked_asm!` macro instead
[INFO] [stdout]   |
[INFO] [stdout]   = note: this error originates in the attribute macro `qingke_rt::interrupt` (in Nightly builds, run with -Z macro-backtrace for more info)
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0787]: the `asm!` macro is not allowed in naked functions
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/ch32-hal-eda383fa759fc47b/out/_generated.rs:1:28641
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...) ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL4 () { < crate :: peripherals :: DMA1_CH4 as crate :: ...
[INFO] [stdout]   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^ consider using the `naked_asm!` macro instead
[INFO] [stdout]   |
[INFO] [stdout]   = note: this error originates in the attribute macro `qingke_rt::interrupt` (in Nightly builds, run with -Z macro-backtrace for more info)
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0787]: the `asm!` macro is not allowed in naked functions
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/ch32-hal-eda383fa759fc47b/out/_generated.rs:1:28812
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...) ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL5 () { < crate :: peripherals :: DMA1_CH5 as crate :: ...
[INFO] [stdout]   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^ consider using the `naked_asm!` macro instead
[INFO] [stdout]   |
[INFO] [stdout]   = note: this error originates in the attribute macro `qingke_rt::interrupt` (in Nightly builds, run with -Z macro-backtrace for more info)
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0787]: the `asm!` macro is not allowed in naked functions
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/ch32-hal-eda383fa759fc47b/out/_generated.rs:1:28983
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...) ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL6 () { < crate :: peripherals :: DMA1_CH6 as crate :: ...
[INFO] [stdout]   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^ consider using the `naked_asm!` macro instead
[INFO] [stdout]   |
[INFO] [stdout]   = note: this error originates in the attribute macro `qingke_rt::interrupt` (in Nightly builds, run with -Z macro-backtrace for more info)
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0787]: the `asm!` macro is not allowed in naked functions
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/ch32-hal-eda383fa759fc47b/out/_generated.rs:1:29154
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...) ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL7 () { < crate :: peripherals :: DMA1_CH7 as crate :: ...
[INFO] [stdout]   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^ consider using the `naked_asm!` macro instead
[INFO] [stdout]   |
[INFO] [stdout]   = note: this error originates in the attribute macro `qingke_rt::interrupt` (in Nightly builds, run with -Z macro-backtrace for more info)
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0787]: the `asm!` macro is not allowed in naked functions
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/ch32-hal-eda383fa759fc47b/out/_generated.rs:1:29325
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...) ; } # [cfg (feature = "rt")] # [qingke_rt :: interrupt] unsafe fn DMA1_CHANNEL8 () { < crate :: peripherals :: DMA1_CH8 as crate :: ...
[INFO] [stdout]   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^ consider using the `naked_asm!` macro instead
[INFO] [stdout]   |
[INFO] [stdout]   = note: this error originates in the attribute macro `qingke_rt::interrupt` (in Nightly builds, run with -Z macro-backtrace for more info)
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] For more information about this error, try `rustc --explain E0787`.
[INFO] [stdout] 
[INFO] [stderr] error: could not compile `ch32-hal` (lib) due to 32 previous errors
[INFO] running `Command { std: "docker" "inspect" "e91ac083d2a37b877944c95ed130da3b37751458c408618b8904530045781416", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "e91ac083d2a37b877944c95ed130da3b37751458c408618b8904530045781416", kill_on_drop: false }`
[INFO] [stdout] e91ac083d2a37b877944c95ed130da3b37751458c408618b8904530045781416
