This crate provides an autogenerated API for access to PY32F0 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.
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:
toml
[dependencies.py32f0]
version = "0.0.1"
features = ["py32f002a"]
The rt
feature is enabled by default and brings in support for cortex-m-rt
.
To disable, specify default-features = false
in Cargo.toml
.
In your code:
```rust use py32f0::py32f002a;
let mut peripherals = py32f002a::Peripherals::take().unwrap(); let gpioa = &peripherals.GPIOA; gpioa.odr.modify(|, w| w.odr0().setbit()); ```
For full details on the autogenerated API, please see: https://docs.rs/svd2rust/0.28.0/svd2rust/#peripheral-api
| Module | Devices | Links | |:------:|:-------:|:-----:| | py32f00x | PY32F002A, PY32F003 | PY32 mcu docs, puyasemi.com | | py32f0x0 | PY32F030 | PY32 mcu docs, puyasemi.com |