| Crates.io | hpm-metapac |
| lib.rs | hpm-metapac |
| version | 0.0.5 |
| created_at | 2024-03-12 13:15:49.73154+00 |
| updated_at | 2024-09-19 16:51:08.775728+00 |
| description | Peripheral Access Crate (PAC) for all HPM's MCU chips, including metadata. |
| homepage | https://github.com/hpmico/hpm-data |
| repository | https://github.com/hpmicro/hpm-data |
| max_upload_size | |
| id | 1170617 |
| size | 35,245,451 |
The structured MCU DB of HPM MCUs. The home of hpm-metapac.
All PRs and Issues are handled in hpmicro/hpm-data.
hpm-metapac is generated from this repo. For each commit(or push) of hpm-data, it's pushed to https://github.com/hpmicro-rs/hpm-metapac,
with a tag of hpm-data-<commit-hash>.
hpm-metapac crate has a metadata feature, when enabled, it will provide the basic metadata of the currrent MCUCORE_LOCAL for Non-External InterruptsSYSCTL.CLOCK, under hpm_metapac::clocks::hpm_metapac::resources::IOC, under hpm_metapac::pins::FUNC_CTL), under hpm_metapac::iomux::hpm_metapac::trgmmux::[dependencies]
hpm-metapac = { version = "0.0.4", git = "https://github.com/hpmicro-rs/hpm-metapac.git", tag = "hpm-data-d8c87c6a676818ff6abd3b7ae54a1a7612cc8534", features = ["hpm5361"] }
# If you want to use the metadata feature in build.rs
[build-dependencies]
hpm-metapac = { version = "0.0.4", git = "https://github.com/hpmicro-rs/hpm-metapac.git", tag = "hpm-data-d8c87c6a676818ff6abd3b7ae54a1a7612cc8534", default-features = false, features = [
"metadata",
"hpm5361",
] }
A simple example to configure pin PA25 for PWM1_P1:
use hpm_metapac as pac;
use pac::{iomux, pins};
pac::IOC
.pad(pins::PA25)
.func_ctl()
.modify(|w| w.set_alt_select(iomux::IOC_PA25_FUNC_CTL_PWM1_P_1));
To get a local build of hpm-metapac, you can use the following commands:
./d download-all
./d gen
Now you have a local build of hpm-metapac in the build/hpm-metapac directory.
[dependencies]
hpm-metapac = { path = "path/to/hpm-data/build/hpm-metapac", features = ["hpm5361"] }
(in order of release date)
As of 2024-09-19, this project is transferred from andelf to hpmicro.