Registry / other / stm32f1xx-hal

stm32f1xx-hal

JSON →
library0.11.0rscratesunverified

Hardware Abstraction Layer for the STM32F1xx family of microcontrollers.

# Cargo.toml [dependencies] stm32f1xx-hal = "0.11.0"
INSTALL
IMPORT
SIG · STM32F1XX-HAL
S
stm32f1xx-hal
otherrustv0.11.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

stm32f1xx_hal
use stm32f1xx_hal::prelude::*;

Blinking an LED on PC13 (typical on STM32F1 blue pill).

#![no_std] #![no_main] use stm32f1xx_hal::prelude::*; use cortex_m_rt::entry; #[entry] fn main() -> ! { let dp = stm32f1xx_hal::stm32::Peripherals::take().unwrap(); let mut rcc = dp.RCC.constrain(); let mut gpioc = dp.GPIOC.split(&mut rcc.apb2); gpioc.pc13.into_push_pull_output(&mut gpioc.crh); loop {} }
Debug
Known issues
gotchaRequires specific target and memory.x file.
fix
Add a memory.x linker script and compile for thumbv7m-none-eabi target.
affects: >=0.10.0
Upgrade
Version history
0.11.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
stm32f1xx-hal — cargo add stm32f1xx-hal · libregistry