#api-access

no-std py32f0

Device support crates for PY32F0 devices

5 unstable releases

0.2.1 Jan 29, 2025
0.2.0 Dec 29, 2024
0.1.1 Oct 10, 2024
0.1.0 Sep 27, 2024
0.0.1 Jun 10, 2023

#120 in Embedded development

Download history 4/week @ 2024-11-18 4/week @ 2024-12-02 15/week @ 2024-12-09 55/week @ 2024-12-23 66/week @ 2024-12-30 8/week @ 2025-01-06 2/week @ 2025-01-13 142/week @ 2025-01-27 27/week @ 2025-02-03 7/week @ 2025-02-10

176 downloads per month
Used in py32f0xx-hal

MIT/Apache

8.5MB
220K SLoC

py32f0

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.

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.py32f0]
version = "0.2.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:

use py32f0::py32f002a;

let mut peripherals = py32f002a::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.28.0/svd2rust/#peripheral-api

Supported Devices

Module Devices Links
py32f002a PY32F002A PY32F002A Reference manual, puyasemi.com
py32f002b PY32F002B PY32F002B Reference manual, puyasemi.com
py32f003 PY32F003 PY32F003 Reference manual, puyasemi.com
py32f030 PY32F030 PY32F030 Reference manual, puyasemi.com
py32f040 PY32F040 PY32F040 Reference manual, puyasemi.com

Dependencies