Crates.io | n32g4 |
lib.rs | n32g4 |
version | 0.1.0 |
source | src |
created_at | 2024-09-27 05:08:38.59564 |
updated_at | 2024-09-27 05:08:38.59564 |
description | Device support crate for N32G4 devices |
homepage | |
repository | https://github.com/guineawheek/n32g4-rs |
max_upload_size | |
id | 1388249 |
size | 17,187,360 |
This crate provides an autogenerated API for access to Nations Technologies N32G4 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:
[dependencies.n32g4]
version = "0.1.0"
features = ["n32g401", "rt"]
The rt
feature is optional and brings in support for cortex-m-rt
.
In your code:
use n32g4::n32g401;
let mut peripherals = n32g401::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.31.5/svd2rust/#peripheral-api
Module | Devices | Links |
---|---|---|
n32g401 | N32G401 | N32G401 |
n32g430 | N32G430 | N32G430 |
n32g432 | N32G432 | N32G432 |
n32g435 | N32G435 | N32G435 |
n32g4fr | N32G4FR | N32G4FR |
n32g451 | N32G451 | N32G451 |
n32g452 | N32G452 | N32G452 |
n32g457 | N32G457 | N32G457 |