diff --git a/.github/workflows/shared-hal.yml b/.github/workflows/shared-hal.yml index ecafdeb..28ef430 100644 --- a/.github/workflows/shared-hal.yml +++ b/.github/workflows/shared-hal.yml @@ -32,8 +32,8 @@ jobs: - uses: dtolnay/rust-toolchain@nightly with: targets: "thumbv7em-none-eabihf, thumbv6m-none-eabi" - - run: RUSTDOCFLAGS="--cfg docsrs --generate-link-to-definition -Z unstable-options" cargo +nightly doc --target thumbv7em-none-eabihf --features "vor4x, defmt" - - run: RUSTDOCFLAGS="--cfg docsrs --generate-link-to-definition -Z unstable-options" cargo +nightly doc --target thumbv6m-none-eabi --features "vor1x, defmt" + - run: RUSTDOCFLAGS="--cfg docsrs --generate-link-to-definition -Z unstable-options" cargo +nightly doc --target thumbv7em-none-eabihf --features "vor4x, defmt" --no-deps + - run: RUSTDOCFLAGS="--cfg docsrs --generate-link-to-definition -Z unstable-options" cargo +nightly doc --target thumbv6m-none-eabi --features "vor1x, defmt" --no-deps clippy: name: Clippy diff --git a/.github/workflows/va108xx.yml b/.github/workflows/va108xx.yml index 00d007f..222503f 100644 --- a/.github/workflows/va108xx.yml +++ b/.github/workflows/va108xx.yml @@ -57,8 +57,8 @@ jobs: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@nightly - run: RUSTDOCFLAGS="--cfg docsrs --generate-link-to-definition -Z unstable-options" cargo +nightly doc -p va108xx --all-features - - run: RUSTDOCFLAGS="--cfg docsrs --generate-link-to-definition -Z unstable-options" cargo +nightly doc -p va108xx-hal --all-features - - run: RUSTDOCFLAGS="--cfg docsrs --generate-link-to-definition -Z unstable-options" cargo +nightly doc -p vorago-reb1 + - run: RUSTDOCFLAGS="--cfg docsrs --generate-link-to-definition -Z unstable-options" cargo +nightly doc -p va108xx-hal --all-features --no-deps + - run: RUSTDOCFLAGS="--cfg docsrs --generate-link-to-definition -Z unstable-options" cargo +nightly doc -p vorago-reb1 --no-deps clippy: name: Clippy diff --git a/.github/workflows/va416xx.yml b/.github/workflows/va416xx.yml index 430464a..bc6a8c6 100644 --- a/.github/workflows/va416xx.yml +++ b/.github/workflows/va416xx.yml @@ -54,9 +54,9 @@ jobs: steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@nightly - - run: RUSTDOCFLAGS="--cfg docsrs --generate-link-to-definition -Z unstable-options" cargo +nightly doc -p vorago-peb1 - - run: RUSTDOCFLAGS="--cfg docsrs --generate-link-to-definition -Z unstable-options" cargo +nightly doc -p va416xx-hal --features va41630 - run: RUSTDOCFLAGS="--cfg docsrs --generate-link-to-definition -Z unstable-options" cargo +nightly doc -p va416xx + - run: RUSTDOCFLAGS="--cfg docsrs --generate-link-to-definition -Z unstable-options" cargo +nightly doc -p va416xx-hal --features va41630 --no-deps + - run: RUSTDOCFLAGS="--cfg docsrs --generate-link-to-definition -Z unstable-options" cargo +nightly doc -p vorago-peb1 --no-deps clippy: name: Clippy diff --git a/justfile b/justfile index c314a6c..8d6b6be 100644 --- a/justfile +++ b/justfile @@ -9,7 +9,7 @@ build-all: build-va108xx build-va416xx check-fmt-all: check-fmt-va108xx check-fmt-va416xx fmt-all: fmt-va108xx fmt-va416xx fmt-shared-hal clippy-all: clippy-va108xx clippy-va416xx clippy-shared-hal -docs-all: docs-va108xx docs-va416xx +docs-all: docs-va108xx docs-va416xx docs-shared-hal clean-all: clean-va108xx clean-va416xx [working-directory: 'va108xx'] @@ -70,14 +70,19 @@ clippy-shared-hal: [working-directory: 'va108xx'] docs-va108xx: RUSTDOCFLAGS="--cfg docsrs --generate-link-to-definition -Z unstable-options" cargo +nightly doc -p va108xx --all-features - RUSTDOCFLAGS="--cfg docsrs --generate-link-to-definition -Z unstable-options" cargo +nightly doc -p va108xx-hal --all-features - RUSTDOCFLAGS="--cfg docsrs --generate-link-to-definition -Z unstable-options" cargo +nightly doc -p vorago-reb1 + RUSTDOCFLAGS="--cfg docsrs --generate-link-to-definition -Z unstable-options" cargo +nightly doc -p va108xx-hal --all-features --no-deps + RUSTDOCFLAGS="--cfg docsrs --generate-link-to-definition -Z unstable-options" cargo +nightly doc -p vorago-reb1 --no-deps [working-directory: 'va416xx'] docs-va416xx: - RUSTDOCFLAGS="--cfg docsrs --generate-link-to-definition -Z unstable-options" cargo +nightly doc -p vorago-peb1 - RUSTDOCFLAGS="--cfg docsrs --generate-link-to-definition -Z unstable-options" cargo +nightly doc -p va416xx-hal --features va41630 RUSTDOCFLAGS="--cfg docsrs --generate-link-to-definition -Z unstable-options" cargo +nightly doc -p va416xx + RUSTDOCFLAGS="--cfg docsrs --generate-link-to-definition -Z unstable-options" cargo +nightly doc -p va416xx-hal --features va41630 --no-deps + RUSTDOCFLAGS="--cfg docsrs --generate-link-to-definition -Z unstable-options" cargo +nightly doc -p vorago-peb1 --no-deps + +[working-directory: 'vorago-shared-hal'] +docs-shared-hal: + RUSTDOCFLAGS="--cfg docsrs --generate-link-to-definition -Z unstable-options" cargo +nightly doc --target thumbv7em-none-eabihf --features "vor4x, defmt" --no-deps + RUSTDOCFLAGS="--cfg docsrs --generate-link-to-definition -Z unstable-options" cargo +nightly doc --target thumbv6m-none-eabi --features "vor1x, defmt" --no-deps [working-directory: 'va108xx'] clean-va108xx: diff --git a/va108xx/va108xx-hal/src/lib.rs b/va108xx/va108xx-hal/src/lib.rs index 5da9b3e..8e44853 100644 --- a/va108xx/va108xx-hal/src/lib.rs +++ b/va108xx/va108xx-hal/src/lib.rs @@ -1,5 +1,14 @@ +//! This is the **H**ardware **A**bstraction **L**ayer (HAL) for the VA108xx MCU family. +//! +//! It is an additional hardware abstraction on top of the +//! [peripheral access API](https://egit.irs.uni-stuttgart.de/rust/vorago-rs/src/branch/main/va108xx/va108xx). +//! +//! It is the result of reading the datasheet for the device and encoding a type-safe layer over the +//! raw PAC. This crate also implements traits specified by the +//! [embedded-hal](https://github.com/rust-embedded/embedded-hal) project, making it compatible with +//! various drivers in the embedded rust ecosystem. #![no_std] -#![cfg_attr(docsrs, feature(doc_auto_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg))] use gpio::Port; pub use va108xx; diff --git a/va108xx/vorago-reb1/src/lib.rs b/va108xx/vorago-reb1/src/lib.rs index 1ccd544..7cc8106 100644 --- a/va108xx/vorago-reb1/src/lib.rs +++ b/va108xx/vorago-reb1/src/lib.rs @@ -1,5 +1,5 @@ #![no_std] -#![cfg_attr(docsrs, feature(doc_auto_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg))] pub mod button; pub mod leds; diff --git a/va416xx/va416xx-hal/src/lib.rs b/va416xx/va416xx-hal/src/lib.rs index e76b5ff..88ffc4b 100644 --- a/va416xx/va416xx-hal/src/lib.rs +++ b/va416xx/va416xx-hal/src/lib.rs @@ -26,7 +26,7 @@ //! [crate::irq_router] module at the very least because that peripheral has confusing and/or //! faulty register reset values which might lead to weird bugs and glitches. #![no_std] -#![cfg_attr(docsrs, feature(doc_auto_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg))] #[cfg(feature = "alloc")] extern crate alloc; #[cfg(test)] diff --git a/va416xx/va416xx/src/lib.rs b/va416xx/va416xx/src/lib.rs index 6b38971..d27357b 100644 --- a/va416xx/va416xx/src/lib.rs +++ b/va416xx/va416xx/src/lib.rs @@ -2,7 +2,7 @@ #![allow(non_camel_case_types)] #![allow(non_snake_case)] #![no_std] -#![cfg_attr(docsrs, feature(doc_auto_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg))] #[doc = r"Number available in the NVIC for configuring priority"] pub const NVIC_PRIO_BITS: u8 = 4; #[cfg(feature = "rt")] diff --git a/va416xx/vorago-peb1/src/lib.rs b/va416xx/vorago-peb1/src/lib.rs index ab485df..1ca6081 100644 --- a/va416xx/vorago-peb1/src/lib.rs +++ b/va416xx/vorago-peb1/src/lib.rs @@ -1,6 +1,6 @@ //! Board support crate for the VORAGO PEB1 board. #![no_std] -#![cfg_attr(docsrs, feature(doc_auto_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg))] pub use lis2dh12;