Skip to content

Commit c99c032

Browse files
00xcIsaacWoods
andauthored
acpi: fix doc warnings and add missing links (#231)
When generating the documentation, cargo doc would emit some warnings regarding redundant and broken links, so fix them. Also add some convenient links which were missing. Co-authored-by: Isaac Woods <[email protected]>
1 parent 36e9732 commit c99c032

File tree

1 file changed

+17
-20
lines changed

1 file changed

+17
-20
lines changed

Diff for: acpi/src/lib.rs

+17-20
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,27 @@
2020
//! default configuration of the crate.
2121
//!
2222
//! ### Usage
23-
//! To use the library, you will need to provide an implementation of the `AcpiHandler` trait, which allows the
23+
//! To use the library, you will need to provide an implementation of the [`AcpiHandler`] trait, which allows the
2424
//! library to make requests such as mapping a particular region of physical memory into the virtual address space.
2525
//!
26-
//! You then need to construct an instance of `AcpiTables`, which can be done in a few ways depending on how much
26+
//! You then need to construct an instance of [`AcpiTables`], which can be done in a few ways depending on how much
2727
//! information you have:
28-
//! * Use `AcpiTables::from_rsdp` if you have the physical address of the RSDP
29-
//! * Use `AcpiTables::from_rsdt` if you have the physical address of the RSDT/XSDT
30-
//! * Use `AcpiTables::search_for_rsdp_bios` if you don't have the address of either, but **you know you are
28+
//! * Use [`AcpiTables::from_rsdp`] if you have the physical address of the RSDP
29+
//! * Use [`AcpiTables::from_rsdt`] if you have the physical address of the RSDT/XSDT
30+
//! * Use [`AcpiTables::search_for_rsdp_bios`] if you don't have the address of either, but **you know you are
3131
//! running on BIOS, not UEFI**
3232
//!
3333
//! `AcpiTables` stores the addresses of all of the tables detected on a platform. The SDTs are parsed by this
3434
//! library, or can be accessed directly with `from_sdt`, while the `DSDT` and any `SSDTs` should be parsed with
3535
//! `aml`.
3636
//!
3737
//! To gather information out of the static tables, a few of the types you should take a look at are:
38-
//! - [`PlatformInfo`](crate::platform::PlatformInfo) parses the FADT and MADT to create a nice view of the
39-
//! processor topology and interrupt controllers on `x86_64`, and the interrupt controllers on other platforms.
40-
//! `AcpiTables::platform_info` is a convenience method for constructing a `PlatformInfo`.
41-
//! - [`HpetInfo`](crate::hpet::HpetInfo) parses the HPET table and tells you how to configure the High
42-
//! Precision Event Timer.
43-
//! - [`PciConfigRegions`](crate::mcfg::PciConfigRegions) parses the MCFG and tells you how PCIe configuration
44-
//! space is mapped into physical memory.
38+
//! - [`PlatformInfo`] parses the FADT and MADT to create a nice view of the processor topology and interrupt
39+
//! controllers on `x86_64`, and the interrupt controllers on other platforms.
40+
//! [`AcpiTables::platform_info`] is a convenience method for constructing a `PlatformInfo`.
41+
//! - [`HpetInfo`] parses the HPET table and tells you how to configure the High Precision Event Timer.
42+
//! - [`PciConfigRegions`] parses the MCFG and tells you how PCIe configuration space is mapped into physical
43+
//! memory.
4544
4645
/*
4746
* Contributing notes (you may find these useful if you're new to contributing to the library):
@@ -212,7 +211,7 @@ where
212211
}
213212

214213
/// Search for the RSDP on a BIOS platform. This accesses BIOS-specific memory locations and will probably not
215-
/// work on UEFI platforms. See [Rsdp::search_for_rsdp_bios](rsdp_search::Rsdp::search_for_rsdp_bios) for
214+
/// work on UEFI platforms. See [`Rsdp::search_for_on_bios`] for details.
216215
/// details.
217216
///
218217
/// ### Safety
@@ -365,19 +364,17 @@ where
365364
SsdtIterator { tables_phys_ptrs: self.tables_phys_ptrs(), handler: self.handler.clone() }
366365
}
367366

368-
/// Convenience method for contructing a [`PlatformInfo`](crate::platform::PlatformInfo). This is one of the
369-
/// first things you should usually do with an `AcpiTables`, and allows to collect helpful information about
370-
/// the platform from the ACPI tables.
367+
/// Convenience method for contructing a [`PlatformInfo`]. This is one of the first things you should usually do
368+
/// with an `AcpiTables`, and allows to collect helpful information about the platform from the ACPI tables.
371369
///
372-
/// Like `platform_info_in`, but uses the global allocator.
370+
/// Like [`platform_info_in`](Self::platform_info_in), but uses the global allocator.
373371
#[cfg(feature = "alloc")]
374372
pub fn platform_info(&self) -> AcpiResult<PlatformInfo<alloc::alloc::Global>> {
375373
PlatformInfo::new(self)
376374
}
377375

378-
/// Convenience method for contructing a [`PlatformInfo`](crate::platform::PlatformInfo). This is one of the
379-
/// first things you should usually do with an `AcpiTables`, and allows to collect helpful information about
380-
/// the platform from the ACPI tables.
376+
/// Convenience method for contructing a [`PlatformInfo`]. This is one of the first things you should usually do
377+
/// with an `AcpiTables`, and allows to collect helpful information about the platform from the ACPI tables.
381378
#[cfg(feature = "allocator_api")]
382379
pub fn platform_info_in<A>(&self, allocator: A) -> AcpiResult<PlatformInfo<A>>
383380
where

0 commit comments

Comments
 (0)