Skip to content

Commit a8962d4

Browse files
committed
fixes and make sure the whole documentation is visible on docs.rs
1 parent d4de1c2 commit a8962d4

File tree

9 files changed

+83
-60
lines changed

9 files changed

+83
-60
lines changed

src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ mod macros;
2424
pub mod asm;
2525
pub mod exception;
2626
pub mod interrupt;
27+
// NOTE(target_arch) is for documentation purposes
28+
#[cfg(any(armv7m, target_arch = "x86_64"))]
2729
pub mod itm;
2830
pub mod peripheral;
2931
pub mod register;

src/peripheral/cbp.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
//! Cache and branch predictor maintenance operations
2+
//!
3+
//! *NOTE* Available only on ARMv7-M (`thumbv7*m-none-eabi*`)
24
35
use volatile_register::WO;
46

src/peripheral/cpuid.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
//! CPUID
22
33
use volatile_register::RO;
4-
#[cfg(any(armv7m, test))]
4+
#[cfg(any(armv7m, target_arch = "x86_64"))]
55
use volatile_register::RW;
66

7-
#[cfg(armv7m)]
7+
#[cfg(any(armv7m, target_arch = "x86_64"))]
88
use peripheral::CPUID;
99

1010
/// Register block
@@ -25,29 +25,29 @@ pub struct RegisterBlock {
2525
pub isar: [RO<u32>; 5],
2626
reserved1: u32,
2727
/// Cache Level ID
28-
#[cfg(any(armv7m, test))]
28+
#[cfg(any(armv7m, target_arch = "x86_64"))]
2929
pub clidr: RO<u32>,
3030
/// Cache Type
31-
#[cfg(any(armv7m, test))]
31+
#[cfg(any(armv7m, target_arch = "x86_64"))]
3232
pub ctr: RO<u32>,
3333
/// Cache Size ID
34-
#[cfg(any(armv7m, test))]
34+
#[cfg(any(armv7m, target_arch = "x86_64"))]
3535
pub ccsidr: RO<u32>,
3636
/// Cache Size Selection
37-
#[cfg(any(armv7m, test))]
37+
#[cfg(any(armv7m, target_arch = "x86_64"))]
3838
pub csselr: RW<u32>,
3939
}
4040

4141
/// Type of cache to select on CSSELR writes.
42-
#[cfg(armv7m)]
42+
#[cfg(any(armv7m, target_arch = "x86_64"))]
4343
pub enum CsselrCacheType {
4444
/// Select DCache or unified cache
4545
DataOrUnified = 0,
4646
/// Select ICache
4747
Instruction = 1,
4848
}
4949

50-
#[cfg(armv7m)]
50+
#[cfg(any(armv7m, target_arch = "x86_64"))]
5151
impl CPUID {
5252
/// Selects the current CCSIDR
5353
///

src/peripheral/fpb.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
//! Flash Patch and Breakpoint unit
2+
//!
3+
//! *NOTE* Available only on ARMv7-M (`thumbv7*m-none-eabi*`)
24
35
use volatile_register::{RO, RW, WO};
46

src/peripheral/fpu.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
//! Floating Point Unit
2+
//!
3+
//! *NOTE* Available only on ARMv7E-M (`thumbv7em-none-eabihf`)
24
35
use volatile_register::{RO, RW};
46

src/peripheral/itm.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
//! Instrumentation Trace Macrocell
2+
//!
3+
//! *NOTE* Available only on ARMv7-M (`thumbv7*m-none-eabi*`)
24
35
use core::cell::UnsafeCell;
46
use core::ptr;

0 commit comments

Comments
 (0)