#api-access #svd2rust #ht32

no-std ht32f1xxxx

Device support crates for HT32F1XXXX devices

1 unstable release

0.1.0 May 26, 2020

#1005 in Embedded development

MIT/Apache

10MB
339K SLoC

IS THIS THE CRATE I AM SEARCHING FOR

Note that Holtek has 2 chip naming regulations, one with 4 digits, the other with 5. Crates that are generated for 4 digits ones have a naming scheme like HT32F1yyy, the ones for 5 digits HT32F1xxxx. You should make sure this is the crate you are searching for.

ht32f1xxxx

This crate provides an autogenerated API for access to HT32F1XXXX 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.ht32f1xxxx]
version = "0.1.0"
features = ["ht32f12345", "rt"]

The rt feature is optional and brings in support for cortex-m-rt.

In your code:

use ht32f1xxxx::ht32f12345;

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

Supported Devices

Module Devices Links
ht32f12345 TODO TODO, st.com
ht32f12364 TODO TODO, st.com
ht32f12365_66 TODO TODO, st.com

Dependencies

~0.8–1MB
~17K SLoC