67 lines
2.7 KiB
Raw Normal View History

2019-01-04 18:44:19 +01:00
[_stm32f0xx-hal_]( contains a hardware abstraction on top of the peripheral access API for the STMicro STM32F0xx family of microcontrollers.
2019-01-14 06:15:28 +01:00
This crate replaces the [stm32f042-hal]( by a more ubiquitous version suitable for additional families. The idea behind this crate is to gloss over the slight differences in the various peripherals available on those MCUs so a HAL can be written for all chips in that same family without having to cut and paste crates for every single model.
This crate relies on Adam Greig's fantastic [stm32f0]( crate to provide appropriate register definitions, and implements a partial set of the [embedded-hal]( traits. Some of the implementation was shamelessly adapted from the [stm32f103xx-hal]( crate by Jorge Aparicio.
Collaboration on this crate is highly welcome, as are pull requests!
Supported Configurations
* __stm32f030__ (stm32f030x4, stm32f030x6, stm32f030x8, stm32f030xc)
* __stm32f031__
2019-01-14 06:15:28 +01:00
* __stm32f038__
* __stm32f042__
2019-01-14 06:15:28 +01:00
* __stm32f048__
* __stm32f051__
2019-01-14 06:15:28 +01:00
* __stm32f058__
* __stm32f070__ (stm32f070x6, stm32f070xb)
* __stm32f071__
* __stm32f072__
2019-01-14 06:15:28 +01:00
* __stm32f078__
* __stm32f091__
2019-01-14 06:15:28 +01:00
* __stm32f098__
Getting Started
The `examples` folder contains several example programs. To compile them, one must specify the target device as cargo feature:
$ cargo build --features=stm32f030xc
To use stm32f0xx-hal as a dependency in a standalone project the target device feature must be specified in the `Cargo.toml` file:
cortex-m = "0.6.0"
cortex-m-rt = "0.6.8"
stm32f0xx-hal = {version = "0.14.1", features = ["stm32f030xc"]}
If you are unfamiliar with embedded development using Rust, there are a number of fantastic resources available to help.
- [Embedded Rust Documentation](
- [The Embedded Rust Book](
- [Rust Embedded FAQ](
- [rust-embedded/awesome-embedded-rust](
See [](
0-Clause BSD License, see [LICENSE-0BSD.txt](LICENSE-0BSD.txt) for more details.