# 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. [svd2rust]: https://github.com/rust-embedded/svd2rust [main repo]: https://github.com/creatoy/py32-rs [documentation]: https://docs.rs/py32f0/latest/py32f0/ ## 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: ```toml [dependencies.py32f0] version = "0.1.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().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](https://www.puyasemi.com/download_path/%E7%94%A8%E6%88%B7%E6%89%8B%E5%86%8C/MCU%20%E5%BE%AE%E5%A4%84%E7%90%86%E5%99%A8/PY32F002A%20Reference%20manual%20v1.0_EN.pdf), [puyasemi.com](https://www.puyasemi.com/py32f002axilie629.html?tag=16#common) | | py32f002b | PY32F002B | [PY32F002B Reference manual](https://www.puyasemi.com/download_path/%E7%94%A8%E6%88%B7%E6%89%8B%E5%86%8C/MCU%20%E5%BE%AE%E5%A4%84%E7%90%86%E5%99%A8/PY32F002B%20Reference%20manual%20v1.0_EN.pdf), [puyasemi.com](https://www.puyasemi.com/py32f002bxilie429.html?tag=16#common) | | py32f003 | PY32F003 | [PY32F003 Reference manual](https://www.puyasemi.com/download_path/%E7%94%A8%E6%88%B7%E6%89%8B%E5%86%8C/MCU%20%E5%BE%AE%E5%A4%84%E7%90%86%E5%99%A8/PY32F003%20Reference%20manual%20v1.1_EN.pdf), [puyasemi.com](https://www.puyasemi.com/py32f003xilie.html?tag=16#common) | | py32f030 | PY32F030 | [PY32F030 Reference manual](https://www.puyasemi.com/download_path/%E7%94%A8%E6%88%B7%E6%89%8B%E5%86%8C/MCU%20%E5%BE%AE%E5%A4%84%E7%90%86%E5%99%A8/PY32F030%20Reference%20manual%20v1.3_EN.pdf), [puyasemi.com](https://www.puyasemi.com/py32f030xilie.html?tag=15#common) |