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.
This crate provides an autogenerated API for access to HT32F5XXXX 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:
toml
[dependencies.ht32f5xxxx]
version = "0.1.0"
features = ["ht32f50220_30", "rt"]
The rt
feature is optional and brings in support for cortex-m-rt
.
In your code:
```rust use ht32f5xxxx::ht32f50220_30;
let mut peripherals = ht32f5022030::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
| Module | Devices | Links | |:------:|:-------:|:-----:| | ht32f5022030 | TODO | TODO, st.com | | ht32f5023141 | TODO | TODO, st.com | | ht32f50343 | TODO | TODO, st.com | | ht32f52142 | TODO | TODO, st.com | | ht32f5222030 | TODO | TODO, st.com | | ht32f5223141 | TODO | TODO, st.com | | ht32f5224353 | TODO | TODO, st.com | | ht32f5233141 | TODO | TODO, st.com | | ht32f5234252 | TODO | TODO, st.com | | ht32f5234454 | TODO | TODO, st.com | | ht32f5235767 | TODO | TODO, st.com | | ht32f5733141 | TODO | TODO, st.com | | ht32f57342_52 | TODO | TODO, st.com | | ht32f59041 | TODO | TODO, st.com | | ht32f59741 | TODO | TODO, st.com |