From adb024bdbe49ba77b3f30af016c0c2ee184f456b Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Fri, 26 Jan 2024 14:23:51 +0100 Subject: [PATCH] usb-dfu: add docs metadata. --- .github/ci/doc.sh | 2 +- embassy-usb-dfu/Cargo.toml | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/ci/doc.sh b/.github/ci/doc.sh index d0aff1e43..7112d8aaa 100755 --- a/.github/ci/doc.sh +++ b/.github/ci/doc.sh @@ -1,7 +1,7 @@ #!/bin/bash ## on push branch=main -set -euo pipefail +set -euxo pipefail export RUSTUP_HOME=/ci/cache/rustup export CARGO_HOME=/ci/cache/cargo diff --git a/embassy-usb-dfu/Cargo.toml b/embassy-usb-dfu/Cargo.toml index 1ca5fea42..4d6ffeb5f 100644 --- a/embassy-usb-dfu/Cargo.toml +++ b/embassy-usb-dfu/Cargo.toml @@ -12,14 +12,24 @@ categories = [ "asynchronous" ] -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +[package.metadata.embassy_docs] +src_base = "https://github.com/embassy-rs/embassy/blob/embassy-usb-v$VERSION/embassy-usb-dfu/src/" +src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-usb-dfu/src/" +features = ["defmt", "cortex-m"] +target = "thumbv7em-none-eabi" +flavors = [ + { name = "dfu", features = [ "dfu" ] }, + { name = "application", features = [ "application" ] }, +] + +[package.metadata.docs.rs] +features = ["defmt", "cortex-m", "dfu"] [dependencies] bitflags = "2.4.1" cortex-m = { version = "0.7.7", features = ["inline-asm"], optional = true } defmt = { version = "0.3.5", optional = true } embassy-boot = { version = "0.2.0", path = "../embassy-boot" } -# embassy-embedded-hal = { version = "0.1.0", path = "../embassy-embedded-hal" } embassy-futures = { version = "0.1.1", path = "../embassy-futures" } embassy-sync = { version = "0.5.0", path = "../embassy-sync" } embassy-time = { version = "0.3.0", path = "../embassy-time" }