From be58c685c4226bf42df1df870d2b8b09bf848cde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Buga?= Date: Wed, 6 Nov 2024 10:00:52 +0100 Subject: [PATCH] Link to the chapter --- esp-hal/src/gpio/mod.rs | 3 +-- esp-hal/src/macros.rs | 9 +++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/esp-hal/src/gpio/mod.rs b/esp-hal/src/gpio/mod.rs index 76479d1e89..4186dc4d71 100644 --- a/esp-hal/src/gpio/mod.rs +++ b/esp-hal/src/gpio/mod.rs @@ -233,8 +233,7 @@ pub enum DriveStrength { /// /// The different variants correspond to different functionality depending on /// the chip and the specific pin. For more information, refer to your chip's -#[doc = crate::trm_markdown_link!()] -/// . +#[doc = crate::trm_markdown_link!("iomuxgpio")] #[derive(Debug, Eq, PartialEq, Copy, Clone)] #[cfg_attr(feature = "defmt", derive(defmt::Format))] pub enum AlternateFunction { diff --git a/esp-hal/src/macros.rs b/esp-hal/src/macros.rs index a90b8c0094..c22b5a44a6 100644 --- a/esp-hal/src/macros.rs +++ b/esp-hal/src/macros.rs @@ -32,6 +32,15 @@ macro_rules! trm_markdown_link { () => { concat!("[Technical Reference Manual](", $crate::trm_link!(), ")") }; + ($anchor:literal) => { + concat!( + "[Technical Reference Manual](", + $crate::trm_link!(), + "#", + $anchor, + ")" + ) + }; } #[doc(hidden)]