diff options
| author | Dario Nieuwenhuis <[email protected]> | 2024-01-11 23:43:17 +0100 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2024-01-11 23:43:17 +0100 |
| commit | 9f6517e408f3a4b0a3fb00387a99deade55d6528 (patch) | |
| tree | 3047442f625ae2384ed26fc3c5373ee2bdee8a4d | |
| parent | 53049943639d4493a49b0de408c653a0124ca61e (diff) | |
stm32,nrf: add warning on docs.rs directing the user to docs.embassy.dev.
| -rw-r--r-- | embassy-nrf/Cargo.toml | 1 | ||||
| -rw-r--r-- | embassy-nrf/src/lib.rs | 4 | ||||
| -rw-r--r-- | embassy-stm32/Cargo.toml | 1 | ||||
| -rw-r--r-- | embassy-stm32/src/lib.rs | 4 |
4 files changed, 10 insertions, 0 deletions
diff --git a/embassy-nrf/Cargo.toml b/embassy-nrf/Cargo.toml index 712cfb56f..39b4cc598 100644 --- a/embassy-nrf/Cargo.toml +++ b/embassy-nrf/Cargo.toml | |||
| @@ -17,6 +17,7 @@ flavors = [ | |||
| 17 | 17 | ||
| 18 | [package.metadata.docs.rs] | 18 | [package.metadata.docs.rs] |
| 19 | features = ["nrf52840", "time", "defmt", "unstable-pac", "gpiote", "time-driver-rtc1"] | 19 | features = ["nrf52840", "time", "defmt", "unstable-pac", "gpiote", "time-driver-rtc1"] |
| 20 | rustdoc-args = ["--cfg", "docsrs"] | ||
| 20 | 21 | ||
| 21 | [features] | 22 | [features] |
| 22 | default = ["rt"] | 23 | default = ["rt"] |
diff --git a/embassy-nrf/src/lib.rs b/embassy-nrf/src/lib.rs index 1510b7265..d9c92a76d 100644 --- a/embassy-nrf/src/lib.rs +++ b/embassy-nrf/src/lib.rs | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | #![no_std] | 1 | #![no_std] |
| 2 | #![allow(async_fn_in_trait)] | 2 | #![allow(async_fn_in_trait)] |
| 3 | #![cfg_attr( | ||
| 4 | docsrs, | ||
| 5 | doc = "<div style='padding:30px;background:#810;color:#fff;text-align:center;'><p>You might want to <a href='https://docs.embassy.dev/embassy-nrf'>browse the `embassy-nrf` documentation on the Embassy website</a> instead.</p><p>The documentation here on `docs.rs` is built for a single chip only (nRF52840 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.</p></div>\n\n" | ||
| 6 | )] | ||
| 3 | #![doc = include_str!("../README.md")] | 7 | #![doc = include_str!("../README.md")] |
| 4 | #![warn(missing_docs)] | 8 | #![warn(missing_docs)] |
| 5 | 9 | ||
diff --git a/embassy-stm32/Cargo.toml b/embassy-stm32/Cargo.toml index 98292af79..3b9f07e49 100644 --- a/embassy-stm32/Cargo.toml +++ b/embassy-stm32/Cargo.toml | |||
| @@ -33,6 +33,7 @@ flavors = [ | |||
| 33 | 33 | ||
| 34 | [package.metadata.docs.rs] | 34 | [package.metadata.docs.rs] |
| 35 | features = ["defmt", "unstable-pac", "exti", "time-driver-any", "time", "stm32h755zi-cm7"] | 35 | features = ["defmt", "unstable-pac", "exti", "time-driver-any", "time", "stm32h755zi-cm7"] |
| 36 | rustdoc-args = ["--cfg", "docsrs"] | ||
| 36 | 37 | ||
| 37 | [dependencies] | 38 | [dependencies] |
| 38 | embassy-sync = { version = "0.5.0", path = "../embassy-sync" } | 39 | embassy-sync = { version = "0.5.0", path = "../embassy-sync" } |
diff --git a/embassy-stm32/src/lib.rs b/embassy-stm32/src/lib.rs index 18871e83b..a465fccd8 100644 --- a/embassy-stm32/src/lib.rs +++ b/embassy-stm32/src/lib.rs | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | #![cfg_attr(not(test), no_std)] | 1 | #![cfg_attr(not(test), no_std)] |
| 2 | #![allow(async_fn_in_trait)] | 2 | #![allow(async_fn_in_trait)] |
| 3 | #![cfg_attr( | ||
| 4 | docsrs, | ||
| 5 | doc = "<div style='padding:30px;background:#810;color:#fff;text-align:center;'><p>You might want to <a href='https://docs.embassy.dev/embassy-stm32'>browse the `embassy-stm32` documentation on the Embassy website</a> instead.</p><p>The documentation here on `docs.rs` is built for a single chip only (STM32H755 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.</p></div>\n\n" | ||
| 6 | )] | ||
| 3 | #![doc = include_str!("../README.md")] | 7 | #![doc = include_str!("../README.md")] |
| 4 | #![warn(missing_docs)] | 8 | #![warn(missing_docs)] |
| 5 | 9 | ||
