From bba15449427b9d0181a0fd1ad46ee29b2d597110 Mon Sep 17 00:00:00 2001 From: Embassy CI Date: Fri, 10 Jan 2025 17:28:37 +0000 Subject: [PATCH] Generated from stm32-data 9477a073d73f6160fba6a05be7f865c58ba5cf13 --- stm32-metapac/Cargo.toml | 4 +++- stm32-metapac/README.md | 44 ++++++++++++++++++++++++++++++++++++++++ stm32-metapac/src/lib.rs | 5 +++++ 3 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 stm32-metapac/README.md diff --git a/stm32-metapac/Cargo.toml b/stm32-metapac/Cargo.toml index 0bbc77e511..92e6c451fc 100644 --- a/stm32-metapac/Cargo.toml +++ b/stm32-metapac/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "stm32-metapac" -version = "15.0.0" +version = "16.0.0" edition = "2021" license = "MIT OR Apache-2.0" repository = "https://github.com/embassy-rs/stm32-data" @@ -11,12 +11,14 @@ include = [ "**/*.rs", "**/*.x", "Cargo.toml", + "README.md", ] [package.metadata.docs.rs] features = ["stm32h755zi-cm7", "pac", "metadata"] default-target = "thumbv7em-none-eabihf" targets = [] +rustdoc-args = ["--cfg", "docsrs"] [package.metadata.embassy_docs] features = ["pac", "metadata"] diff --git a/stm32-metapac/README.md b/stm32-metapac/README.md new file mode 100644 index 0000000000..6af7401ab1 --- /dev/null +++ b/stm32-metapac/README.md @@ -0,0 +1,44 @@ +# stm32-metapac + +This is a [Peripheral Access Crate](https://rust-embedded.github.io/book/start/registers.html) for STMicroelectronics STM32 microcontrollers. + +This crate has been automatically generated based on data in the [`stm32-data` project](https://github.com/embassy-rs/stm32-data), and is used for the [`embassy-stm32`](github.com/embassy-rs/embassy/) Rust Hardware Abstraction Layer (HAL) for the STM32 microcontrollers. + +## Metadata + +This PAC additionally exports "metadata" about the chips. To use it, enable the `metadata` feature and access it at `stm32_metapac::METADATA`. It is intended to be consumed from `build.rs` scripts or code-generation tools running on PCs, not from the firmware itself. + +The metadata includes the following info: + +- Memory maps for RAM, flash. +- Interrupts +- GPIO Alternate Function mappings +- Interrupt -> peripheral mappings +- DMA channel -> peripehral mappings +- RCC clock tree information for each peripheral (what clocks does it receive, which RCC registers to poke to enable, reset, or choose the clock) + +## Supported chips + +This PAC aims to support all STM32 chip families: + +- STM32F0 +- STM32F1 +- STM32F2 +- STM32F3 +- STM32F4 +- STM32F7 +- STM32C0 +- STM32G0 +- STM32G4 +- STM32H5 +- STM32H7 +- STM32H7RS +- STM32L0 +- STM32L1 +- STM32L4 +- STM32L5 +- STM32U0 +- STM32U5 +- STM32WB +- STM32WBA +- STM32WL diff --git a/stm32-metapac/src/lib.rs b/stm32-metapac/src/lib.rs index e3894664b1..3e5ce6e58c 100644 --- a/stm32-metapac/src/lib.rs +++ b/stm32-metapac/src/lib.rs @@ -3,6 +3,11 @@ #![allow(unused)] #![allow(non_camel_case_types)] #![doc(html_no_source)] +#![cfg_attr( + docsrs, + doc = "

You might want to browse the `embassy-nrf` documentation on the Embassy website instead.

The documentation here on `docs.rs` is built for a single chip only (stm32h755zi-cm7 in particular), while on the Embassy website you can pick your exact chip from the top menu. Available peripherals and their APIs change depending on the chip.

\n\n" +)] +#![doc = include_str!("../README.md")] pub mod common;