1 unstable release
0.1.0 | Sep 27, 2024 |
---|
#1567 in Embedded development
58 downloads per month
Used in n32g4xx-hal
17MB
355K
SLoC
n32g4
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.
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.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
Supported Devices
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 |