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)]