tree: b89bced0132560cbbb614d9139f3f9cc7c8ead47 [path history] [tgz]
  1. src/
  2. 0-negate.patch
  3. build.rs
  4. Cargo.lock
  5. Cargo.toml
  6. Cargo.toml.orig
  7. perf-config.json
  8. README.md
src/tools/rustc-perf/collector/compile-benchmarks/stm32f4-0.14.0/README.md

stm32f4

This crate provides an autogenerated API for access to STM32F4 peripherals. The API is generated using svd2rust with patched svd files containing extensive type-safe support. For more information please see the main repo.

Refer to the documentation for full details.

Usage

Each device supported by this crate is behind a feature gate so that you only compile the device(s) you want. To use, in your Cargo.toml:

[dependencies.stm32f4]
version = "0.14.0"
features = ["stm32f401", "rt"]

The rt feature is optional and brings in support for cortex-m-rt.

In your code:

use stm32f4::stm32f401;

let mut peripherals = stm32f401::Peripherals::take().unwrap();
let gpioa = &peripherals.GPIOA;
gpioa.odr.modify(|_, w| w.odr0().set_bit());

For full details on the autogenerated API, please see: https://docs.rs/svd2rust/0.19.0/svd2rust/#peripheral-api

Supported Devices

ModuleDevicesLinks
stm32f401STM32F401RM0368, st.com
stm32f405STM32F405, STM32F415RM0090, st.com
stm32f407STM32F407, STM32F417RM0090, st.com
stm32f410STM32F410RM0401, st.com
stm32f411STM32F411RM0383, st.com
stm32f412STM32F412RM0402, st.com
stm32f413STM32F413, STM32F423RM0430, st.com
stm32f427STM32F427, STM32F437RM0090, st.com
stm32f429STM32F429, STM32F439RM0090, st.com
stm32f446STM32F446RM0390, st.com
stm32f469STM32F469, STM32F479RM0386, st.com