py32f002a-pac

Crates.iopy32f002a-pac
lib.rspy32f002a-pac
version0.1.0
sourcesrc
created_at2023-05-29 12:24:29.519813
updated_at2023-05-29 12:24:29.519813
descriptionPeripheral access crate for PY32F002Ax (generated by svd2rust)
homepage
repositoryhttps://github.com/creatoy/py32f002a-pac
max_upload_size
id877082
size1,107,960
(creatoy)

documentation

https://docs.rs/py32f002a-pac

README

py32f002a-pac

PY32F002A pac generated by svd2rust follow the doc.

Usage

In your Cargo.toml:

[dependencies.py32f002a-pac]
version = "0.1.0"
features=["rt", "critical-section"]

In your code:

use py32f002a_pac as pac;

let dp = pac::Peripherals::take().unwrap();
dp.RCC.iopenr.write(|w| w.gpioaen().set_bit());

let gpioa = dp.GPIOA;
gpioa.otyper.write(|w| w.ot5().clear_bit());
gpioa.odr.write(|w| w.od5().set_bit());

For more api info read the doc

Commit count: 1

cargo fmt